I have been using GNU Screen and Tmux terminal multiplexers for many years now. They comes in handy when performing different tasks in multiple terminal windows simultaneously. Today I learned one of the useful feature of Tmux - Zooming panes. Yes, we can zoom Tmux panes to fit them into the full size of current Terminal window for better text visibility and for viewing more of its contents.
It is useful when you need more space or focus on a specific task. After finishing that task, you can zoom out (unzoom) the Tmux pane back to its normal position or size.
Zoom in and Zoom out Tmux panes
First launch a tmux session by running the following command in your Terminal:
Now split the Tmux session window into two or more windows named panes. You can split the tmux session window either vertically or horizontally.
To split a Tmux session horizontally, press
” (single quotation mark). You don't need to press both keystrokes simultaneously. First press
Ctrl+b and then press
Similarly, to split a pane vertically, press
We can also split the session windows both horizontally and vertically at the same time.
For the purpose of this guide, I split the session in vertical and ran
"top" command in the left pane and
"uname" command on the right pane as shown in the below screenshot.
Now, I am going to zoom the left pane which has
top command running. To do so, switch to left pane and press <Tmux prefix> and
z. The tmux prefix command is
Ctrl+b, so I type Ctrl+b followed by
z to zoom the pane. It is that simple!
Note: To switch between panes, press
Ctrl+b and Arrow keys (Left, Right, Up, Down).
Here is the animated video shows zooming tmux panes.
To zoom out the Tmux pane, simply press
More details on Tmux options can be found in Tmux man pages.
$ man tmux
Hope this helps.
Nice. Clean and simple. Thanks