tmux的缩放(<前缀> + z
或resize-pane -Z
)是一个切换。
如果当前窗格已放大,如何缩小(恢复) ?
如果当前窗格未缩放,如何放大(最大化) ?
答案 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