【原】Linux 终端分屏工具 tmux 配…

来源:互联网 发布:Java paths 类 编辑:程序博客网 时间:2024/06/16 05:02

本文是让linux下分屏工具可以支持鼠标选窗口或面板,鼠标调大小,鼠标滚屏而做的设置。

先贴出主目录下的.tmux.conf文件如下

----------  .tmux.conf  START -------------------------------

set -g prefix ^a
unbind ^b
bind send-prefix


set -g base-index 1

unbind '"'
bind splitw -v 分割成上下两个窗口
unbind %
bind splitw -h 分割成左右两个窗口

bind selectp -U 选择上窗格
bind selectp -D 选择下窗格
bind selectp -L 选择左窗格
bind 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 --------------------------------------------------


效果如图所示。

【原】Linux 终端分屏工具 tmux 配置与使用 - kayneo - Kayneo 最天使~