diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-11 16:46:20 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-11 16:46:20 +0200 |
| commit | 4c4ed4e3ce3dd25395866cb0bb71a8187f359dbe (patch) | |
| tree | b34dc7585d31f2b8002b3d8edf4af9117e9f31f8 /volume-osd/README.md | |
| parent | 4f01824832da8455a40446dc2ee949545f470ec5 (diff) | |
| download | quickshell-4c4ed4e3ce3dd25395866cb0bb71a8187f359dbe.tar.gz quickshell-4c4ed4e3ce3dd25395866cb0bb71a8187f359dbe.zip | |
feat(volume-osd): show what is playing
The OSD gains a track row above the volume bar when an MPRIS player is
running: album art, title, artist, and prev/play/next. With no player it
is the volume OSD it was, at the same size. A track change or a
play/pause shows the panel as well, so the row is not something you only
see by happening to touch the volume.
Hovering freezes the fade so the buttons can be clicked and leaving
restarts it, which keeps the passive behaviour intact for anyone not
reaching for the mouse. The panel still takes no keyboard focus.
playerctld proxies whichever player is active and republishes it under
its own bus name, so every player is enumerated twice. Player.qml drops
that name rather than deduplicating by identity, and controls the real
player, which works whether or not playerctld is running.
Album art is loaded with cache off and a per-track suffix on the URL.
Audacious extracts embedded art into one temp file in its cache and
rewrites that same path for each track, so the URL repeats while the
image changes, and a cached Image would keep showing the last cover.
Theme gains overlay, used by the art placeholder.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01G7NRsGyF9jGfPYS4zPqpN7
Diffstat (limited to 'volume-osd/README.md')
| -rw-r--r-- | volume-osd/README.md | 42 |
1 files changed, 38 insertions, 4 deletions
diff --git a/volume-osd/README.md b/volume-osd/README.md index f651c1d..d99140f 100644 --- a/volume-osd/README.md +++ b/volume-osd/README.md @@ -4,10 +4,15 @@ An on-screen display for volume, covering both output (speakers) and input (microphone). It appears at the bottom of the screen when the level or mute state changes, and fades out 1.5 seconds later. - ┌──────────────────────────────────┐ - │ 🔊 Output 75% │ - │ ████████████████░░░░░░░░ │ - └──────────────────────────────────┘ + ┌────────────────────────────────────┐ + │ ▪ Outside World ⏮ ⏸ ⏭ │ + │ Sunbeam │ + │ ──────────────────────────────── │ + │ 🔊 Output 75% │ + │ ████████████████░░░░░░░░░░ │ + └────────────────────────────────────┘ + + (the track row only exists while a player does) ## Running it @@ -17,6 +22,29 @@ From Hyprland, to start it with the session: exec-once = qs -p ~/Programming/GIT/quickshell/volume-osd +## Now playing + +When an MPRIS player is running, a track row sits above the volume bar: album +art, title, artist, and prev/play/next. With no player the panel is exactly +the volume OSD, at its original size. A track change or a play/pause shows the +panel too, so the row is not something you only see by touching the volume. + +Hovering the panel freezes its fade so the buttons can be clicked; moving away +starts the countdown again. Without a hover it behaves exactly as it did before +there was anything clickable on it. It still takes no keyboard focus. + +Two things about MPRIS that are not obvious: + +**playerctld publishes a duplicate.** It proxies whichever player is active +and republishes the metadata under `org.mpris.MediaPlayer2.playerctld`, so +every player appears twice. `Player.qml` drops that name and talks to the real +player, which works whether or not playerctld is running. + +**Album art can be a reused temp path.** Audacious extracts embedded art to a +file in its cache and rewrites that same path on each track, so the URL repeats +while the image behind it changes. The source carries the track title as a +cache buster and `cache: false`, or the previous track's cover stays on screen. + ## No keybinds to change The OSD watches PipeWire rather than being triggered by a hotkey, so existing @@ -90,6 +118,12 @@ current while something binds the node. Without the tracker the volume reads once and then goes stale, which looks like an OSD that displays a number from several changes ago. +**A Row sizes to its children, not to its parent.** The track row's text +column originally had a fixed width, and art + text + buttons + spacing came +to 356px inside a 328px content box, so the `next` button hung over the panel +edge. The column now takes whatever the art and transport buttons leave, which +holds at any panel width. Fixed widths inside a Row are worth distrusting. + ## Volume above 100% PipeWire allows volume over 1.0. The percentage is reported as-is, so it can |
