Replies: 2 comments 2 replies
|
Yes please! Sometimes I open a layout horizontally and then after a while I realize it would have been better to have it vertically. Really miss this feature from tmux |
0 replies
|
this should be an easy plugin ! let me know if plugin api missing any endpoint. |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi, I'm a long-time tmux user who recently switched to herdr for the agent-aware sidebar and session persistence. One thing I miss every day is
prefix + Space— tmux's built-in layout cycling.What I miss from tmux
In tmux, pressing
prefix + Spacerotates through predefined pane layouts:even-horizontaleven-verticalmain-horizontalmain-verticaltiledThis is huge when you have 3–4 panes and want to reorganize them instantly. No mouse, no manual resizing, no closing and re-splitting — just one keypress.
What I'd like in herdr
I'd love the same ability in herdr. The underlying BSP tree already supports arbitrary splits, so the feature is really about exposing a few "preset" arrangements that rebuild the current tab's tree while keeping all existing pane IDs and terminals intact.
Proposed defaults:
prefix + space→ next layout presetprefix + shift + space→ previous layout presetThe five presets would match tmux semantics:
even-horizontaleven-verticalmain-horizontalmain-verticaltiledWhy this fits herdr
herdr already supports mouse-driven layout changes and manual splits. A keyboard-driven preset cycle would complement that without removing any existing behavior. It also aligns with herdr's "terminal-native" philosophy — it's a multiplexer feature, not a GUI abstraction.
For users coming from tmux (like me), it's one less piece of muscle memory to relearn.
Implementation note
I have a branch that adds this on top of the current master:
LayoutPresetenum andTileLayout::apply_layout_preset()insrc/layout.rslayout.apply_presetJSON-RPC/socket API methodnext_layout/previous_layoutkeybindsThe BSP tree is rebuilt in place, so pane IDs, terminals, and focus are preserved. The last-applied preset is remembered per tab so cycling advances correctly.
Open questions
prefix + shift + spaceOK as a default for previous? Some terminals don't distinguishShift+Space, so I'm happy to leave it unbound by default if that's preferred.If this direction sounds good, I'd love to open a PR. Thanks!
All reactions