From ac1608e71fc493382139cc9ec324b86cb921a5dd Mon Sep 17 00:00:00 2001 From: Frank Date: Wed, 9 Sep 2026 16:19:02 -0700 Subject: [PATCH] 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. --- omp-docs/tools/niri/key-bindings-syntax.md | 6 ++++++ omp-docs/tools/niri/tips.md | 9 ++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/omp-docs/tools/niri/key-bindings-syntax.md b/omp-docs/tools/niri/key-bindings-syntax.md index 74527f5..020a967 100644 --- a/omp-docs/tools/niri/key-bindings-syntax.md +++ b/omp-docs/tools/niri/key-bindings-syntax.md @@ -54,6 +54,12 @@ wev Shifted keys require Shift + the unshifted key (for example, `Mod+Shift+Comma` for `<` on US QWERTY). +## Constraints + +- One action per keybind. Each `{ ... }` block holds exactly one action; multiple actions like `{ move-window-up; consume-or-expel-window-up; }` are rejected at parse time. +- No duplicate keys. The same key combo (e.g. `Mod+CTRL+Left`) can only appear once in `binds {}`. Adding a new binding for an existing key causes a parse error. +- Valid consume/expel actions: `consume-or-expel-window-left`, `consume-or-expel-window-right`, and `expel-window-from-column`. The `consume-or-expel-window-up`/`-down` variants do NOT exist. + ## Related * [Default Key Bindings](/tools/niri/default-bindings.md) — What niri ships with out of the box diff --git a/omp-docs/tools/niri/tips.md b/omp-docs/tools/niri/tips.md index 8d9a9db..3a8fcf9 100644 --- a/omp-docs/tools/niri/tips.md +++ b/omp-docs/tools/niri/tips.md @@ -21,7 +21,14 @@ Use `Mod` instead of `Super` for configs that work both on TTY and in nested win ## 3. Config reload -niri supports live-reloading config without restart. +**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 `include`d from the main config, so a reload picks up edits to any included module. ## 4. Alternative navigation