niri: working minimize via declared stash workspace #1
Reference in New Issue
Block a user
Delete Branch "feat/niri-minimize"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Mod+MandMod+Shift+Malready existed inniri/config.kdl, referencing a"minimized"workspace that was never declared. niri silently ignoresactions targeting an undeclared named workspace — and
niri validatepassesanyway, because the name is just a string to the parser. Both binds had always
been no-ops.
This declares the stash and builds the restore half that was never there.
What you get
Mod+MMod+Shift+MVerified niri constraints
Tested against niri 26.04 in a nested instance rather than inferred from docs:
niri validatestill passes.(
move-workspace-to-index --referencerefuses;open-on-outputto a fakeoutput doesn't dislodge it). This is why
Mod+1..9are offset by +1 —the offset is exact and stable, not a guess.
move-window-to-workspacedefaults tofocus=true, which drags focus intothe stash — the opposite of minimizing. Hence
focus=falseonMod+M.Notes
exists to go stale.
minimizedpill in waybar is permanent by design — it's the only cue thatwindows are stashed.
workspaces underneath it, so
main()re-reads state after the pick ratherthan trusting anything captured before wofi opened (
05cc026).Testing
python3 scripts/tests/window-restore.test.py— 21/21, pure logic, no compositor.niri validate -c niri/config.kdlpasses.Mod+M, picker round-trip, empty-stashtoast, offset binds) verified by hand — no
wtype/ydotoolon this box.Spec:
docs/superpowers/specs/2026-07-16-niri-minimize-design.mdPlan:
docs/superpowers/plans/2026-07-16-niri-minimize.md