Repository navigation
Replies: 1 comment
|
+1 for same-tab |
0 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.
idea / problem
I'm writing a plugin that rearranges panes from the keyboard, for example turning a pane that sits beside a column into the bottom row of that column:
The plugin is plain Node.js with no dependencies and talks to Herdr through
HERDR_BIN_PATH, as the plugin docs recommend. With the CLI alone, a tab's split structure can't be changed in place:pane movewithin the same tab does nothing. The command succeeds, but nothing changes (checked on 0.9.3):--splitalways puts the moved pane beside one target pane, so there is no way to split beside a group of panes, like putting C under the wholeA/Bcolumn above. Without--target-pane, the split goes next to the tab's focused pane, not at the tab's root.layout.export/layout.applyexist in the socket API, but not in the CLI. On Windows the socket can't be reached from common plugin runtimes either: Node'snet.createConnection({ path })fails withconnect ENOTSOCK, and Python 3.12 on Windows has nosocket.AF_UNIX.My current workaround parks every other pane of the split in a temporary tab with
pane move --new-tab, then moves them back one by one with--split right|down --target-pane <pane> --ratio <r>in the order that rebuilds the new tree. Processes survive and the temporary tab closes when empty, but the tab bar flickers and an N-pane split takes N-1 round trips.Environment: Herdr 0.9.3 (client and server), Windows 11, Node.js 24, Python 3.12.
requested change
Any one of these would remove the workaround:
herdr layout export [--tab ID]andherdr layout apply --tab ID <json|file>, reusing live panes referenced bypane_idwithout restarting their processes.pane move: allowpane move <pane> --tab <its own tab> --split right|down --target-pane <other>to reattach the pane inside its current tab.pane movetarget a split node, for example by the layout path thatlayout.set_split_ratioalready takes, not only a single pane.Option 1 is the most general. I couldn't check whether
layout.applykeeps live panes and their processes, because the socket isn't reachable from my plugin runtime on Windows.why you want this
Plugins that reshape layouts (rotate a split, move a pane into another column, apply a saved arrangement) could do it in one step, with no temporary tab and no flicker. It would also let plugins written in Node.js or Python reach these operations on Windows without bundling another runtime just to talk to the socket. The plugin docs recommend going through the CLI, so exposing the layout API there keeps plugins on the supported path.
All reactions