Search code examples
terminaltmux

Any way to adjust tmux panes to inequal percentages?


When I only have 2 panes, adjusting their height or width (depending on a vertical or horizontal split) is simple but what I'm specifically looking for is when you have 4 panes, is it possible to make one not share its height (or width) with its adjacent pane?

Using the usual resize commands/keystrokes will not adjust only the active pane. For example, if I want to make the bottom left pane taller, shrinking the top left pane, both bottom panes will grow and both top panes will shrink.

What I want is for pane 0 (top left) to take about 25% height while pane 1 (top right) retains the 50% height leaving pane 2 (bottom left) with 75% height and pane 3 (bottom right) with 50% height.

Is this possible?

EDIT:

To expand on this, here is a a quickly put together image of what I am trying to achieve.

tmux Panes


Solution

  • Yes, what you show in the picture is possible. Just make the vertical split first.

    Prefix+%
    Prefix+"
    

    Then switch to the third pane and

    Prefix+"
    

    Now you can adjust your pane sizes as necessary.

    Your title doesn't really match the picture you show. A pane's border has to be straight. You cannot have something like this:

    _________________
    |      |         |
    |      |         |
    |      |_________|
    |        |       |
    |________|       |
    |        |       |
    |        |       |
    ------------------