tmux 无需切换即可放大或缩小
tmux zoom in or out without toggle
tmux 的缩放 (<前缀> + z
或 resize-pane -Z
) 是一个开关。
如果当前窗格已经放大,我如何缩小(恢复)仅?
如果当前窗格未缩放,我如何放大(最大化)仅?
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
tmux 的缩放 (<前缀> + z
或 resize-pane -Z
) 是一个开关。
如果当前窗格已经放大,我如何缩小(恢复)仅?
如果当前窗格未缩放,我如何放大(最大化)仅?
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