|
|
@ -5,9 +5,9 @@ set -s escape-time 10 # faster command sequences |
|
|
|
set -sg repeat-time 600 # increase repeat timeout |
|
|
|
set -sg repeat-time 600 # increase repeat timeout |
|
|
|
set -s focus-events on |
|
|
|
set -s focus-events on |
|
|
|
|
|
|
|
|
|
|
|
unbind ^b # unbind defaul prefix Control+b |
|
|
|
#unbind ^b # unbind defaul prefix Control+b |
|
|
|
set -g prefix 'C-\' # bind new prefix Control+a |
|
|
|
#set -g prefix 'C-\' # bind new prefix Control+a |
|
|
|
bind-key 'C-\' send-prefix |
|
|
|
#bind-key 'C-\' send-prefix |
|
|
|
|
|
|
|
|
|
|
|
bind r source-file ~/.tmux.conf \; display-message "tmux config reloaded" # create new short cut to reload tmux.conf |
|
|
|
bind r source-file ~/.tmux.conf \; display-message "tmux config reloaded" # create new short cut to reload tmux.conf |
|
|
|
|
|
|
|
|
|
|
@ -19,8 +19,9 @@ set -g history-limit 5000 # boost history |
|
|
|
# ---- display ------------------------------------------------------------------------ |
|
|
|
# ---- display ------------------------------------------------------------------------ |
|
|
|
# Enable mouse mode (tmux 2.1 and above) |
|
|
|
# Enable mouse mode (tmux 2.1 and above) |
|
|
|
set -g mouse on |
|
|
|
set -g mouse on |
|
|
|
setw -g mode-mouse on |
|
|
|
# setw -g mode-mouse on |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 窗口号和窗口分割号都以1开始(默认从0开始) |
|
|
|
set -g base-index 1 # start windows numbering at 1 |
|
|
|
set -g base-index 1 # start windows numbering at 1 |
|
|
|
setw -g pane-base-index 1 # make pane numbering consistent with windows |
|
|
|
setw -g pane-base-index 1 # make pane numbering consistent with windows |
|
|
|
|
|
|
|
|
|
|
@ -28,10 +29,16 @@ setw -g automatic-rename on # rename window to reflect current program |
|
|
|
set -g renumber-windows on # renumber windows when a window is closed |
|
|
|
set -g renumber-windows on # renumber windows when a window is closed |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# activity |
|
|
|
# 监视窗口信息,如有内容变动,进行提示 |
|
|
|
set -g monitor-activity on |
|
|
|
set -g monitor-activity on |
|
|
|
set -g visual-activity off |
|
|
|
set -g visual-activity off |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 调节窗口大小快捷键 |
|
|
|
|
|
|
|
bind -r H resize-pane -L 5 |
|
|
|
|
|
|
|
bind -r J resize-pane -D 5 |
|
|
|
|
|
|
|
bind -r K resize-pane -U 5 |
|
|
|
|
|
|
|
bind -r L resize-pane -R 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# move between panels using hjkl like in vim up |
|
|
|
# move between panels using hjkl like in vim up |
|
|
@ -57,8 +64,8 @@ bind - split-window -v -c "#{pane_current_path}" |
|
|
|
unbind '"' |
|
|
|
unbind '"' |
|
|
|
unbind % |
|
|
|
unbind % |
|
|
|
|
|
|
|
|
|
|
|
bind-key -Tcopy-mode-vi 'v' send -X begin-selection |
|
|
|
bind-key -t vi-copy 'v' begin-selection |
|
|
|
bind-key -Tcopy-mode-vi 'y' send -X copy-selection |
|
|
|
bind-key -t vi-copy 'y' copy-selection |
|
|
|
|
|
|
|
|
|
|
|
# Smart pane switching with awareness of Vim splits. |
|
|
|
# Smart pane switching with awareness of Vim splits. |
|
|
|
# See: https://github.com/christoomey/vim-tmux-navigator |
|
|
|
# See: https://github.com/christoomey/vim-tmux-navigator |
|
|
@ -87,9 +94,6 @@ set -g status-interval 10 # redraw status line every 10 seconds |
|
|
|
set-option -g status-justify centre |
|
|
|
set-option -g status-justify centre |
|
|
|
|
|
|
|
|
|
|
|
# fiddle with colors of inactive windows |
|
|
|
# fiddle with colors of inactive windows |
|
|
|
setw -g window-status-fg cyan |
|
|
|
|
|
|
|
setw -g window-status-bg colour234 |
|
|
|
|
|
|
|
setw -g window-status-attr dim |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# change color of active window |
|
|
|
# change color of active window |
|
|
|
# setw -g window-status-current-fg white |
|
|
|
# setw -g window-status-current-fg white |
|
|
@ -110,6 +114,15 @@ set -g message-attr bright |
|
|
|
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' |
|
|
|
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S ' |
|
|
|
set -g status-right-length 50 |
|
|
|
set -g status-right-length 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# 设置当前窗口格式及颜色 |
|
|
|
|
|
|
|
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W " |
|
|
|
|
|
|
|
setw -g window-status-current-bg colour0 |
|
|
|
|
|
|
|
setw -g window-status-current-fg colour11 |
|
|
|
|
|
|
|
setw -g window-status-current-attr dim |
|
|
|
|
|
|
|
setw -g window-status-fg cyan |
|
|
|
|
|
|
|
setw -g window-status-bg colour234 |
|
|
|
|
|
|
|
setw -g window-status-attr dim |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# automatic install tpm |
|
|
|
# automatic install tpm |
|
|
|
if "test ! -d ~/.tmux/plugins/tpm" \ |
|
|
|
if "test ! -d ~/.tmux/plugins/tpm" \ |
|
|
|