aboutsummaryrefslogtreecommitdiff
path: root/quickshell/items/Workspace.qml
diff options
context:
space:
mode:
Diffstat (limited to 'quickshell/items/Workspace.qml')
-rw-r--r--quickshell/items/Workspace.qml22
1 files changed, 22 insertions, 0 deletions
diff --git a/quickshell/items/Workspace.qml b/quickshell/items/Workspace.qml
new file mode 100644
index 0000000..f793850
--- /dev/null
+++ b/quickshell/items/Workspace.qml
@@ -0,0 +1,22 @@
+import QtQuick
+import Quickshell.Hyprland
+
+Repeater {
+ model: 5
+
+ Text {
+ property bool isActive: Hyprland.focusedWorkspace?.id === (index + 1)
+
+ text: index + 1
+ color: isActive ? shellRoot.green : shellRoot.white
+ font {
+ pixelSize: shellRoot.fontSize;
+ bold: true;
+ }
+
+ MouseArea {
+ anchors.fill: parent
+ onClicked: Hyprland.dispatch("workspace " + (index + 1))
+ }
+ }
+}