Skip to content

Automatic tiling for the first window in a workspace in Niri

License

Notifications You must be signed in to change notification settings

Swarsel/niritiling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

niritiling

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.

Usage

NixOS

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 :)

Non-NixOS

  1. Build it: cargo build --release
  2. 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

About

Automatic tiling for the first window in a workspace in Niri

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors