Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
doc: Add documentation for the new tiling layout mode
  • Loading branch information
Antiz96 committed Apr 21, 2026
commit aad1ff68062fa89ba3637b0462f2096186d05675
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ With `oniri` started in "first window only" mode in your niri configuration file

<https://github.com/user-attachments/assets/d97f1416-a5f0-452c-b2d4-16b6af12631f>

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:

[INSERT VIDEO DEMO]

**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 <https://github.com/Antiz96/oniri/issues/3> for more details).
In the mean time, things *should* still work just fine for most "classic" setups though!

Expand Down
3 changes: 3 additions & 0 deletions doc/man/oniri.1.scd
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ Oniri is a tool that automatically maximizes the *on*ly window of a *niri* works
*-F, --first-only*
Only maximize the first window opened, do no act on the last remaining one.

*-T, --tiling-layout*
Unmaximize the first window when opening a second one, like in a tiling compositor.

*-H, --height-tolerance* <number>
Set the height size tolerance (in pixels) when comparing the window size to the output size to determine if the window is maximized or not (https://github.com/Antiz96/oniri/issues/3).

Expand Down
1 change: 1 addition & 0 deletions res/completions/oniri.bash
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ _oniri() {
local arg="${2}"
local -a opts
opts=('-F --first-only
-T --tiling-layout
-H --height-tolerance
-W --width-tolerance
-h --help
Expand Down
1 change: 1 addition & 0 deletions res/completions/oniri.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
complete -c oniri -f

complete -c oniri -s F -l first-only -d 'Only maximize the first window opened, do no act on the last remaining one'
complete -c oniri -s T -l tiling-layout -d 'Unmaximize the first window when opening a second one, like in a tiling compositor'
complete -c oniri -s H -l height-tolerance -d 'Set the height size tolerance (in pixels) when comparing the window size to the output size to determine if the window is maximized or not'
complete -c oniri -s W -l width-tolerance -d 'Set the width size tolerance (in pixels) when comparing the window size to the output size to determine if the window is maximized or not'
complete -c oniri -s h -l help -d 'Display the help message'
Expand Down
1 change: 1 addition & 0 deletions res/completions/oniri.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
local -a opts
opts=(
{-F,--first-only}'[Only maximize the first window opened, do no act on the last remaining one]'
{-T,--tiling-layout}'[Unmaximize the first window when opening a second one, like in a tiling compositor]'
{-H,--height-tolerance}'[Set the height size tolerance (in pixels) when comparing the window size to the output size to determine if the window is maximized or not]'
{-W,--width-tolerance}'[Set the width size tolerance (in pixels) when comparing the window size to the output size to determine if the window is maximized or not]'
{-h,--help}'[Display the help message]'
Expand Down
3 changes: 3 additions & 0 deletions src/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ pub fn show_help() {
println!(
" -F, --first-only Only maximize the first opened window, do not act on the last remaining one"
);
println!(
" -T, --tiling-layout Unmaximize the first window when opening a second one, like in a tiling compositor"
);
println!(
" -H, --height-tolerance Set the height size tolerance (in pixels) when comparing the window size to the output size to determine if the window is maximized or not" // https://github.com/Antiz96/oniri/issues/3
);
Expand Down