Recently I gave up on screen for tmux. From the tmux homepage:

tmux is a terminal multiplexer: it enables a number of terminals (or windows), each running a separate program, to be created, accessed, and controlled from a single screen. tmux may be detached from a screen and continue running in the background, then later reattached.

Tmux is screen on steroids. You can customize just everything, from starting applications automatically to the background color to the key bindings. The multi-pane temrinal thing is pretty cool but sometimes you just wanna focus and work in just one fullscreen pane while keeping the ability to switch back to the multi-pane mode.

Originally there are no bindings for (or a simple command) to maximize and restore the size of a pane.

After some googling, I found a perfect solution for the problem and I decided to share it with everyone:

unbind +

bind + new-window -d -n tmux-zoom 'clear && echo TMUX ZOOM && read' \; swap-pane -s tmux-zoom.0 \; select-window -t tmux-zoom

unbind -

bind - last-window \; swap-pane -s tmux-zoom.0 \; kill-window -t tmux-zoom

These will bind the “+” and “-” for maximizing and restoring, respectively.

My own tmux.conf can be found on github.

(Source: superuser.com)