Tmux: how to restore layout after changing it with select-layout or next-layout

terminaltmux

After starting a new tmux session I usually open multiple panes in the default window, and then resize them manually using the resize-pane commands (through shortcuts of course).

After doing some work, I arrive at a point, or have a certain kind of output, that I want to quickly view side-by-side vertically or horizontally. So I use the select-layout or the next-layout commands.

However once I'm done with these views, I want to go back to the layout that I set up originally. Is there any command/procedure that can let me do that?

Not only do I seem to not be able to restore to my original layout, I can't seem to do that with manual resizing either.

Best Answer

Tmux has gained this functionality now as of v2.1 (see CHANGES):

* 'select-layout' understands '-o' to undo the last layout change.

Related Topic