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
With oniri started in "tiling layout" mode in your niri configuration file (spawn-sh-at-startup "oniri --tiling-layout" in ~/.config/niri/config.kdl), the first window gets unmaximized when a second one is opened, mimicking the behavior of a tiling compositor:
oniri-tiling-layout.mp4
See oniri --help and the oniri(1) man page for additional options and features.
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 (statically linked) pre-compiled binary for the x86_64 (amd64) architecture is distributed as a release asset (oniri-<release_version>-x86_64).
The pre-compiled binary can be reproduced from source (in the sense of reproducible builds).
The build environment is created and fully documented via repro-env, and is tracked in this repository.
To reproduce the pre-compiled binary for a given release, install repro-env and run the following:
git clone https://github.com/Antiz96/oniri.git
cd oniri
git checkout <tag> # Where <tag> is the git tag for the targeted release, e.g. "v1.2.2"
repro-env build -- cargo build --release --target x86_64-unknown-linux-musl
sha256sum target/x86_64-unknown-linux-musl/release/oniriThen, compare the sha256 hash of the built binary to the one of the pre-compiled release binary (which is also recorded in the oniri-<release_version>-x86_64.sha256 file in the release assets). Both hashes should be equal, indicating that the binary has been successfully reproduced.
Each release assets are also cryptographically signed, with the detached signature for each asset distributed as <asset_name>.asc (see the MAINTAINERS.md file for a list of keys expected to emit signatures).
git clone https://github.com/Antiz96/oniri.git
cd oniri
cargo build --releaseThe built binary will be located at ./target/release/oniri.
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).