import Quickshell import QtQuick import qs.Components import qs.Modules.Bar.Popouts as Popouts import qs.Modules.Notifications as Notifications import qs.Modules.Sidebar as Sidebar import qs.Modules.Sidebar.Utils as Utils import qs.Modules.Dashboard as Dashboard import qs.Modules.Osd as Osd import qs.Components.Toast as Toasts import qs.Modules.Launcher as Launcher import qs.Modules.Resources as Resources import qs.Modules.Settings as Settings import qs.Modules.Drawing as Drawing import qs.Modules.Dock as Dock import qs.Modules.Clipboard as Clipboard import ZShell.Config Item { id: root readonly property alias clipboard: clipboard readonly property alias dashboard: dashboard readonly property alias dashboardWrapper: dashboardWrapper readonly property alias dock: dock readonly property alias drawing: drawing readonly property alias launcher: launcher readonly property alias notifications: notifications readonly property alias osd: osd readonly property alias osdWrapper: osdWrapper readonly property alias popouts: popouts.content readonly property alias popoutsWrapper: popouts readonly property alias resources: resources readonly property alias resourcesWrapper: resourcesWrapper readonly property alias settings: settings readonly property alias settingsWrapper: settingsWrapper readonly property alias sidebar: sidebar readonly property alias toasts: toasts readonly property alias utilities: utilities required property Item bar required property real borderThickness required property var drawingItem required property EdgeGeometry geometry required property ShellScreen screen required property ScreenState screenState anchors.bottomMargin: geometry.insetBottom(borderThickness) anchors.fill: parent anchors.leftMargin: geometry.insetLeft(borderThickness) anchors.margins: borderThickness anchors.topMargin: geometry.insetTop(borderThickness) Item { id: resourcesWrapper anchors.bottom: root.geometry.position === "bottom" ? parent.bottom : undefined anchors.left: parent.left anchors.top: root.geometry.position !== "bottom" ? parent.top : undefined clip: true implicitHeight: root.geometry.horizontal ? resources.implicitHeight * (1 - resources.offsetScale) : resources.implicitHeight implicitWidth: root.geometry.horizontal ? resources.implicitWidth : resources.implicitWidth * (1 - resources.offsetScale) Resources.Wrapper { id: resources position: root.geometry.position screenState: root.screenState } } Item { id: osdWrapper anchors.right: parent.right anchors.rightMargin: sidebar.width * (1 - sidebar.offsetScale) anchors.verticalCenter: parent.verticalCenter clip: sidebar.visible implicitHeight: osd.implicitHeight implicitWidth: osd.implicitWidth * (1 - osd.offsetScale) Osd.Wrapper { id: osd anchors.right: parent.right anchors.verticalCenter: parent.verticalCenter screen: root.screen screenState: root.screenState sidebarOrSessionVisible: sidebar.visible } } Drawing.Wrapper { id: drawing anchors.left: parent.left anchors.verticalCenter: parent.verticalCenter drawing: root.drawingItem screen: root.screen screenState: root.screenState } Popouts.ClipWrapper { id: popouts borderThickness: root.borderThickness position: root.geometry.position screen: root.screen } Toasts.Toasts { id: toasts anchors.bottom: sidebar.visible ? parent.bottom : utilities.top anchors.margins: Tokens.padding.small anchors.right: sidebar.left } Notifications.Wrapper { id: notifications anchors.right: parent.right anchors.top: parent.top panels: root screenState: root.screenState sidebarPanel: sidebar } Launcher.Wrapper { id: launcher anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter panels: root screen: root.screen screenState: root.screenState } Utils.Wrapper { id: utilities anchors.bottom: parent.bottom anchors.right: parent.right screenState: root.screenState sidebar: sidebar } Item { id: dashboardWrapper property real offsetScale: dashboard.shouldBeActive ? 0 : 1 anchors.horizontalCenter: parent.horizontalCenter anchors.top: parent.top clip: offsetScale > 0 implicitHeight: dashboard.implicitHeight * (1 - offsetScale) implicitWidth: dashboard.implicitWidth Behavior on offsetScale { Anim { duration: Tokens.anim.durations.expressiveDefaultSpatial easing: Tokens.anim.expressiveDefaultSpatial } } Dashboard.Wrapper { id: dashboard offsetScale: dashboardWrapper.offsetScale screenState: root.screenState } } Sidebar.Wrapper { id: sidebar anchors.bottom: utilities.top anchors.right: parent.right anchors.top: notifications.bottom panels: root screenState: root.screenState } Item { id: settingsWrapper anchors.fill: parent clip: true Settings.Wrapper { id: settings anchors.centerIn: parent anchors.verticalCenterOffset: (-implicitHeight - 5 - ((root.height - implicitHeight) / 2)) * offsetScale panels: root screen: root.screen screenState: root.screenState } } Dock.Wrapper { id: dock anchors.bottom: parent.bottom anchors.horizontalCenter: parent.horizontalCenter panels: root screen: root.screen screenState: root.screenState } Clipboard.Wrapper { id: clipboard anchors.bottom: parent.bottom anchors.left: parent.left screen: root.screen screenState: root.screenState } }