diff options
| author | littleblack111 <littleblack11111@gmail.com> | 2025-07-11 21:49:53 +0800 |
|---|---|---|
| committer | littleblack111 <littleblack11111@gmail.com> | 2025-07-11 21:49:53 +0800 |
| commit | 0e4bdc7ed815ef389d9ca95fc4865f46701b1aaf (patch) | |
| tree | 09c5e1609a4e3526416ae6bd294fb003d58ec70a /bar/Workspace.qml | |
| parent | bf44811dced54246317c51183b2c77b551fafb79 (diff) | |
activewindow
Diffstat (limited to 'bar/Workspace.qml')
| -rw-r--r-- | bar/Workspace.qml | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bar/Workspace.qml b/bar/Workspace.qml index de63eba..04ad537 100644 --- a/bar/Workspace.qml +++ b/bar/Workspace.qml @@ -1,7 +1,7 @@ import QtQuick.Layouts import QtQuick import Quickshell -import qs.services +import Quickshell.Hyprland import qs.config Item { @@ -11,23 +11,23 @@ Item { function updateWorkspaceOccupied() { // workspaceOccupied = Array.from({ length: Config.options.bar.workspaces.shown }, (_, i) => { - // return SHyprland.workspaces.values.some(ws => ws.id === workspaceGroup * Config.options.bar.workspaces.shown + i + 1); + // return Hyprland.workspaces.values.some(ws => ws.id === workspaceGroup * Config.options.bar.workspaces.shown + i + 1); // }) workspaceOccupied = Array.from({ length: Bar.workspaces }, (_, i) => { - return SHyprland.workspaces.values.some(ws => ws.id === (i + 1)); + return Hyprland.workspaces.values.some(ws => ws?.id === (i + 1)); }); } function isActive(index: int): bool { - SHyprland.focusedWorkspace.id.toString() == (index + 1).toString(); + Hyprland.focusedWorkspace?.id.toString() == (index + 1).toString(); } function isOccupied(index: int): bool { return workspaceOccupied[index] === true; } Connections { - target: SHyprland.workspaces + target: Hyprland.workspaces function onValuesChanged() { updateWorkspaceOccupied(); } @@ -47,7 +47,7 @@ Item { Rectangle { Text { - text: SHyprland.focusedWorkspace?.id.toString() == (index + 1).toString() + text: Hyprland.focusedWorkspace?.id.toString() == (index + 1).toString() // text: isActive(index) } implicitWidth: 10 |
