WIP per-monitor workspaces - Hyprland

This commit is contained in:
Zacharias-Brohn
2025-10-15 12:07:34 +02:00
parent fe21ac08ec
commit e8258d798a
4 changed files with 19 additions and 3 deletions
+15 -1
View File
@@ -6,7 +6,21 @@ import Quickshell.Hyprland
Rectangle {
id: root
required property ShellScreen screen
readonly property int activeWsId: ( Hyprland.monitorFor( screen ).activeWorkspace?.id ?? 1 )
readonly property var occupied: Hyprland.workspaces.values.reduce(( acc, curr ) => {
acc[ curr.id ] = curr.lastIpcObject.windows > 0;
return acc;
})
readonly property int groupOffset: Math.floor(( activeWsId - 1 ) / 10) * 10
readonly property int ws: 1 + groupOffset
readonly property bool isOccupied: occupied[ ws ] ?? false
implicitWidth: workspacesRow.implicitWidth + 10
implicitHeight: workspacesRow.implicitHeight + 7