feat(tazjin/niri-reap): add a workspace compacting tool

I don't use workspaces and don't have them bound to anything in my Niri
configuration. However, when an external screen is unplugged, its workspace
(and windows) move to one of the remaining outputs.

This adds a tool that makes the windows available again by "reaping" them from
the other workspaces and moving them to the current one.

For starters I'll bind this to a key and see how it works in practice.

Change-Id: I18b2d60e93c8397dd637cdc426b4e46af5725558
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12451
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
This commit is contained in:
Vincent Ambo 2024-09-07 18:52:25 +03:00 committed by tazjin
parent 8206f68aea
commit 158ba0d607
5 changed files with 201 additions and 0 deletions

View file

@ -0,0 +1,13 @@
{ depot, pkgs, ... }:
pkgs.rustPlatform.buildRustPackage {
name = "niri-reap";
src = depot.third_party.gitignoreSource ./.;
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"niri-ipc-0.1.8" = "sha256:0wyl0mpk9hg67bvj7q120wanrdqn3ls9zv9vjv9yxp11kan5pi1q";
};
};
}