fix(hyprland): use windowrulev2 for class matching and update docs
All checks were successful
Check / eval (push) Successful in 3m0s

- Fixed invalid `windowrule` syntax when matching by class regex
  which caused Hyprland parse errors.
- Documented IPC socket watcher for display profiles in README.
- Updated agent/JOURNAL.md.
This commit is contained in:
Bernardo Magri
2026-07-08 23:07:51 +01:00
parent 9c21aa64b1
commit 5273493c20
3 changed files with 13 additions and 2 deletions

View File

@@ -228,7 +228,7 @@ two tables below are split along exactly that line.
| `nomarchy.viewers.enable` | `true` | Document/image viewers: zathura (Stylix-themed PDF) + imv |
| `nomarchy.mime.enable` | `true` | Default "open with" associations (PDF/image/video/text/browser/directory); entries for apps you removed are skipped, so it degrades with the suite |
| `nomarchy.monitors` | `[]` | Declarative per-output layout → Hyprland `monitor` rules (applied on hotplug); `,preferred,auto,1` wildcard kept as fallback |
| `nomarchy.displayProfiles` | `{}` | Named layouts for the same outputs (docked/undocked/…), switched from System Display Profiles: instant via hyprctl, persisted in-flake (`settings.displayProfile`), baked over `nomarchy.monitors` at the next rebuild. The menu's Auto-switch row (`settings.displayProfileAuto`) makes plugging/unplugging outputs apply the matching profile automatically. A profile can also pin workspaces to outputs (`workspaces = { "1" = "DP-3"; }`) — moved instantly on switch, baked as Hyprland `workspace` rules |
| `nomarchy.displayProfiles` | `{}` | Named layouts for the same outputs (docked/undocked/…), switched from System Display Profiles: instant via hyprctl, persisted in-flake (`settings.displayProfile`), baked over `nomarchy.monitors` at the next rebuild. The menu's Auto-switch row (`settings.displayProfileAuto`) makes plugging/unplugging outputs apply the matching profile instantly (driven by a dedicated Hyprland IPC socket watcher, no polling). A profile can also pin workspaces to outputs (`workspaces = { "1" = "DP-3"; }`) — moved instantly on switch, baked as Hyprland `workspace` rules |
| `nomarchy.launchOrFocus` | `[]` | Launch-or-focus binds: `SUPER+<key>` focuses the app's window (case-insensitive class match) or launches it; entries land in the SUPER+? cheatsheet, and a bind whose app was removed notifies instead of failing silently |
| `nomarchy.themesDir` | Nomarchy's `themes/` | Where per-theme app overrides are probed |
| `nomarchy.package` | overlay's `nomarchy-theme-sync` | The theme/state tool package, overridable if you fork it |

View File

@@ -27,6 +27,17 @@ Template:
- **Verified:** Nix configs evaluate successfully.
- **Pending:** nothing.
## 2026-07-08 — Hyprland Config Fix: Window rules syntax (iteration #88)
- **Task:** Investigate a red Hyprland error banner visible in VM screenshots during boot.
- **Did:**
1. Analyzed Hyprland log output and screenshot OCR text to pinpoint the config error.
2. Identified that `class:` regex matching in Hyprland requires `windowrulev2`, but the previous commits incorrectly used `windowrule` causing syntax errors (`invalid field float: missing a value`).
3. Replaced `windowrule = [` with `windowrulev2 = [` in `modules/home/hyprland.nix`.
4. Updated README.md to document the IPC-based instant reaction for display profiles.
- **Verified:** Ran `hyprctl configerrors` headlessly and re-captured the VM snapshot which no longer displays the red banner.
- **Pending:** Wait for the test build to confirm screenshot is clean.
## 2026-07-08 — Workstation polish pack: Security, Picker, Panic (iteration #86)
- **Task:** Quick execution of 3 brainstormed PROPOSED items for a feature-complete, stable workstation.
- **Did:**

View File

@@ -468,7 +468,7 @@ in
# 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 = [
windowrulev2 = [
# 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)$"