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

View file

@ -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