quickshell: workspace dots with accent pill, nudged inside the frame

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
rope 2026-06-11 20:51:46 +01:00
parent f2cf842ace
commit 3d32befa5b

View file

@ -602,42 +602,44 @@ in
}
}
// Left workspaces
// Left workspace dots: accent pill for the focused
// workspace, dim dots otherwise. All colours from Theme
// (stylix); the pill matches hyprland's active border accent.
Row {
anchors.left: parent.left
anchors.leftMargin: 6
anchors.leftMargin: Theme.frameWidth + 8
anchors.verticalCenter: barBgRect.verticalCenter
spacing: 0
spacing: 4
Repeater {
model: Hyprland.workspaces
Item {
id: wsItem
required property var modelData
visible: modelData.id > 0
width: visible ? 28 : 0
width: visible ? dot.width + 6 : 0
height: 30
Text {
anchors.centerIn: parent
text: modelData.name
color: modelData.focused ? Theme.base05 : Theme.base03
font.family: Theme.fontFamily
font.pixelSize: 13
}
Rectangle {
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 8
height: 2
color: Theme.base05
visible: modelData.focused
id: dot
anchors.centerIn: parent
width: wsItem.modelData.focused ? 18 : 6
height: 6
radius: 3
color: wsItem.modelData.focused ? Theme.base0D
: wsMa.containsMouse ? Theme.base04 : Theme.base03
Behavior on width {
NumberAnimation { duration: 200; easing.type: Easing.OutExpo }
}
Behavior on color { ColorAnimation { duration: 120 } }
}
MouseArea {
id: wsMa
anchors.fill: parent
onClicked: modelData.activate()
hoverEnabled: true
onClicked: wsItem.modelData.activate()
}
}
}