Files
command-center/omp-docs/tools/niri/tips.md
T
Frank ac1608e71f docs(niri): fold AGENTS.md overwrite into niri KB section
The working tree had replaced the operating contract in AGENTS.md with a
niri config-reload + keybinding-constraints note. Content relocated to its
proper home: tips.md 3-config-reload (SIGHUP footgun, load-config-file) and
key-bindings-syntax.md constraints section. AGENTS.md restored from HEAD.
2026-09-09 16:19:02 -07:00

1.6 KiB

type, title, description, tags, verified
type title description tags verified
howto Niri Tips and Gotchas Practical tips for working with niri — Mod key behavior, shell expansion, config reload, vim keys, and programmatic invocation.
niri
tips
gotchas
2026-08-28

Helpful Tips

1. Mod key

Use Mod instead of Super for configs that work both on TTY and in nested windows.

2. No shell expansion in spawn

spawn does not expand $VAR or ~. Use spawn-sh or wrap in sh -c.

3. Config reload

Do NOT send SIGHUP to the niri process (kill -s SIGHUP $(pgrep -f 'niri --session')) — it causes a full session logout/restart instead of a live config reload.

Correct reload options, in order of preference:

  • niri msg action load-config-file — live reload without disrupting the session (preferred).
  • Log out and back in (safe, guaranteed clean reload).
  • Let the user decide when to reload; agents should modify config files without auto-reloading.

Niri reads ~/.config/niri/config.kdl (or config.kdl relative to its CWD). Split config lives in ~/.config/niri/cfg/ — each .kdl file is included from the main config, so a reload picks up edits to any included module.

4. Alternative navigation

Vim-like keys (H/J/K/L) are bound by default alongside arrow keys.

5. Programmatic invocation

Every action can be invoked via niri msg action <action-name>.

6. Find XKB keys

Use wev to discover key names.