quickshell/modules/bar/Workspaces.qml

37 lines
1.1 KiB
QML
Raw Normal View History

2025-12-21 20:59:33 +01:00
import Quickshell.Hyprland
import QtQuick
import QtQuick.Layouts
Item {
id: root
2025-12-21 21:24:03 +01:00
implicitWidth: workspaceRow.implicitWidth
2025-12-21 20:59:33 +01:00
height: 30
Row {
2025-12-21 21:24:03 +01:00
id: workspaceRow
2025-12-21 20:59:33 +01:00
anchors.centerIn: parent
spacing: 10 // Slightly increase spacing between workspace buttons
Repeater {
id: workspaceRepeater
Rectangle {
2025-12-23 14:10:41 +01:00
width: 14
height: 14
radius: 10
2025-12-21 20:59:33 +01:00
//color: modelData.active ? myPallete.accent : myPallete.window
color: modelData.active ? Colors.foreground : "transparent"
Text {
id: workspaceNumber
font.weight: 900
font.family: Appearance.font
font.pixelSize: Appearance.fontSize
anchors.centerIn: parent
text: modelData.id
color: modelData.active ? Colors.background : Colors.foreground // Set contrasting color for workspace number
}
}
model: Hyprland.workspaces
2025-12-21 20:59:33 +01:00
}
}
}