36 lines
792 B
QML
36 lines
792 B
QML
import Quickshell.Hyprland
|
|
import QtQuick
|
|
import QtQuick.Layouts
|
|
|
|
import "../constants"
|
|
|
|
RowLayout {
|
|
spacing: 10
|
|
|
|
Repeater {
|
|
model: 10
|
|
|
|
Text {
|
|
required property int index
|
|
|
|
property int wsId: index + 1
|
|
property var ws: workspaceHelpers.getWorkspace(wsId)
|
|
|
|
text: wsId
|
|
|
|
color: workspaceHelpers.isWorkspaceActive(wsId) ? Colors.md3.primary : (ws ? Colors.md3.on_background : Colors.md3.on_secondary)
|
|
|
|
font {
|
|
family: Constants.fontFamily
|
|
pixelSize: Constants.fontSize
|
|
bold: true
|
|
}
|
|
|
|
MouseArea {
|
|
anchors.fill: parent
|
|
onClicked: Hyprland.dispatch("workspace " + wsId)
|
|
}
|
|
}
|
|
}
|
|
}
|