quickshell: underline workspaces, dropdown tray

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-26 10:16:55 +01:00
parent 69a72e9406
commit d63693e87a

View file

@ -573,6 +573,7 @@ in
model: Quickshell.screens
PanelWindow {
id: bar
required property var modelData
screen: modelData
@ -582,7 +583,7 @@ in
right: true
}
implicitHeight: 32
implicitHeight: 30
color: "#${c.base00}"
RowLayout {
@ -597,12 +598,10 @@ in
Repeater {
model: Hyprland.workspaces
Rectangle {
Item {
required property var modelData
Layout.preferredWidth: 32
Layout.preferredHeight: 32
color: modelData.focused ? "#${c.base02}" : "transparent"
radius: 6
Layout.preferredWidth: 28
Layout.preferredHeight: 30
Text {
anchors.centerIn: parent
@ -610,7 +609,16 @@ in
color: modelData.focused ? "#${c.base05}" : "#${c.base03}"
font.family: "FiraMono Nerd Font"
font.pixelSize: 13
font.weight: modelData.focused ? Font.Bold : Font.Normal
}
// Underline indicator
Rectangle {
anchors.bottom: parent.bottom
anchors.horizontalCenter: parent.horizontalCenter
width: parent.width - 8
height: 2
color: "#${c.base05}"
visible: modelData.focused
}
MouseArea {
@ -624,10 +632,49 @@ in
// Spacer
Item { Layout.fillWidth: true }
// System tray
// Tray toggle button
Item {
Layout.preferredWidth: 28
Layout.preferredHeight: 30
Layout.rightMargin: 6
Text {
anchors.centerIn: parent
text: "\ue0b2"
color: "#${c.base05}"
font.family: "FiraMono Nerd Font"
font.pixelSize: 13
textFormat: Text.PlainText
}
MouseArea {
anchors.fill: parent
onClicked: trayPopup.visible = !trayPopup.visible
}
}
}
PopupWindow {
id: trayPopup
anchor.window: bar
anchor.rect.x: bar.width - 220
anchor.rect.y: bar.height
visible: false
color: "#${c.base00}"
implicitWidth: trayRow.width + 24
implicitHeight: 40
Rectangle {
anchors.fill: parent
color: "#${c.base00}"
border.color: "#${c.base03}"
border.width: 1
radius: 8
RowLayout {
spacing: 4
Layout.rightMargin: 8
id: trayRow
anchors.centerIn: parent
spacing: 8
Repeater {
model: SystemTray.items
@ -657,6 +704,7 @@ in
}
}
}
}
'';
};