diff options
| author | Freya Murphy <freya@freyacat.org> | 2026-01-13 16:33:45 -0500 |
|---|---|---|
| committer | Freya Murphy <freya@freyacat.org> | 2026-01-13 16:33:45 -0500 |
| commit | fe45fb95bac47ca80cbaf661007f29b70f87a0b1 (patch) | |
| tree | d93bbde76ce42aec4aaa20ec646662e811cabb6e | |
| parent | update commits (diff) | |
| download | caelestia-shell-fe45fb95bac47ca80cbaf661007f29b70f87a0b1.tar.gz caelestia-shell-fe45fb95bac47ca80cbaf661007f29b70f87a0b1.tar.bz2 caelestia-shell-fe45fb95bac47ca80cbaf661007f29b70f87a0b1.zip | |
| -rw-r--r-- | modules/bar/components/workspaces/ActiveIndicator.qml | 3 | ||||
| -rw-r--r-- | modules/bar/components/workspaces/Workspaces.qml | 15 |
2 files changed, 3 insertions, 15 deletions
diff --git a/modules/bar/components/workspaces/ActiveIndicator.qml b/modules/bar/components/workspaces/ActiveIndicator.qml index 912f771..cd5ce35 100644 --- a/modules/bar/components/workspaces/ActiveIndicator.qml +++ b/modules/bar/components/workspaces/ActiveIndicator.qml @@ -10,10 +10,9 @@ StyledRect { required property int activeWsId required property Repeater workspaces required property Item mask - required property var monitorWorkspaces readonly property int currentWsIdx: { - let wss = monitorWorkspaces; + let wss = Hypr.workspaces.values; for (let i = 0; i < wss.length; i++) { let ws = wss[i]; if (ws.id == activeWsId) diff --git a/modules/bar/components/workspaces/Workspaces.qml b/modules/bar/components/workspaces/Workspaces.qml index 69b8e48..562dd82 100644 --- a/modules/bar/components/workspaces/Workspaces.qml +++ b/modules/bar/components/workspaces/Workspaces.qml @@ -14,16 +14,6 @@ StyledClippingRect { required property ShellScreen screen readonly property int activeWsId: Config.bar.workspaces.perMonitorWorkspaces ? (Hypr.monitorFor(screen).activeWorkspace?.id ?? 1) : Hypr.activeWsId - readonly property var monitorWorkspaces: { - if (Config.bar.workspaces.perMonitorWorkspaces) { - let monitor = Hypr.monitorFor(root.screen); - return Hypr.workspaces.values.filter(ws => { - return ws.monitor.id == monitor.id - }); - } else { - return Hypr.workspaces.values - } - } implicitWidth: Config.bar.sizes.innerWidth implicitHeight: layout.implicitHeight + Appearance.padding.small * 2 @@ -42,9 +32,9 @@ StyledClippingRect { Repeater { id: workspaces - model: monitorWorkspaces.length + model: Hypr.workspaces.values.length Workspace { - ws: monitorWorkspaces[index] + ws: Hypr.workspaces.values[index] activeWsId: root.activeWsId } } @@ -56,7 +46,6 @@ StyledClippingRect { sourceComponent: ActiveIndicator { activeWsId: root.activeWsId - monitorWorkspaces: root.monitorWorkspaces workspaces: workspaces mask: layout } |