Niri
Configuration is stored in ~/.config/niri. The main file is config.kdl, which includes files from the config/ directory:
env.kdl- environment variablesinput.kdl- keyboard layout, touchpad, and mouse settingsoutput.kdl- display and resolution setuplayout.kdl- gaps, column width, and border settingsautostart.kdl- startup processeskeybinds.kdl- keybindings for compositor actions and shell controls
Autostart
The shell daemon and clipboard history are launched from config/autostart.kdl:
spawn-at-startup "bash" "-c" "wl-paste --type text --watch cliphist store"
spawn-at-startup "bash" "-c" "wl-paste --type image --watch cliphist store"
spawn-at-startup "serpantinumd" "start"
serpantinumd start also starts the audio engine.
Keybindings
Shell overlays and controls are bound in config/keybinds.kdl using spawn "serpantinum" "msg" "toggle" "<module>":
launcher- application launcher (Mod+D)system- system control panel (Mod+B)clipboard- clipboard history (Mod+C)music- media player (Mod+M)wallpaper- wallpaper selector (Mod+W)calendar- calendar popout (Mod+S)network- network connections (Mod+N)volume- audio popout (Mod+V)settings- cheat sheet for keybindings (Mod+H)
Workspace switching is routed through the shell to update bar indicators:
Mod+1 { spawn "serpantinum" "msg" "workspace" "1"; }
Mod+2 { spawn "serpantinum" "msg" "workspace" "2"; }
// ...
Mod+Shift+1 { spawn "serpantinum" "msg" "workspace" "1" "move"; }
Quick utility actions:
- Lock screen:
Mod+L { spawn "serpantinum" "lock"; } - Reload shell:
Mod+R { spawn "serpantinum" "reload"; } - Bar autohide:
Mod+A { spawn "serpantinum" "msg" "bar" "autohide"; } - Screenshots:
Print { spawn "serpantinum" "screenshot"; }(add--editor--full) - Brightness:
XF86MonBrightnessDownandXF86MonBrightnessUp - Volume:
XF86AudioLowerVolume,XF86AudioRaiseVolume, andXF86AudioMute