bar: custom workspace labels
This commit is contained in:
parent
5c3f27f332
commit
65c54e12c2
2 changed files with 7 additions and 2 deletions
|
|
@ -26,6 +26,8 @@ Singleton {
|
||||||
readonly property int shown: 10
|
readonly property int shown: 10
|
||||||
readonly property string style: ""
|
readonly property string style: ""
|
||||||
readonly property bool occupiedBg: true
|
readonly property bool occupiedBg: true
|
||||||
|
readonly property string label: " "
|
||||||
|
readonly property string activeLabel: " "
|
||||||
}
|
}
|
||||||
|
|
||||||
component Tray: QtObject {
|
component Tray: QtObject {
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,13 @@ StyledText {
|
||||||
|
|
||||||
readonly property bool isWorkspace: true // Flag for finding workspace children
|
readonly property bool isWorkspace: true // Flag for finding workspace children
|
||||||
|
|
||||||
property int ws: groupOffset + index + 1
|
readonly property int ws: groupOffset + index + 1
|
||||||
|
readonly property string label: BarConfig.workspaces.label || ws
|
||||||
|
readonly property string activeLabel: BarConfig.workspaces.activeLabel || label
|
||||||
|
|
||||||
animate: true
|
animate: true
|
||||||
text: ws
|
animateProp: "scale"
|
||||||
|
text: (Hyprland.activeWorkspace?.id ?? 1) === ws ? activeLabel : label
|
||||||
color: BarConfig.workspaces.occupiedBg || occupied[ws] ? Appearance.colours.text : Appearance.colours.subtext0
|
color: BarConfig.workspaces.occupiedBg || occupied[ws] ? Appearance.colours.text : Appearance.colours.subtext0
|
||||||
horizontalAlignment: StyledText.AlignHCenter
|
horizontalAlignment: StyledText.AlignHCenter
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue