quickshell/modules/bar/Ws.qml
2026-05-15 19:56:10 +02:00

38 lines
1 KiB
QML

pragma ComponentBehavior: Bound
import Quickshell
import Quickshell.Hyprland
import Quickshell.Widgets
import QtQuick
import QtQuick.Layouts
import qs
import qs.widgets
import qs.settings
WrapperRectangle {
id: root
required property ShellScreen barScreen
property HyprlandMonitor hyprBarScreen: Hyprland.monitorFor(root.barScreen)
radius: Config.rounding
color: Colors.base01
leftMargin: 8
rightMargin: 8
child: RowLayout {
id: wsLayout
spacing: 8
Repeater {
id: wsRepeater
model: Hyprland.workspaces
delegate: WrapperRectangle {
id: wsWrapper
parent: wsLayout
color: 'transparent'
visible: modelData.monitor == root.hyprBarScreen
required property var modelData
child: StyledText {
text: wsWrapper.modelData.id
opacity: wsWrapper.modelData.active ? 1.0 : 0.6
}
}
}
}
}