# scrollback buffer n lines set -g history-limit 40000 # Ctrl+b -> Ctrl+a set-option -g prefix C-a unbind-key C-b bind-key C-a send-prefix # split window unbind '"' bind - splitw -v unbind % bind \ splitw -h # select pane bind k selectp -U # above (prefix k) bind j selectp -D # below (prefix j) bind h selectp -L # left (prefix h) bind l selectp -R # right (prefix l) # resize pane bind -r ^k resizep -U 10 # upward (prefix Ctrl+k) bind -r ^j resizep -D 10 # downward (prefix Ctrl+j) bind -r ^h resizep -L 10 # to the left (prefix Ctrl+h) bind -r ^l resizep -R 10 # to the right (prefix Ctrl+l) # swap pane # swap with the previous pane (prefix Ctrl+u) bind ^u swapp -U # swap with the next pane (prefix Ctrl+d) bind ^d swapp -D # misc # select the last pane (prefix e) bind e lastp # select the last window (prefix Ctrl+e) bind ^e last # kill pane (prefix q) bind q killp # kill window (prefix Ctrl+q) bind ^q killw #uptime,loadavg set -g status-right "#{prefix_highlight}#[fg=green]#(uptime|cut -d ' ' -f 2)#[default]•#[fg=green]#(cut -d ' ' -f 1,2 /proc/loadavg)#[default]" #color of bg,fg set -g status-bg black set -g status-fg yellow set -g status-interval 1 #set-option -g status-utf8 on #set-window-option -g utf8 on # Before tmux 2.1 #setw -g mouse-resize-pane on #setw -g mouse-select-pane on #setw -g mouse-select-window on #setw -g mode-mouse on # After tmux 2.1 set-option -g mouse on #将r 设置为加载配置文件,并显示"reloaded!"信息 bind r source-file /etc/tmux.conf \; display "Configuration reloaded!" # List of plugins set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tmux-sensible' # Other examples: # set -g @plugin 'github_username/plugin_name' # set -g @plugin 'git@github.com/user/plugin' # set -g @plugin 'git@bitbucket.com/user/plugin' set -g @plugin 'tmux-plugins/tmux-prefix-highlight' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-continuum' set -g @plugin 'tmux-plugins/tmux-sidebar' set -g @plugin 'tmux-plugins/tmux-net-speed' set -g @net_speed_interfaces "eth0" set -g @net_speed_format "D:%5s U:%5s" set -g @plugin 'nhdaly/tmux-better-mouse-mode' set -g @scroll-down-exit-copy-mode "off" set -g @scroll-without-changing-pane "off" set -g @scroll-in-moused-over-pane "on" set -g @scroll-speed-num-lines-per-scroll "3" set -g @emulate-scroll-for-no-mouse-alternate-buffer "on" # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) run '/opt/tmux/plugins/tpm/tpm'