From 41267747d08afd5b282bbcd920b2900a1ffbb04b Mon Sep 17 00:00:00 2001 From: rope Date: Thu, 30 Jul 2026 16:04:29 +0100 Subject: [PATCH] quickshell: add sheen streaks so art-less discs read as spinning --- settings/quickshell.nix | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/settings/quickshell.nix b/settings/quickshell.nix index 9e8a106..b2566ea 100644 --- a/settings/quickshell.nix +++ b/settings/quickshell.nix @@ -4151,7 +4151,11 @@ in readonly property real discSize: 86 readonly property real ringR: 47 - readonly property bool spinning: mediaCard.modelData.isPlaying + // Same expression the play/pause button + // uses, so the disc can never disagree + // with the glyph next to it. + readonly property bool spinning: + mediaCard.modelData.playbackState === MprisPlaybackState.Playing // Spectrum ring. Each bar sits with // its base on the ring and grows @@ -4168,7 +4172,7 @@ in // otherwise every card dances to // whatever else is playing. readonly property real lvl: - (mediaCard.modelData.isPlaying + (vinyl.spinning && index < calPopup.levels.length) ? calPopup.levels[index] / 100 : 0 width: 3 @@ -4215,14 +4219,40 @@ in Rectangle { required property int index anchors.centerIn: parent - anchors.horizontalCenterOffset: 1 + anchors.horizontalCenterOffset: 3 width: vinyl.discSize - 8 - index * 11 height: width radius: width / 2 color: "transparent" border.width: 1 border.color: Theme.base03 - opacity: 0.18 + opacity: 0.22 + } + } + + // Two opposed sheen streaks, like + // light catching the vinyl. Without + // these an art-less disc looks + // stationary: faint near-concentric + // grooves give the eye nothing to + // track, so the spin reads as a bug. + Repeater { + model: 2 + Rectangle { + id: sheen + required property int index + width: 2 + radius: 1 + height: vinyl.discSize * 0.4 + color: Theme.base04 + opacity: 0.3 + x: blankLabel.width / 2 - width / 2 + y: blankLabel.height / 2 - height + transform: Rotation { + origin.x: sheen.width / 2 + origin.y: sheen.height + angle: sheen.index * 180 + } } } }