forked from Shinonome/dots-hyprland
bar workspaces: fix occupied indication when changing ws group and on init
This commit is contained in:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user