From 1e1d568947b60273b3d768d523f5d9e0e7840053 Mon Sep 17 00:00:00 2001 From: Bernardo Magri Date: Fri, 10 Jul 2026 13:38:54 +0100 Subject: [PATCH] fix(hyprland): stay_focused not stayfocused (0.55) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hyprland 0.55 renamed the effect; stayfocused 1 → invalid field type on line 158 (polkit rules). Keep float/center/workspace current. --- agent/MEMORY.md | 3 +++ modules/home/hyprland.nix | 6 +++--- tools/check-windowrule-syntax.py | 6 +++++- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/agent/MEMORY.md b/agent/MEMORY.md index 5f5ce7c..8969a2d 100644 --- a/agent/MEMORY.md +++ b/agent/MEMORY.md @@ -128,6 +128,9 @@ iteration would otherwise rediscover. `nomarchy-rebuild` then `nomarchy-home`, or desktop changes are silently skipped against the old lock (README § 3). +- Hyprland 0.55 renames `stayfocused` → `stay_focused` (and similar + underscore effects); `stayfocused 1` is `invalid field type` at parse + (§ polkit workspace rules, 2026-07-10 hardware). - Hyprland 0.53 rewrote window rules: `windowrulev2` is a hard error and the old rule-first `float, class:^…$` no longer parses — both surface a red config-error banner on the default desktop. Hyprlang legacy form is diff --git a/modules/home/hyprland.nix b/modules/home/hyprland.nix index 6418eff..9e5cef7 100644 --- a/modules/home/hyprland.nix +++ b/modules/home/hyprland.nix @@ -495,12 +495,12 @@ in # and pinentry-qt (keys.nix default; org.gnupg.pinentry-qt desktop). # workspace current: agent was started on ws1 at login; without this # the dialog opens on that workspace and the current one looks dead - # (hardware: Snapshots menu from ws≠1). stayfocused so it grabs - # attention when it lands. + # (hardware: Snapshots menu from ws≠1). stay_focused (0.55 name; + # was stayfocused) so it grabs attention when it lands. "float 1, match:class (?i)^(hyprpolkitagent|\\.hyprpolkitagent-wrapped)$" "center 1, match:class (?i)^(hyprpolkitagent|\\.hyprpolkitagent-wrapped)$" "workspace current, match:class (?i)^(hyprpolkitagent|\\.hyprpolkitagent-wrapped)$" - "stayfocused 1, match:class (?i)^(hyprpolkitagent|\\.hyprpolkitagent-wrapped)$" + "stay_focused 1, match:class (?i)^(hyprpolkitagent|\\.hyprpolkitagent-wrapped)$" "float 1, match:class (?i)^(pinentry(-qt)?|org\\.gnupg\\.pinentry-qt)$" "center 1, match:class (?i)^(pinentry(-qt)?|org\\.gnupg\\.pinentry-qt)$" "workspace current, match:class (?i)^(pinentry(-qt)?|org\\.gnupg\\.pinentry-qt)$" diff --git a/tools/check-windowrule-syntax.py b/tools/check-windowrule-syntax.py index cc578c3..56f7543 100755 --- a/tools/check-windowrule-syntax.py +++ b/tools/check-windowrule-syntax.py @@ -31,10 +31,14 @@ conf = sys.argv[1] lines = open(conf).read().splitlines() # Effect keywords that in the dead grammar sat directly before the comma. +# Effect keywords that in the dead grammar sat directly before the comma. +# Hyprland 0.55 renames: stayfocused → stay_focused (underscore). Keep the +# old name in the dead-grammar list so a regression to bare `stayfocused,` +# still fails the check. EFFECTS = ( "float", "center", "tile", "pin", "fullscreen", "maximize", "size", "move", "opacity", "workspace", "monitor", "fullscreenstate", - "group", "stayfocused", "pseudo", "immediate", + "group", "stayfocused", "stay_focused", "pseudo", "immediate", ) rule_first = re.compile( r"windowrule\s*=\s*(?:" + "|".join(EFFECTS) + r")\s*,"