Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 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.

Two more features:

  • It is possible to dynamically resize manually resized columns using the --resize-columns arg - this only works when exactly two columns are open in a workspace (i.e. when you resize one of the two windows the other resizes accordingly).
  • you can specify a display's "show at once" columns using --columns "<make> <model> <serial>"=<N>. If set at one, it will make it so that all new windows join into one stack (close to a "vertical scrolling" behavior)

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

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages