本文是让linux下分屏工具可以支持鼠标选窗口或面板,鼠标调大小,鼠标滚屏而做的设置。
先贴出主目录下的.tmux.conf文件如下
---------- .tmux.conf START -------------------------------
set -g prefix ^a
unbind ^b
bind a send-prefix
set -g base-index 1
unbind '"'
bind - splitw -v # 分割成上下两个窗口
unbind %
bind | splitw -h # 分割成左右两个窗口
bind k selectp -U # 选择上窗格
bind j selectp -D # 选择下窗格
bind h selectp -L # 选择左窗格
bind l selectp -R # 选择右窗格
bind ^k resizep -U 10 # 跟选择窗格的设置相同,只是多加 Ctrl(Ctrl-k)
bind ^j resizep -D 10 # 同上
bind ^h resizep -L 10 # ...
bind ^l resizep -R 10 # ...
# Set the mouse behaviour
set-option -g mode-mouse on
set-option -g mouse-resize-pane on
set-option -g mouse-select-pane on
set-option -g mouse-select-window on
------- .tmux.conf STOP --------------------------------------------------
效果如图所示。

转发至微博
转发至微博