niritiling-demo.mp4
niritiling is a simple automatic tiling utility for the first window in a workspace in Niri.
tl;dr: it makes sure that if there is only a single non-floating window in a workspace, that window will take up the whole space.
When a workspace has a single tiled (=non-floating) window, it is automatically maximized. When a second tiled window is opened in that workspace, the first reverts back to its previous width. When only one window remains in a workspace after closing another, that triggers maximization again. Floating windows are ignored in the count.
Add niritiling to your flake.nix' inputs:
{ inputs.niritiling.url = "github:Swarsel/niritiling"; }Then, inside a module:
{ inputs, ... }: { imports = [ inputs.niritiling.nixosModules.default ]; config.services.niritiling.enable = true; }If you are not on flakes, I trust you know how to set this up :)
- Build it:
cargo build --release - Setup the service:
[Unit] After=graphical-session.target Description=First-window tiling service for Niri PartOf=graphical-session.target [Service] ExecStart=<niritiling path> Restart=on-failure RestartSec=2 [Install] WantedBy=graphical-session.target