- Notifications
You must be signed in to change notification settings - Fork0
Dynamic Scratchpad Management for Niri
License
argosnothing/niri-scratchpad-rs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Dynamically assign windows as scratchpads against a numerical register.
niri-scratchpad ( as of version 1.0 ) is a running process that lives in memory.
spawn-sh-at-startup"niri-scratchpad daemon"
You will need a static workspace calledstash declared somewhere in you niri config. This will be where all stashed scratchpads live.
workspace"stash" { open-on-output"DP-1"// Your output name, or just omit this property entirely}
For binding to a keybind you would do:
binds { Mod+Q { spawn"niri-scratchpad""create""1"; }}
- This will take the currently focused window and bind it to niri-scratchpad register 1.
- Pressing this keybind again will toggle stashing and unstashing the window when this command is reran.
A separate command is available for removing a scratchpad at a particular register.
binds { Mod+Ctrl+Q { spawn"niri-scratchpad""delete""1"; }}
- Delete scratchpad at register 1
- This register will now be available again for the
niri-scratchpad create 1command
niri-scratchpad daemonStart the niri-scratchpad daemon ( I advise to have niri run this command on startup )niri-scratchpad create <scratchpad_number>- Info: createOR summon a scratchpad window at
<scratchpad_number> - options
-o, --output [title, appid]--as-float
- Info: createOR summon a scratchpad window at
niri-scratchpad delete <scratchpad_number>- Info: delete a scratchpad at
<scratchpad_number>.
this deleted scratchpad will have its window summoned to curent workspace - options
-o, --output [title, appid]
- Info: delete a scratchpad at
niri-scratchpad get <scratchpad_number> [title, appid]help
--output provides the property to standard out after command execution.--as-float during new scratchpad registration to a window, also put that window into floating mode.
It's just a rust binary:
forx86_64 I provide the executable directly. Download it, put it somewhere atchmod +x niri-scratchpad. Then run it with the options to use it.
Dependencies:
rustcargoniri_ipcserdeclap
inputs{niri-scratchpad.url="github:argosnothing/niri-scratchpad";}
To put it in your path on nix:
environment.systemPackages=[inputs.niri-scratchpad.packages.${pkgs.system}.default];
- Static scratchpads you can bind with a spawn commandgvolpe
- niri scratchpad discussion
I have anexperimental branch that uses adraft niri PR i've been working on.
I'm daily driving this as it gives me a full scratchpad implementation that hides the workspace where my stashed scratchpads live. This PR should also work with other implementations as long as you make sure you stashed workspace also hashidden true in it and you doniri msg workspaces-with-hidden instead of justniri msg workspaces. This implementation does not advertise hidden workspaces to event stream, and only updates state with hidden workspaces for that specific ipc action, so your bars and widgets that show workspaces will not show those hidden workspaces.
If you plan on using this please let me know if you run into any bugs, any feedback is welcome!
About
Dynamic Scratchpad Management for Niri
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.