bar workspaces: fix occupied indication when changing ws group and on init

This commit is contained in:
end-4
2025-08-12 18:25:32 +07:00
parent 4e87ce8f4b
commit 87ebc8761b
@@ -59,16 +59,23 @@ Item {
}) })
} }
// Initialize workspaceOccupied when the component is created // Occupied workspace updates
Component.onCompleted: updateWorkspaceOccupied() Component.onCompleted: updateWorkspaceOccupied()
// Listen for changes in Hyprland.workspaces.values
Connections { Connections {
target: Hyprland.workspaces target: Hyprland.workspaces
function onValuesChanged() { function onValuesChanged() {
updateWorkspaceOccupied(); updateWorkspaceOccupied();
} }
} }
Connections {
target: Hyprland
function onFocusedWorkspaceChanged() {
updateWorkspaceOccupied();
}
}
onWorkspaceGroupChanged: {
updateWorkspaceOccupied();
}
implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2 implicitWidth: rowLayout.implicitWidth + rowLayout.spacing * 2
implicitHeight: Appearance.sizes.barHeight implicitHeight: Appearance.sizes.barHeight