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 { Row {
anchors.left: parent.left anchors.left: parent.left
anchors.leftMargin: 6 anchors.leftMargin: Theme.frameWidth + 8
anchors.verticalCenter: barBgRect.verticalCenter anchors.verticalCenter: barBgRect.verticalCenter
spacing: 0 spacing: 4
Repeater { Repeater {
model: Hyprland.workspaces model: Hyprland.workspaces
Item { Item {
id: wsItem
required property var modelData required property var modelData
visible: modelData.id > 0 visible: modelData.id > 0
width: visible ? 28 : 0 width: visible ? dot.width + 6 : 0
height: 30 height: 30
Text {
anchors.centerIn: parent
text: modelData.name
color: modelData.focused ? Theme.base05 : Theme.base03
font.family: Theme.fontFamily
font.pixelSize: 13
}
Rectangle { Rectangle {
anchors.bottom: parent.bottom id: dot
anchors.horizontalCenter: parent.horizontalCenter anchors.centerIn: parent
width: parent.width - 8 width: wsItem.modelData.focused ? 18 : 6
height: 2 height: 6
color: Theme.base05 radius: 3
visible: modelData.focused 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 { MouseArea {
id: wsMa
anchors.fill: parent anchors.fill: parent
onClicked: modelData.activate() hoverEnabled: true
onClicked: wsItem.modelData.activate()
} }
} }
} }