tmux放大或缩小而不切换

时间:2016-08-05 03:27:06

标签: tmux

tmux的缩放(<前缀> + z  或resize-pane -Z)是一个切换。

如果当前窗格已放大,如何缩小(恢复)

如果当前窗格未缩放,如何放大(最大化)

1 个答案:

答案 0 :(得分:1)

<强> 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