Simplify niri size controls: 5% nudges, quarter/half height presets, Ctrl+arrows consume-or-expel

- set-column-width / set-window-height nudges 10% -> 5% (Mod+-/= and
  Mod+Shift+-/=).
- New preset-window-heights { 1/4, 1/2 } in layout.kdl; Mod+Ctrl+Shift+R
  no longer falls back to the width-preset ladder.
- Mod+Ctrl+Left/Right (and H/L) retargeted swap-window-* ->
  consume-or-expel-window-*, matching Mod+brackets; swap-window now unbound.
Validated with niri validate; live via hot-reload.
This commit is contained in:
Frank
2026-10-17 18:15:02 -07:00
parent ae426434bc
commit 541f27f316
2 changed files with 16 additions and 9 deletions
@@ -57,10 +57,12 @@ binds {
Mod+J { focus-window-down; }
// swap-window = window walks sideways, joining/exiting columns it passes
Mod+CTRL+Left { swap-window-left; }
Mod+CTRL+H { swap-window-left; }
Mod+CTRL+Right { swap-window-right; }
Mod+CTRL+L { swap-window-right; }
// Mod+CTRL+arrows retargeted 2026-10-17 to consume-or-expel (was
// swap-window) at Frank's request; swap-window-* now unbound.
Mod+CTRL+Left { consume-or-expel-window-left; }
Mod+CTRL+H { consume-or-expel-window-left; }
Mod+CTRL+Right { consume-or-expel-window-right; }
Mod+CTRL+L { consume-or-expel-window-right; }
Mod+CTRL+Alt+Left { move-column-left; }
Mod+CTRL+Alt+H { move-column-left; }
Mod+CTRL+Alt+Right { move-column-right; }
@@ -141,10 +143,10 @@ binds {
Mod+CTRL+F { expand-column-to-available-width; }
Mod+C { center-column; }
Mod+CTRL+C { center-visible-columns; }
Mod+Minus { set-column-width "-10%"; }
Mod+Equal { set-column-width "+10%"; }
Mod+Shift+Minus { set-window-height "-10%"; }
Mod+Shift+Equal { set-window-height "+10%"; }
Mod+Minus { set-column-width "-5%"; }
Mod+Equal { set-column-width "+5%"; }
Mod+Shift+Minus { set-window-height "-5%"; }
Mod+Shift+Equal { set-window-height "+5%"; }
// ─── Modes ───
@@ -9,7 +9,12 @@
proportion 0.2 // 1/5
proportion 0.4 // 2/5
proportion 0.6 // 3/5
}
}
preset-window-heights {
proportion 0.25 // 1/4
proportion 0.5 // 1/2
}
struts {
}