herdr: Add tmux layouts and numeric pane picker - #20
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add Herdr tmux layouts and numeric pane selection
Add a small
herdr-tmuxcommand for the tmux interactions missing from stockHerdr, then bind those commands through the managed local configuration. The
result preserves Herdr as the terminal owner while restoring even pane layouts
and fast
prefix+qpane selection.Rationale
Directional navigation works for nearby panes, but it becomes cumbersome in
dense or asymmetric layouts. Rebuilding tmux-style behavior through Herdr's
typed socket API keeps pane identity, terminal processes, and scrollback under
Herdr's control and avoids maintaining a fork or routing focus through repeated
directional CLI calls.
The helper remains a narrow local command. Plugin packaging, fuzzy search,
multi-digit selection, and a CLI neighbor-graph fallback remain deferred.
Behavior flow
Pane layout behavior
The even-layout commands rearrange existing panes rather than replacing their
terminals. A session-scoped lock prevents overlapping layout mutations, and a
failed rebuild attempts to restore the exported layout before reporting the
error.
Numeric pane selection
The popup lists up to ten panes in geometric reading order and marks the active
pane. Descriptions prefer pane labels and agent/title metadata, then fall back
to the CWD basename or pane ID. Escape, invalid input, and the 1.5-second timeout
cancel without changing focus; one-pane tabs and same-pane selections are clean
no-ops.
The selected pane is fetched again immediately before
pane.focus. If it wasclosed or moved outside the originating tab, the command exits without
redirecting focus elsewhere.
Configuration and packaging
The Rust crate now lives separately under
herdr-tmux, with package metadata,local
justrecipes, and focused socket/UI tests. The managed Herdr config addsthe layout and picker bindings, a temporary pane-command demo, and bottom-right
in-app notifications.
Key Changes
absolute focus, moves, zoom, and notifications.
recovery and focus preservation.
cancellation, metadata fallback, and stale-target protection.
prefix+=,prefix+Shift+-, andprefix+qin themanaged Herdr configuration.
its local installation and behavior.