2016-08-05 108 views
0

TMUX的變焦(<前綴> + Žresize-pane -Z)是一個切換。TMUX放大或縮小,而不切換

如何縮小(恢復)只有如果當前窗格已放大?

如何放大(最大化)只有如果當前窗格未縮放?

回答

0

tmux-zoom-in.sh

#!/bin/bash 

# Zoom in the current pane ONLY if it is not currently zoomed. 
# Requires tmux version >= 1.8 

tmux list-panes -F '#F' | grep -q Z || tmux resize-pane -Z 
exit 0 

tmux-zoom-out.sh

#!/bin/bash 

# Zoom out the current pane ONLY if it is not currently zoomed. 
# Requires tmux version >= 1.8 

tmux list-panes -F '#F' | grep -q Z && tmux resize-pane -Z 
exit 0