Skip to content

herdr: port the remaining tmux panes-layer actions (break-out, sticky shove, grab, main layouts) #15

Description

@kahl-dev

Context

The tmux Prefix+v panes layer was partially ported to herdr in 3f9edd2: a popup pseudo-key-table (layout-menu.sh) dispatching to grid-layout.sh (grids 1/2/3/t). Several layer actions turned out obsolete in herdr (splits, zoom, kill are top-level keys there), but a few real capabilities are still missing.

Missing actions, sorted by effort

tmux key What it did herdr feasibility
b break-out detach pane into its own window trivialherdr pane move <id> --new-tab exists; one menu key
h/j/k/l shove move pane directionally, sticky/repeatable easyherdr pane swap --direction exists; the popup can loop read -rsn1 until Esc for stickiness
g/G grab fzf picker: pull a pane from elsewhere into this tab mediumpane list + fzf + pane move; tmux/scripts/tmux-grab-pane.sh is the template
m/M main layouts one large pane + stacked rest medium — variant in grid-layout.sh (anchor keeps e.g. 60%, remainder stacked)
{/}/s/r index swaps, numbered swap, rotate unclear value — no herdr primitive, only simulatable via swap chains; defer

Proposed scope

Phase 1 (covers ~80% of the felt gap):

  • b in the layout menu -> pane move --new-tab
  • sticky shove mode: h/j/k/l repeat until Esc/q, each key -> pane swap --direction

Phase 2 (on demand):

  • grab picker (fzf over pane list across workspaces, pane move into current tab)
  • m/M main-vertical/-horizontal in grid-layout.sh

Out of scope: {/}/s/r (revisit only if actually missed), U/lit-info (belongs to the apps menu, not layouts).

Implementation notes

  • All of phase 1 sits on documented CLI primitives; no socket-API hand-rolling needed.
  • grid-layout.sh already contains the hardened patterns to reuse: move_pane wrapper asserting .result.move_result.changed (in-tab moves onto own ancestors are SILENT no-ops), cleanup trap, argument validation, TTY-aware error pause for popups.
  • Menu popup dimensions are cell-count integers, not percent strings (config.toml gotcha).
  • Same review gate as the initial port: /simplify + /code-review, functional verification in a throwaway named herdr session (herdr --session <name> server + HERDR_SOCKET_PATH), never against the live default session.

https://claude.ai/code/session_01UcGy7f98oNLoy1bumcjKP2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions