niri: working minimize via declared stash workspace
Mod+M referenced an undeclared 'minimized' workspace, so it silently did nothing. Declare it, add focus=false so focus does not follow the window into the stash, and point Mod+Shift+M at the restore picker. niri pins declared named workspaces to index 1 and will not move them, so Mod+1..9 are offset by one.
This commit is contained in:
@@ -55,6 +55,7 @@ ln -sf "$(pwd)/scripts/screenshot.sh" ~/.local/bin/screenshot
|
|||||||
ln -sf "$(pwd)/scripts/volume.sh" ~/.local/bin/volume
|
ln -sf "$(pwd)/scripts/volume.sh" ~/.local/bin/volume
|
||||||
ln -sf "$(pwd)/scripts/gamemode-session.sh" ~/.local/bin/gamemode-session
|
ln -sf "$(pwd)/scripts/gamemode-session.sh" ~/.local/bin/gamemode-session
|
||||||
ln -sf "$(pwd)/scripts/gamemode-watch.py" ~/.local/bin/gamemode-watch
|
ln -sf "$(pwd)/scripts/gamemode-watch.py" ~/.local/bin/gamemode-watch
|
||||||
|
ln -sf "$(pwd)/scripts/window-restore.py" ~/.local/bin/window-restore
|
||||||
|
|
||||||
echo "==> Enabling systemd user services"
|
echo "==> Enabling systemd user services"
|
||||||
mkdir -p ~/.config/systemd/user
|
mkdir -p ~/.config/systemd/user
|
||||||
|
|||||||
+31
-20
@@ -47,6 +47,13 @@ spawn-at-startup "wlsunset" "-l" "49.2" "-L" "-123.1"
|
|||||||
spawn-at-startup "xwayland-satellite"
|
spawn-at-startup "xwayland-satellite"
|
||||||
spawn-at-startup "gamemode-watch"
|
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 {
|
binds {
|
||||||
Mod+Q repeat=false { close-window; }
|
Mod+Q repeat=false { close-window; }
|
||||||
Mod+F { fullscreen-window; }
|
Mod+F { fullscreen-window; }
|
||||||
@@ -79,30 +86,34 @@ binds {
|
|||||||
Mod+Shift+Down { move-window-down; }
|
Mod+Shift+Down { move-window-down; }
|
||||||
Mod+Shift+Up { move-window-up; }
|
Mod+Shift+Up { move-window-up; }
|
||||||
|
|
||||||
Mod+1 { focus-workspace 1; }
|
// +1 offset: the "minimized" workspace is always index 1 (see the
|
||||||
Mod+2 { focus-workspace 2; }
|
// declaration above), so the first real workspace is index 2.
|
||||||
Mod+3 { focus-workspace 3; }
|
Mod+1 { focus-workspace 2; }
|
||||||
Mod+4 { focus-workspace 4; }
|
Mod+2 { focus-workspace 3; }
|
||||||
Mod+5 { focus-workspace 5; }
|
Mod+3 { focus-workspace 4; }
|
||||||
Mod+6 { focus-workspace 6; }
|
Mod+4 { focus-workspace 5; }
|
||||||
Mod+7 { focus-workspace 7; }
|
Mod+5 { focus-workspace 6; }
|
||||||
Mod+8 { focus-workspace 8; }
|
Mod+6 { focus-workspace 7; }
|
||||||
Mod+9 { focus-workspace 9; }
|
Mod+7 { focus-workspace 8; }
|
||||||
|
Mod+8 { focus-workspace 9; }
|
||||||
|
Mod+9 { focus-workspace 10; }
|
||||||
|
|
||||||
Mod+Shift+1 { move-window-to-workspace 1; }
|
Mod+Shift+1 { move-window-to-workspace 2; }
|
||||||
Mod+Shift+2 { move-window-to-workspace 2; }
|
Mod+Shift+2 { move-window-to-workspace 3; }
|
||||||
Mod+Shift+3 { move-window-to-workspace 3; }
|
Mod+Shift+3 { move-window-to-workspace 4; }
|
||||||
Mod+Shift+4 { move-window-to-workspace 4; }
|
Mod+Shift+4 { move-window-to-workspace 5; }
|
||||||
Mod+Shift+5 { move-window-to-workspace 5; }
|
Mod+Shift+5 { move-window-to-workspace 6; }
|
||||||
Mod+Shift+6 { move-window-to-workspace 6; }
|
Mod+Shift+6 { move-window-to-workspace 7; }
|
||||||
Mod+Shift+7 { move-window-to-workspace 7; }
|
Mod+Shift+7 { move-window-to-workspace 8; }
|
||||||
Mod+Shift+8 { move-window-to-workspace 8; }
|
Mod+Shift+8 { move-window-to-workspace 9; }
|
||||||
Mod+Shift+9 { move-window-to-workspace 9; }
|
Mod+Shift+9 { move-window-to-workspace 10; }
|
||||||
|
|
||||||
Mod+Print { spawn "screenshot"; }
|
Mod+Print { spawn "screenshot"; }
|
||||||
|
|
||||||
Mod+M { move-window-to-workspace "minimized"; }
|
// focus=false or focus follows the window into the stash — the opposite of
|
||||||
Mod+Shift+M { focus-workspace "minimized"; }
|
// minimizing.
|
||||||
|
Mod+M { move-window-to-workspace "minimized" focus=false; }
|
||||||
|
Mod+Shift+M { spawn "window-restore"; }
|
||||||
|
|
||||||
Mod+Shift+E { spawn "hyprlock"; }
|
Mod+Shift+E { spawn "hyprlock"; }
|
||||||
Mod+Shift+P { spawn "powermenu"; }
|
Mod+Shift+P { spawn "powermenu"; }
|
||||||
|
|||||||
Reference in New Issue
Block a user