From a8391c381da9d5f7d5fe8ec6089d5a04ccc15549 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Tue, 7 Jul 2026 22:39:43 +0100 Subject: [PATCH] feat(hyprland): float+center Bluetooth + printer config dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Conservative first cut of the floating-window audit (item 41): float and center the two shipped, unambiguous config dialogs — blueman (manager/adapters) and system-config-printer — alongside the mixer. Uses (?i) class regexes tolerant of the XWayland `.…-wrapped` form, consistent with the existing (?i) usage in this file. Deliberately conservative: network is dmenu/nmtui (no GUI editor), and the polkit prompt + GTK file portals are deferred because their window class can't be verified headlessly — a guessed class is a dead rule. Those wait for a hardware `hyprctl clients` read (queued). Co-Authored-By: Claude Opus 4.8 --- agent/BACKLOG.md | 24 ++++++++++++++---------- agent/HARDWARE-QUEUE.md | 7 +++++++ agent/JOURNAL.md | 17 +++++++++++++++++ modules/home/hyprland.nix | 24 +++++++++++++++++------- 4 files changed, 55 insertions(+), 17 deletions(-) diff --git a/agent/BACKLOG.md b/agent/BACKLOG.md index 05bc39f..4328598 100644 --- a/agent/BACKLOG.md +++ b/agent/BACKLOG.md @@ -257,16 +257,20 @@ 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. -### 41. Floating-window audit -(Raised by Bernardo, 2026-07-07 — item 11.) Decide which windows should -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. +### 41. Floating-window audit — remaining (needs hardware class checks) +(Raised by Bernardo, 2026-07-07 — item 11.) Broaden the `windowrule` +float set beyond the conservative first cut. +_Conservative cut shipped 2026-07-07 (iteration #63, on Bernardo's "take a +conservative approach"):_ float + center the mixer (item 35), **blueman** +(manager/adapters) and **system-config-printer** — the only shipped, +unambiguous config dialogs whose classes are confident. **Remaining +candidates, deliberately deferred because their window class can't be +verified headlessly** (a guessed class = dead rule): the polkit auth +prompt (hyprpolkitagent — no discoverable class in the package), GTK +file-chooser portals (`xdg-desktop-portal-gtk`), and any pinentry dialog. +Next slice: on hardware, run `hyprctl clients` while each is open, read +the real `class`, then append rules. Also revisit whether blueman/s-c-p +actually float once seen (regex tolerance for the `.…-wrapped` form). diff --git a/agent/HARDWARE-QUEUE.md b/agent/HARDWARE-QUEUE.md index acebe2b..3e4a33f 100644 --- a/agent/HARDWARE-QUEUE.md +++ b/agent/HARDWARE-QUEUE.md @@ -236,6 +236,13 @@ 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. +- [ ] **Config dialogs float** (iteration #63, item 41 cut) — after + `home-update` + relogin: open Bluetooth (blueman-manager) and, if + printing is on, System ▸ Printers (system-config-printer) — each + opens floating + centered, not tiled. If either still tiles, run + `hyprctl clients` while it's open, read the real `class`, and fix the + regex. While there, capture the polkit prompt's and a GTK file + dialog's class for the next 41 slice. - [ ] **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); diff --git a/agent/JOURNAL.md b/agent/JOURNAL.md index f4bb4b7..afcb7e5 100644 --- a/agent/JOURNAL.md +++ b/agent/JOURNAL.md @@ -17,6 +17,23 @@ Template: --- +## 2026-07-07 — Floating-window audit, conservative cut (iteration #63, item 41) +- **Task:** BACKLOG item 41 — Bernardo: "take a conservative approach." + Broaden the windowrule float set beyond the mixer. +- **Method:** surveyed what GUI dialogs the distro actually ships (not a + blind list). Network is dmenu/nmtui (no GUI editor → no rule). Confident, + shipped, unambiguous dialogs: **blueman** (manager + adapters) and + **system-config-printer**. Deferred polkit (hyprpolkitagent exposes no + discoverable class) and GTK file portals — guessing a class = dead rule, + so those wait for a hardware `hyprctl clients` read. +- **Fix:** `hyprland.nix` windowrule block — added float + center for the + two, `(?i)` regex tolerating the XWayland `.…-wrapped` form. RE2 `(?i)` + is already relied on in this file (line ~47), so it's consistent. +- **Verified:** V0 green; `nix eval` confirms the rendered regex escaping + is correct (single backslash, `?` quantifier unescaped). Whether the + classes actually match live is V3 (queued — includes confirming the + regex catches the real class). + ## 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 diff --git a/modules/home/hyprland.nix b/modules/home/hyprland.nix index 7db036c..4d71267 100644 --- a/modules/home/hyprland.nix +++ b/modules/home/hyprland.nix @@ -438,16 +438,26 @@ 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. + # Window rules — float + center small config/utility dialogs that + # tile awkwardly. Normal-priority list like `bind`/`exec-once` below, + # so a downstream `windowrule = [...]` concatenates rather than + # replaces. Class regexes use `(?i)` and tolerate the XWayland + # `.…-wrapped` binary-name form. + # + # Conservative set on purpose (item 41): only windows the distro + # actually ships, each an unambiguous dialog. Deliberately NOT + # floated yet — needs on-hardware class verification: the polkit auth + # prompt (hyprpolkitagent exposes no discoverable class) and GTK + # file-chooser portals. A dead rule is harmless, but guessing a class + # is worse than leaving it for a verified pass. windowrule = [ + # Audio mixer (item 35): right-click the Waybar volume module. "float, class:^(com\\.saivert\\.pwvucontrol|org\\.pulseaudio\\.pavucontrol|pavucontrol)$" "center, class:^(com\\.saivert\\.pwvucontrol|org\\.pulseaudio\\.pavucontrol|pavucontrol)$" + + # Bluetooth manager (blueman) + CUPS printer admin. + "float, class:(?i)^(\\.?blueman-(manager|adapters)(-wrapped)?|\\.?system-config-printer(-wrapped)?)$" + "center, class:(?i)^(\\.?blueman-(manager|adapters)(-wrapped)?|\\.?system-config-printer(-wrapped)?)$" ]; # Rendered from ./keybinds.nix (the cheatsheet reads the same list),