From 28a28e05d3dc1663a3291da622222d0e0591e99f Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Tue, 7 Jul 2026 22:31:00 +0100 Subject: [PATCH] feat(waybar): right-click volume opens a floating pwvucontrol mixer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Right-clicking the Waybar volume module now opens pwvucontrol (per-app mixer); left-click still mutes. Adds: - on-click-right in waybar.nix + all four whole-swap jsoncs (parity) - hyprland.nix: the config's first windowrule block — float + center the mixer (pwvucontrol, with pavucontrol as a fallback class); normal- priority list so a downstream windowrule concatenates - pwvucontrol in the template home.packages pwvucontrol is PipeWire-native + GTK4/libadwaita, so it themes via the portal color-scheme like Amberol. app-id verified from the built package. This settles the windowrule pattern/placement; item 41 is now just broadening the float set. Right-click→float→center is a V3 session check. Co-Authored-By: Claude Opus 4.8 --- agent/BACKLOG.md | 32 ++++++++--------------------- agent/HARDWARE-QUEUE.md | 5 +++++ agent/JOURNAL.md | 19 +++++++++++++++++ modules/home/hyprland.nix | 12 +++++++++++ modules/home/waybar.nix | 4 ++++ templates/downstream/home.nix | 1 + themes/boreal/waybar.jsonc | 1 + themes/executive-slate/waybar.jsonc | 1 + themes/summer-day/waybar.jsonc | 1 + themes/summer-night/waybar.jsonc | 1 + 10 files changed, 53 insertions(+), 24 deletions(-) diff --git a/agent/BACKLOG.md b/agent/BACKLOG.md index 4d11c3d..05bc39f 100644 --- a/agent/BACKLOG.md +++ b/agent/BACKLOG.md @@ -257,32 +257,16 @@ summer-day/summer-night) — all deliberately set `scrollbar { width:0 }` today, each needs a per-theme handle width/colour. Payoff is V3-only (rendering), so it wants a themed session, not a headless edit. -### 35. Right-click volume → audio control app -(Raised by Bernardo, 2026-07-07 — item 5.) Right-click the Waybar -`pulseaudio` module to open a mixer in a floating window. Wire -`on-click-right` in `waybar.nix` AND the whole-swap jsoncs (parity rule); -add a Hyprland `windowrulev2 = float` for the mixer. Ship the mixer in -the template's `home.packages`. -_Scoped 2026-07-07 (held for item 41):_ the on-click-right wiring is -trivial, but the float rule needs the windowrule infrastructure that -**does not exist yet** — there are currently **zero** `windowrule`s in -the whole config, and item 41 is where that set gets designed list-first -(Bernardo's call). So this is gated on 41, not independently shippable -without inverting his 41→35 plan. **Mixer recommendation:** `pwvucontrol` -(PipeWire-native, GTK4/libadwaita → themes via the portal color-scheme -like Amberol; the distro is already wpctl/PipeWire). app-id for the float -rule: `com.saivert.pwvucontrol`. (`pavucontrol` is the GTK3 fallback.) - ### 41. Floating-window audit (Raised by Bernardo, 2026-07-07 — item 11.) Decide which windows should -open floating by default (config dialogs, mixer, file-chooser portals, -calculators, etc.) and add the `windowrulev2 = float` rules in -`hyprland.nix`. Enables items 35/36b. Produce the list first, then the -rules. -_Note 2026-07-07:_ this establishes the **first** windowrule block in the -config (none exist today) — so it also owns the decision of where the -rules live and their format. Once the pattern's set, 35's mixer float and -36b fall out of it. +open floating by default (config dialogs, file-chooser portals, +calculators, etc.) and add the `windowrule` float rules in +`hyprland.nix`. Enables item 36b. Produce the list first, then the rules. +_Note 2026-07-07:_ the **first** `windowrule` block now exists (added by +item 35 — the mixer floats + centers), so the pattern + placement are +set. 41 is now purely "broaden the set" — audit the template app suite, +pick the dialog/utility classes, append rules. Still list-first +(Bernardo's taste on what should float), so it wants his review. diff --git a/agent/HARDWARE-QUEUE.md b/agent/HARDWARE-QUEUE.md index 89cb3e0..acebe2b 100644 --- a/agent/HARDWARE-QUEUE.md +++ b/agent/HARDWARE-QUEUE.md @@ -236,6 +236,11 @@ QA machine), the **T14s** (webcam case). unchanged (the bar still reserves its space). Accepted trade-off of `layer: bottom`: a floating window dragged over the top strip can now overlap the bar — confirm that's the only regression. +- [ ] **Right-click volume → floating mixer** (iteration #62, item 35) — + after `home-update` + relogin: right-click the Waybar volume module + opens pwvucontrol as a floating, centered window (not tiled); + left-click still mutes. Verify across a whole-swap theme too + (summer/boreal/executive-slate) since the jsoncs got the same wiring. - [ ] **Window focus on arrows** (iteration #61) — after `home-update` + relogin: SUPER+←/→/↑/↓ move focus between tiled windows; SUPER+H/J/K/L no longer move focus; SUPER+? cheatsheet shows the arrow glyphs. diff --git a/agent/JOURNAL.md b/agent/JOURNAL.md index 8d5596d..f4bb4b7 100644 --- a/agent/JOURNAL.md +++ b/agent/JOURNAL.md @@ -17,6 +17,25 @@ Template: --- +## 2026-07-07 — Right-click volume → floating mixer (iteration #62, item 35) +- **Task:** BACKLOG item 35 — right-click the Waybar volume module to + open a mixer in a floating window. (Bernardo re-launched /loop after I'd + flagged it as gated on 41 — read as "handle it," so I did 35 fully and + re-scoped 41 to just broadening the float set.) +- **Chose pwvucontrol** (PipeWire-native, GTK4/libadwaita → themes via the + portal like Amberol; distro is already wpctl/PipeWire). Verified app-id + `com.saivert.pwvucontrol` from the built package. +- **Changes:** (1) `waybar.nix` pulseaudio `on-click-right = "pwvucontrol"` + + parity into all four whole-swap jsoncs (summer-day/night, boreal, + executive-slate). (2) `hyprland.nix` — the config's **first** `windowrule` + block: `float` + `center` for the mixer classes (pwvucontrol + pavucontrol + fallback), normal-priority list so downstream concatenates. (3) + `pwvucontrol` added to the template `home.packages`. +- **Verified:** V0 green; `nix eval` of the homeConfiguration confirms the + windowrule regex renders with correct single-backslash escaping + (`class:^(com\.saivert\.pwvucontrol|…)$`). The right-click→float→center + interaction is a V3 session check (queued). Item 41 now = broaden the set. + ## 2026-07-07 — Window focus: vim keys → arrows (iteration #61, direct request) - **Task:** Bernardo — switch window navigation from vim-style SUPER+H/J/K/L to SUPER+arrow keys. diff --git a/modules/home/hyprland.nix b/modules/home/hyprland.nix index 10b6f98..7db036c 100644 --- a/modules/home/hyprland.nix +++ b/modules/home/hyprland.nix @@ -438,6 +438,18 @@ in background_color = rgb c.base; }; + # Window rules. This is the config's first float rule; item 41 will + # broaden the set (dialogs, portals, …) once that audit lands. For + # now: the audio mixer opened by right-clicking the Waybar volume + # module (item 35) floats + centers instead of tiling. Matches + # pwvucontrol (the template's mixer) and pavucontrol if swapped in. + # Normal-priority list like `bind`/`exec-once` below, so a downstream + # `windowrule = [...]` concatenates rather than replaces. + windowrule = [ + "float, class:^(com\\.saivert\\.pwvucontrol|org\\.pulseaudio\\.pavucontrol|pavucontrol)$" + "center, class:^(com\\.saivert\\.pwvucontrol|org\\.pulseaudio\\.pavucontrol|pavucontrol)$" + ]; + # Rendered from ./keybinds.nix (the cheatsheet reads the same list), # plus the generated per-workspace binds. Like exec-once above this # stays a normal-priority list, so a downstream `bind = [...]` diff --git a/modules/home/waybar.nix b/modules/home/waybar.nix index afe9650..6db7803 100644 --- a/modules/home/waybar.nix +++ b/modules/home/waybar.nix @@ -172,6 +172,10 @@ let format-muted = "󰝟"; format-icons.default = [ "󰕿" "󰖀" "󰕾" ]; on-click = "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle"; + # Right-click → the full mixer (per-app volumes) in a floating window + # (item 35). pwvucontrol ships in the template suite; the Hyprland + # windowrule floats it. Keep in sync with the whole-swap jsoncs. + on-click-right = "pwvucontrol"; }; # Idle inhibitor (caffeine): click 󰾪 → 󰅶 to hold the screen awake — diff --git a/templates/downstream/home.nix b/templates/downstream/home.nix index a28a862..1eff4db 100644 --- a/templates/downstream/home.nix +++ b/templates/downstream/home.nix @@ -81,6 +81,7 @@ inkscape # vector graphics mpv # media player amberol # music player (local library; streaming → spotify below) + pwvucontrol # PipeWire volume mixer (right-click the Waybar volume) # ── More apps — uncomment to add ───────────────────────────────── # Web browsers diff --git a/themes/boreal/waybar.jsonc b/themes/boreal/waybar.jsonc index df36992..c32c384 100644 --- a/themes/boreal/waybar.jsonc +++ b/themes/boreal/waybar.jsonc @@ -116,6 +116,7 @@ ] }, "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", + "on-click-right": "pwvucontrol", "tooltip-format": "{desc} | {volume}%" }, "battery": { diff --git a/themes/executive-slate/waybar.jsonc b/themes/executive-slate/waybar.jsonc index 8d67c50..83e8b33 100644 --- a/themes/executive-slate/waybar.jsonc +++ b/themes/executive-slate/waybar.jsonc @@ -104,6 +104,7 @@ ] }, "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", + "on-click-right": "pwvucontrol", "tooltip-format": "{desc} | {volume}%" }, "custom/powerprofile": { diff --git a/themes/summer-day/waybar.jsonc b/themes/summer-day/waybar.jsonc index 4fbc009..7c02928 100644 --- a/themes/summer-day/waybar.jsonc +++ b/themes/summer-day/waybar.jsonc @@ -51,6 +51,7 @@ "default": ["", "", ""] }, "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", + "on-click-right": "pwvucontrol", "tooltip-format": "Playing at {volume}%" }, diff --git a/themes/summer-night/waybar.jsonc b/themes/summer-night/waybar.jsonc index 66fcab7..c5fe434 100644 --- a/themes/summer-night/waybar.jsonc +++ b/themes/summer-night/waybar.jsonc @@ -52,6 +52,7 @@ "default": ["", "", ""] }, "on-click": "wpctl set-mute @DEFAULT_AUDIO_SINK@ toggle", + "on-click-right": "pwvucontrol", "tooltip-format": "{desc} | {volume}%" },