From 87ebc8761b5ac7f78b6c544ca4f40162e0a79aaa Mon Sep 17 00:00:00 2001 From: end-4 <97237370+end-4@users.noreply.github.com> Date: Tue, 12 Aug 2025 18:25:32 +0700 Subject: [PATCH] bar workspaces: fix occupied indication when changing ws group and on init --- .config/quickshell/ii/modules/bar/Workspaces.qml | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.config/quickshell/ii/modules/bar/Workspaces.qml b/.config/quickshell/ii/modules/bar/Workspaces.qml index b97727a3..9ce93239 100644 --- a/.config/quickshell/ii/modules/bar/Workspaces.qml +++ b/.config/quickshell/ii/modules/bar/Workspaces.qml @@ -59,16 +59,23 @@ Item { }) } - // Initialize workspaceOccupied when the component is created + // Occupied workspace updates Component.onCompleted: updateWorkspaceOccupied() - - // Listen for changes in Hyprland.workspaces.values Connections { target: Hyprland.workspaces function onValuesChanged() { updateWorkspaceOccupied(); } } + Connections { + target: Hyprland + function onFocusedWorkspaceChanged() { + updateWorkspaceOccupied(); + } + } + onWorkspaceGroupChanged: { + updateWorkspaceOccupied(); + } implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2 implicitHeight: Appearance.sizes.barHeight