niri: native scratchpad via patched niri-scratchpad package
Replace the workspace-based minimize (declared 'minimized' workspace + +1 offset + window-restore.py) with a native Sway-style scratchpad built into niri. Ships as niri-patches/0001-scratchpad.patch + a niri-scratchpad PKGBUILD. Mod+M stashes; Mod+Shift+M shows/toggles/cycles. Mod+1..9 no longer offset. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
+20
-31
@@ -47,13 +47,6 @@ spawn-at-startup "wlsunset" "-l" "49.2" "-L" "-123.1"
|
||||
spawn-at-startup "xwayland-satellite"
|
||||
spawn-at-startup "gamemode-watch"
|
||||
|
||||
// Stash for minimized windows (Mod+M). niri pins declared named workspaces to
|
||||
// index 1 and refuses to move them, so real workspaces start at index 2 — hence
|
||||
// the +1 offset on the Mod+1..9 binds below. Do not remove this declaration:
|
||||
// without it the "minimized" binds silently do nothing (niri validate still
|
||||
// passes, because the name is just a string to the parser).
|
||||
workspace "minimized"
|
||||
|
||||
binds {
|
||||
Mod+Q repeat=false { close-window; }
|
||||
Mod+F { fullscreen-window; }
|
||||
@@ -86,34 +79,30 @@ binds {
|
||||
Mod+Shift+Down { move-window-down; }
|
||||
Mod+Shift+Up { move-window-up; }
|
||||
|
||||
// +1 offset: the "minimized" workspace is always index 1 (see the
|
||||
// declaration above), so the first real workspace is index 2.
|
||||
Mod+1 { focus-workspace 2; }
|
||||
Mod+2 { focus-workspace 3; }
|
||||
Mod+3 { focus-workspace 4; }
|
||||
Mod+4 { focus-workspace 5; }
|
||||
Mod+5 { focus-workspace 6; }
|
||||
Mod+6 { focus-workspace 7; }
|
||||
Mod+7 { focus-workspace 8; }
|
||||
Mod+8 { focus-workspace 9; }
|
||||
Mod+9 { focus-workspace 10; }
|
||||
Mod+1 { focus-workspace 1; }
|
||||
Mod+2 { focus-workspace 2; }
|
||||
Mod+3 { focus-workspace 3; }
|
||||
Mod+4 { focus-workspace 4; }
|
||||
Mod+5 { focus-workspace 5; }
|
||||
Mod+6 { focus-workspace 6; }
|
||||
Mod+7 { focus-workspace 7; }
|
||||
Mod+8 { focus-workspace 8; }
|
||||
Mod+9 { focus-workspace 9; }
|
||||
|
||||
Mod+Shift+1 { move-window-to-workspace 2; }
|
||||
Mod+Shift+2 { move-window-to-workspace 3; }
|
||||
Mod+Shift+3 { move-window-to-workspace 4; }
|
||||
Mod+Shift+4 { move-window-to-workspace 5; }
|
||||
Mod+Shift+5 { move-window-to-workspace 6; }
|
||||
Mod+Shift+6 { move-window-to-workspace 7; }
|
||||
Mod+Shift+7 { move-window-to-workspace 8; }
|
||||
Mod+Shift+8 { move-window-to-workspace 9; }
|
||||
Mod+Shift+9 { move-window-to-workspace 10; }
|
||||
Mod+Shift+1 { move-window-to-workspace 1; }
|
||||
Mod+Shift+2 { move-window-to-workspace 2; }
|
||||
Mod+Shift+3 { move-window-to-workspace 3; }
|
||||
Mod+Shift+4 { move-window-to-workspace 4; }
|
||||
Mod+Shift+5 { move-window-to-workspace 5; }
|
||||
Mod+Shift+6 { move-window-to-workspace 6; }
|
||||
Mod+Shift+7 { move-window-to-workspace 7; }
|
||||
Mod+Shift+8 { move-window-to-workspace 8; }
|
||||
Mod+Shift+9 { move-window-to-workspace 9; }
|
||||
|
||||
Mod+Print { spawn "screenshot"; }
|
||||
|
||||
// focus=false is required here — otherwise focus follows the window into
|
||||
// the stash, the opposite of minimizing.
|
||||
Mod+M { move-window-to-workspace "minimized" focus=false; }
|
||||
Mod+Shift+M { spawn "window-restore"; }
|
||||
Mod+M { move-window-to-scratchpad; }
|
||||
Mod+Shift+M { scratchpad-show; }
|
||||
|
||||
Mod+Shift+E { spawn "hyprlock"; }
|
||||
Mod+Shift+P { spawn "powermenu"; }
|
||||
|
||||
Reference in New Issue
Block a user