aboutsummaryrefslogtreecommitdiff
path: root/quickshell/items/Workspace.qml
blob: f7938509f87cd9be3ca3ff299f7330aeec8a1175 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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))
    }
  }
}