0

Occasionally I want to move a pane in a tmux window and resize/reposition the other panes accordingly. For example:

+-------+-------+        +-----+----+----+
|   A   |   B   |        |     | A  | B  |
+-------+-------+        |     |    |    |
|   C   |   D   |  ===>  |  E  +----+----+
+-------+-------+        |     | C  | D  |
|       E       |        |     |    |    |
+---------------+        +-----+----+----+

Is this possible? I've looked at doing a break-pane followed by a join-pane but this just merges the pane as a split of the last pane in the tree.

I've looked through the manpages and done a few web searches but all I can come up with is using one of the five built-in layouts or moving the contents of one pane to another.

I'm using tmux inside Byobu.

1 Answer 1

1

It may be slightly cumbersome, but the easiest way I know to do this is to create a template for the layout you want in another window. In other words, create a new window and split/arrange panes in the way you like. It's important that the new layout has the same number of panes as the old layout or else this won't work.

Then use the list-windows command and observe that each window has a special layout string. It may be something like:

5aa6,180x47,0,0[180x23,0,0,15,180x23,0,24{135x23,0,24,16,44x23,136,24[44x11,136,24,18,44x11,136,36,19]}]

Copy this string, go to your old window, and load this new layout using the select-layout command. You can then put the panes in the correct place using regular pane moving commands.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .