39 lines
1.1 KiB
QML
39 lines
1.1 KiB
QML
pragma ComponentBehavior: Bound
|
|
import Quickshell
|
|
import Quickshell.Hyprland
|
|
import Quickshell.Widgets
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
import qs
|
|
import qs.widgets
|
|
|
|
WrapperRectangle {
|
|
id: root
|
|
required property ShellScreen barScreen
|
|
required property int barHeight
|
|
readonly property double vertMargin: barHeight / 4 - 4
|
|
property HyprlandMonitor hyprBarScreen: Hyprland.monitorFor(root.barScreen)
|
|
color: Colors.base01
|
|
topMargin: vertMargin
|
|
bottomMargin: vertMargin
|
|
leftMargin: 8
|
|
rightMargin: 8
|
|
child: RowLayout {
|
|
id: wsLayout
|
|
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
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|