the runtime your coding agents live on
Rust agentagent-orchestrationaiai-agentsclaude-codeclicodexcoding-agentsdeveloper-toolsdevtoolsmultiplexerrustterminalterminal-multiplexerterminal-uitmuxtuiworkspace-manager
docs: document custom command keybindings
Ogulcan Celik70d217a2a8e2
diff --git a/CONFIGURATION.md b/CONFIGURATION.mdindex d12105542..bdea9919e 100644--- a/CONFIGURATION.md+++ b/CONFIGURATION.md@@ -139,6 +139,44 @@ focus_pane_right = "alt+l"| `resize_mode` | `r` | enter or leave resize mode || `toggle_sidebar` | `b` | collapse or expand the sidebar |+### custom command keybindings++Use `[[keys.command]]` to bind a prefix-mode key to a command. Press the prefix key, then the configured key.++```toml+[[keys.command]]+key = "g"+type = "pane"+command = "lazygit"+```++`type` is optional and defaults to `shell`.++| type | behavior |+|------|----------|+| `shell` | run the command detached in the background |+| `pane` | open a temporary zoomed pane, run the command there, then close the pane when the command exits |++Commands run through `/bin/sh -lc`. Herdr sets the command working directory to the active pane cwd when available and provides context through environment variables:++| variable | value |+|----------|-------|+| `HERDR_SOCKET_PATH` | active herdr socket path |+| `HERDR_BIN_PATH` | current herdr binary path |+| `HERDR_ACTIVE_WORKSPACE_ID` | active workspace id |+| `HERDR_ACTIVE_TAB_ID` | active tab id |+| `HERDR_ACTIVE_PANE_ID` | focused pane id |+| `HERDR_ACTIVE_PANE_CWD` | focused pane cwd |++Example detached helper:++```toml+[[keys.command]]+key = "shift+g"+type = "shell"+command = "notify-send herdr 'custom command ran'"+```+## themeherdr ships with 10 built-in color themes. set one in config:diff --git a/README.md b/README.mdindex efeeb85fa..f25bd300a 100644--- a/README.md+++ b/README.md@@ -192,6 +192,15 @@ press `ctrl+b` to enter navigate mode.resize mode: `h`/`l` resize width, `j`/`k` resize height, `esc` exit.+custom command keybindings can launch detached shell helpers or temporary panes from prefix mode:++```toml+[[keys.command]]+key = "g"+type = "pane" # "shell" or "pane"+command = "lazygit"+```+mouse is supported throughout. full reference: [`CONFIGURATION.md`](./CONFIGURATION.md).## configurationdiff --git a/src/main.rs b/src/main.rsindex c35a40846..2b8c76b68 100644--- a/src/main.rs+++ b/src/main.rs@@ -103,6 +103,14 @@ const DEFAULT_CONFIG: &str = r##"# herdr configuration# resize_mode = "r"# toggle_sidebar = "b"+# Custom prefix-mode commands. Press prefix, then the configured key.+# type = "shell" runs detached in the background.+# type = "pane" opens a temporary pane and closes it when the command exits.+# [[keys.command]]+# key = "g"+# type = "pane"+# command = "lazygit"+[ui]# Sidebar width (auto-scaled based on workspace names, this sets the default)# sidebar_width = 26