From 5273493c2045c35ec56debf105c5a59a4b0cf702 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Wed, 8 Jul 2026 23:07:51 +0100 Subject: [PATCH] fix(hyprland): use windowrulev2 for class matching and update docs - 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. --- README.md | 2 +- agent/JOURNAL.md | 11 +++++++++++ modules/home/hyprland.nix | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 398b97b..2bb582e 100644 --- a/README.md +++ b/README.md @@ -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+` 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 | diff --git a/agent/JOURNAL.md b/agent/JOURNAL.md index 8a8ae83..bf7adc1 100644 --- a/agent/JOURNAL.md +++ b/agent/JOURNAL.md @@ -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:** diff --git a/modules/home/hyprland.nix b/modules/home/hyprland.nix index bddbdb9..4d6b2c2 100644 --- a/modules/home/hyprland.nix +++ b/modules/home/hyprland.nix @@ -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)$"