Files
monoshell/Widgets/Workspaces.qml

37 lines
1.1 KiB
QML

import QtQuick
import QtQuick.Shapes
import Quickshell.Hyprland
Row {
Repeater {
model: 9
delegate: Shape {
height: 14
width: 24
property var workspace: Hyprland.workspaces.values.find(ws => ws.id === modelData+1)
preferredRendererType: Shape.CurveRenderer
anchors.verticalCenter: parent.verticalCenter
ShapePath {
strokeWidth: workspace ? 7 : 4
Behavior on strokeWidth {NumberAnimation {
duration: 150
}}
strokeColor: "white"
fillColor: "transparent"
PathAngleArc {
moveToStart: true
centerX: width/2
centerY: height/2
startAngle: 0
sweepAngle: 360
radiusX: workspace ? 3.5 : 5
Behavior on radiusX {NumberAnimation {
duration: 150
}}
radiusY: radiusX
}
}
}
}
}