diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-01 17:01:28 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-05-01 17:01:28 +1000 |
| commit | 894fc9bfe6889539ab5a52a4b72474236cbc4bd6 (patch) | |
| tree | 8092767841632717142cffc5596b1ea9bb7a6b2f /modules/bar/components/workspaces/Workspaces.qml | |
| parent | bar: fix workspaces occupied (diff) | |
| download | caelestia-shell-894fc9bfe6889539ab5a52a4b72474236cbc4bd6.tar.gz caelestia-shell-894fc9bfe6889539ab5a52a4b72474236cbc4bd6.tar.bz2 caelestia-shell-894fc9bfe6889539ab5a52a4b72474236cbc4bd6.zip | |
bar: use loaders
Use loaders for all optional components
e.g. workspace windows and occupied background
Fix bar preset loader usage
Fix occupied group
Change text on active ws colour
Tray no extension for paths (use qt auto resolution)
Diffstat (limited to 'modules/bar/components/workspaces/Workspaces.qml')
| -rw-r--r-- | modules/bar/components/workspaces/Workspaces.qml | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/modules/bar/components/workspaces/Workspaces.qml b/modules/bar/components/workspaces/Workspaces.qml index 692ae32..e4ff787 100644 --- a/modules/bar/components/workspaces/Workspaces.qml +++ b/modules/bar/components/workspaces/Workspaces.qml @@ -9,7 +9,7 @@ Item { property alias vertical: layout.vertical property color colour: Appearance.colours.mauve - readonly property list<Workspace> workspaces: layout.children.filter(c => c.isWorkspace) + readonly property list<Workspace> workspaces: layout.children.filter(c => c.isWorkspace).sort((w1, w2) => w1.ws - w2.ws) readonly property var occupied: Hyprland.workspaces.values.reduce((acc, curr) => { acc[curr.id] = curr.lastIpcObject.windows > 0; return acc; @@ -35,11 +35,19 @@ Item { } } - OccupiedBg { - vertical: root.vertical - workspaces: root.workspaces - occupied: root.occupied - groupOffset: root.groupOffset + Loader { + active: BarConfig.workspaces.occupiedBg + asynchronous: true + + z: -1 + anchors.fill: parent + + sourceComponent: OccupiedBg { + vertical: root.vertical + workspaces: root.workspaces + occupied: root.occupied + groupOffset: root.groupOffset + } } ActiveIndicator { |