This is utility for niri compositor useful in setups, where you may have several outputs connected to your PC, but wants to have only once active output at a time.
You can use cargo
to build this project
This project has flake files which allows you to build it as NIX package with
nix build
niri-single-output [OPTIONS] <COMMAND>
test
Check niri availabilityinit
Init outputs at startupnext
Switch to next output
-p
,--path
<PATH>
Path to niri socket-s
,--state
<STATE>
Path to niri socket-h
,--help
Print help (see a summary with '-h')-V
,--version
Print version
This utility attended to be use from niri configuration.
Spawn the init
command at startup:
spawn-at-startup "niri-single-output" "init"
Add keybinding to switch to next output:
binds {
Mod+O { spawn "niri-single-output" "next"; }
}
Usage withing Shved's NixOS configuration introduced here for gaming PC.