Improve hover behaviour, make font configurable, adjust overview

This commit is contained in:
2026-09-09 16:46:57 -07:00
parent 69cc62cb55
commit a7c34fe2f6
13 changed files with 95 additions and 32 deletions
+1
View File
@@ -52,6 +52,7 @@ Item {
anchors.verticalCenter: parent.verticalCenter
x: 10
color: "white"
font.family: Config.font
text: `${Math.round(UPower.displayDevice.percentage * 100)}% · ${UPower.displayDevice.changeRate.toPrecision(2)}W`
}
}
+2 -2
View File
@@ -49,7 +49,7 @@ Rectangle {
right: parent.right
}
color: "white"
font.family: "Comfortaa"
font.family: root.font
font.pixelSize: 16
text: modelData?.summary ?? text
elide: Text.ElideRight
@@ -62,7 +62,7 @@ Rectangle {
right: parent.right
}
color: "white"
font.family: "Comfortaa"
font.family: root.font
font.pixelSize: 12
text: modelData?.body ?? text
elide: Text.ElideRight
+10 -10
View File
@@ -4,7 +4,7 @@ import Quickshell.Services.Pipewire
import QtQuick
Shape {
id: root
id: percentIndicator
preferredRendererType: Shape.CurveRenderer
property var percent
ShapePath {
@@ -14,10 +14,10 @@ Shape {
strokeWidth: 2
PathAngleArc {
moveToStart: true
centerX: root.width/2
centerY: root.height/2
radiusX: root.width/2
radiusY: root.height/2
centerX: percentIndicator.width/2
centerY: percentIndicator.height/2
radiusX: percentIndicator.width/2
radiusY: percentIndicator.height/2
startAngle: 90 + 40
sweepAngle: 360 - 80
}
@@ -29,12 +29,12 @@ Shape {
strokeWidth: 2
PathAngleArc {
moveToStart: true
centerX: root.width/2
centerY: root.height/2
radiusX: root.width/2 - 1
radiusY: root.height/2 - 1
centerX: percentIndicator.width/2
centerY: percentIndicator.height/2
radiusX: percentIndicator.width/2 - 1
radiusY: percentIndicator.height/2 - 1
startAngle: 90 + 40
sweepAngle: root.percent * (360 - 80)
sweepAngle: percentIndicator.percent * (360 - 80)
}
}
}
+8 -7
View File
@@ -4,13 +4,13 @@ import Quickshell.Widgets
import Quickshell.Services.Mpris
Item {
id: root
id: time
property var player: Mpris.players.values[0]
anchors {
top: parent.top
bottom: parent.bottom
}
width: children[1].width + 24
width: children[1].width + 18
Rectangle {
anchors.fill: parent
anchors.margins: 4
@@ -20,20 +20,20 @@ Item {
Behavior on color {ColorAnimation {duration: 150}}
}
Row {
spacing: 12
spacing: 8
anchors.verticalCenter: parent.verticalCenter
x: 12
x: 8
ClippingRectangle {
visible: !!root.player
visible: !!time.player
anchors.verticalCenter: parent.verticalCenter
width: 24
height: width
radius: 6
Image {
anchors.fill: parent
source: root.player?.trackArtUrl ?? source
source: time.player?.trackArtUrl ?? source
}
opacity: root.player?.isPlaying ? 1 : 0.5
opacity: time.player?.isPlaying ? 1 : 0.5
Behavior on opacity {NumberAnimation {duration: 150}}
}
Text {
@@ -41,6 +41,7 @@ Item {
property var clock: SystemClock {}
color: "white"
text: Qt.formatDateTime(clock.date, "ddd MMM dd · hh:mm")
font.family: root.font
}
}
HoverHandler {id: hover}
+7 -1
View File
@@ -27,7 +27,13 @@ Item {
property var icon: {
let appId
if (workspace) {
let toplevel = Array.from(workspace.toplevels.values).reduce((prev, curr) => (prev.lastIpcObject.focusHistoryID < curr.lastIpcObject.focusHistoryID) ? prev : curr)
// Find most recently focused toplevel on workspace
let toplevel = Array.from(workspace.toplevels.values).reduce(
(prev, curr) => (
prev.lastIpcObject.focusHistoryID <
curr.lastIpcObject.focusHistoryID
) ? prev : curr
);
appId = toplevel.wayland?.appId
}
return DesktopEntries.applications.values.find(