From d8d86aadcb1b99ef731481d0c11bb5a74b2cef99 Mon Sep 17 00:00:00 2001 From: Daniel Fainberg Date: Sun, 12 Jul 2026 07:56:59 +0200 Subject: [PATCH] fix(hyprland): repair master-width, fullscreen, and brightness binds - `$mod+h`/`l` used dwindle's `splitratio`, a no-op in the master layout; switch to `mfact` so they actually resize the master area. - `$mod+f` ran `fullscreen 1` (maximize, bar/gaps kept); swap so `$mod+f` is true fullscreen and `$mod SHIFT+f` maximizes. - add `$mod+space` `swapwithmaster` (dwm-style zoom). - the `XF86MonBrightness` binds called `brightnessctl`, which was never installed; add the package. It writes via the active logind session. Co-Authored-By: Claude Opus 4.8 --- modules/home.nix | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/home.nix b/modules/home.nix index a440f4e..0c94223 100644 --- a/modules/home.nix +++ b/modules/home.nix @@ -136,6 +136,8 @@ in libreoffice grim # screenshot capture (also used by the Print-key binds) slurp # interactive region selector for grim + brightnessctl # backlight control for the XF86MonBrightness binds; writes + # via the active logind session, so no udev rule needed ]; # Canonical XDG user dirs. Only Pictures is actually used (screenshot target, @@ -533,8 +535,9 @@ in "$mod, Return, exec, foot" "$mod, q, killactive" "$mod SHIFT, q, exit" - "$mod, f, fullscreen, 1" - "$mod SHIFT, f, fullscreen, 0" + # fullscreen arg: 0 = true fullscreen, 1 = maximize (keeps bar/gaps). + "$mod, f, fullscreen, 0" + "$mod SHIFT, f, fullscreen, 1" "$mod, w, exec, ${browser}" "$mod, d, exec, fuzzel" "$mod, Backspace, exec, ${powerMenu}" @@ -542,8 +545,11 @@ in "$mod SHIFT, j, layoutmsg, swapnext" "$mod, k, layoutmsg, cycleprev" "$mod SHIFT, k, layoutmsg, swapprev" - "$mod, h, layoutmsg, splitratio -0.05" - "$mod, l, layoutmsg, splitratio +0.05" + # swap focused window with the master (dwm-style "zoom"). + "$mod, space, layoutmsg, swapwithmaster" + # master area width. Master layout uses `mfact`, not dwindle's `splitratio`. + "$mod, h, layoutmsg, mfact -0.05" + "$mod, l, layoutmsg, mfact +0.05" ] ++ ( # Dynamic definitions for viewing workspaces 1 to 9 and moving windows between them. # References physical key codes for robustness with the SHIFT key, e.g. `code:10` instead of `1`.