Oniri is a tool that automatically maximizes the only window of a niri workspace.
With oniri started in your niri configuration file (spawn-at-startup "oniri" in ~/.config/niri/config.kdl), the only window of a niri workspace gets automatically maximized, whether it's the first opened window or the last remaining one after all the other windows got closed:
oniri.mp4
With oniri started in "first window only" mode in your niri configuration file (spawn-sh-at-startup "oniri --first-only" in ~/.config/niri/config.kdl), only the first opened window of a niri workspace gets automatically maximized (the last remaining window after all the other windows got closed is not automatically maximized):
oniri-first-only.mp4
Note: Due to current limitations of the niri IPC, "buggy" behaviors (e.g. window not being correctly maximized) may be expected in specific setups / edgy cases. Those limitations should hopefully be addressed on the niri IPC side at some point, allowing to fix those eventual "buggy" behaviors once and for all (see #3 for more details).
In the mean time, things should still work just fine for most "classic" setups though!
A pre-compiled binary for the x86_64 (amd64) architecture is distributed as a release asset (oniri-<version>-amd64).
You can download it, make it executable, rename it oniri and copy it somewhere in your $PATH.
Requires rustup and gcc.
git clone https://github.com/Antiz96/oniri.git
cd oniri
cargo build --releaseThe built binary will be located at ./target/release/oniri.
You can copy it somewhere in your $PATH.
The man page can be generated with scdoc:
scdoc < doc/man/oniri.1.scd > doc/man/oniri.1There are also shell completions available in the res/completions/ directory.
Add the following to your niri configuration file (~/.config/niri/config.kdl):
spawn-at-startup "oniri"
See oniri --help or the oniri(1) man page for a list of options & arguments that can be passed.
Note that passing options / arguments requires to use 'spawn**-sh-**at-startup' in the niri configuration file.
See oniri --help and the oniri(1) man page.
See the contributing guidelines.
Oniri is licensed under the GPL-3.0 license (or any later version of that license).