Skip to content

Ship herdr alongside tmux - #6406

Open
dhh wants to merge 3 commits into
quattrofrom
herdr
Open

Ship herdr alongside tmux#6406
dhh wants to merge 3 commits into
quattrofrom
herdr

Conversation

@dhh

@dhh dhh commented Jul 27, 2026

Copy link
Copy Markdown
Member

herdr is a terminal workspace manager built for AI coding agents. This installs it and ships a config that lands as close to config/tmux/tmux.conf as herdr allows, so the muscle memory carries over.

Keybindings

tmux sessions map to herdr workspaces, windows to tabs, panes to panes. herdr accepts arrays of bindings per action, so every tmux key that had both a prefix form and a direct -n form keeps both — close_pane = ["prefix+x", "alt+esc"], switch_tab = ["prefix+1..9", "alt+1..9"], and so on.

Two keys had to move because tmux won the collision: rename_pane to prefix+shift+o (herdr's default prefix+shift+p is our previous-session) and resize mode to prefix+ctrl+arrows (herdr's default prefix+r is our rename-window). Directional resize on C-M-S-arrows runs through custom commands, since herdr only offers a resize mode; --amount 0.03 is a ratio delta that works out to roughly resize-pane -L 5.

Verified empirically rather than guessed: split_vertical is the side-by-side split, so prefix h and prefix v keep the meanings they have in our tmux config.

Tabs

herdr draws the active tab as panel_bg-colored text on an accent-colored fill. Under the terminal theme panel_bg is a dark grey, which is unreadable on the accent. Setting panel_bg = "black" gives black-on-blue — the same pair as our status-left "#[fg=black,bg=blue,bold]". The tab bar background becomes ANSI black rather than fully transparent as a result; panel_bg drives both and there is no separate token.

What doesn't carry over

  • A secondary prefix. herdr takes one, so C-b is gone.
  • M-S-Left/Right swap-window. No herdr action and no tab move CLI.
  • Vi copy-mode keys. herdr's copy mode has its own.
  • history-limit. herdr caps scrollback by bytes instead.

The alert hooks are moot now that bdcdfeb removed that system.

Dev layouts

hdl, hds, hdlm, hsl mirror the tmux ones, keyed off the HERDR_PANE_ID/HERDR_TAB_ID/HERDR_WORKSPACE_ID that herdr exports into every pane. Every split passes --no-focus, so focus stays on the editor pane — which also sidesteps the bug in tdl, where the closing select-pane -t "$opencode_pane" targets a variable that function never sets. hsl tiles into a real grid because herdr has no select-layout tiled.

Testing

  • hdl 'echo AI1' 'echo AI2' in a scratch session produced the same geometry as tdl: editor 94 cols, AI column 40 cols split into two stacked panes, terminal strip 6 rows across the bottom, tab renamed to the directory. hsl 4 produced a clean 2x2 grid.
  • herdr config check passes; every binding string is validated by herdr itself (it rejects unknown actions and unparseable keys).
  • ./test/cli passes. ./test/shell fails only on omarchy-iso checkout is available for installer coverage, which needs a sibling checkout this machine doesn't have.

Existing installs pick both up through the migration, which seeds the config only when the user doesn't already have one; omarchy refresh herdr stays the explicit way to take the shipped defaults.

🤖 Generated with Claude Code

dhh and others added 2 commits July 27, 2026 15:56
Installs herdr through the mise shim, ships the matching config as an
Omarchy default, and adds the usual refresh/restart pair. The keybindings
map tmux sessions to workspaces, windows to tabs, and keep both the prefix
and direct bindings from config/tmux/tmux.conf.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
hdl, hds, hdlm, and hsl drive herdr through its socket API instead of
tmux. hsl tiles into a real grid since herdr has no select-layout tiled.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 27, 2026 22:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI review requested due to automatic review settings July 27, 2026 23:01

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants