add logic to tray and fix workspace initialization fuckery

This commit is contained in:
lucy 2026-05-14 18:15:19 +02:00
commit f8c432390b
2 changed files with 6 additions and 2 deletions

View file

@ -11,6 +11,7 @@ import qs.widgets
WrapperRectangle { WrapperRectangle {
id: root id: root
color: Colors.base01 color: Colors.base01
visible: iconRepeater.count != 0
required property int barHeight required property int barHeight
property double vertMargin: barHeight / 4 - 4 property double vertMargin: barHeight / 4 - 4
topMargin: vertMargin topMargin: vertMargin

View file

@ -12,19 +12,22 @@ WrapperRectangle {
required property ShellScreen barScreen required property ShellScreen barScreen
required property int barHeight required property int barHeight
readonly property double vertMargin: barHeight / 4 - 4 readonly property double vertMargin: barHeight / 4 - 4
property HyprlandMonitor hyprBarScreen: Hyprland.monitorFor(root.barScreen)
color: Colors.base01 color: Colors.base01
topMargin: vertMargin topMargin: vertMargin
bottomMargin: vertMargin bottomMargin: vertMargin
leftMargin: 8 leftMargin: 8
rightMargin: 8 rightMargin: 8
RowLayout { child: RowLayout {
id: wsLayout
Repeater { Repeater {
id: wsRepeater id: wsRepeater
model: Hyprland.workspaces model: Hyprland.workspaces
delegate: WrapperRectangle { delegate: WrapperRectangle {
id: wsWrapper id: wsWrapper
parent: wsLayout
color: 'transparent' color: 'transparent'
visible: modelData.monitor == Hyprland.monitorFor(root.barScreen) visible: modelData.monitor == root.hyprBarScreen
required property var modelData required property var modelData
child: StyledText { child: StyledText {
text: wsWrapper.modelData.id text: wsWrapper.modelData.id