-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.tmux.conf
103 lines (100 loc) · 4.29 KB
/
.tmux.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
# General {
set -g default-terminal "screen-256color" #Terminal setting
set -g display-time 500 #Time(ms) to show the message bar
set -g escape-time 0
set-window-option -g automatic-rename off #disable window title auto-rename
set-option -g buffer-limit 16 #Number of copy buffers.
set -g history-limit 100000 #History
setw -g mode-keys vi #Use Vi mode
set -g status-keys vi #Use Vi mode
set -g mouse on
# }
# Key Binding {
#设置前缀为Ctrl + x
set -g prefix C-x
#解除Ctrl+b 与前缀的对应关系
unbind C-b
#将r 设置为加载配置文件,并显示"reloaded!"信息
bind r source-file ~/.tmux.conf \; display "Reloaded!"
bind L clear-history
#up
bind-key k select-pane -U
#down
bind-key j select-pane -D
#left
bind-key h select-pane -L
#right
bind-key l select-pane -R
#select last window
bind-key C-l select-window -l
#copy-mode 将快捷键设置为vi 模式
setw -g mode-keys vi
# zoom pane <-> window
# http://tmux.svn.sourceforge.net/viewvc/tmux/trunk/examples/tmux-zoom.sh
bind ^z run "tmux-zoom"
# split window
unbind '"' # vertical split (prefix -)
bind - splitw -v
unbind %
bind | splitw -h # horizontal split (prefix |)
# 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)
# copy mode
# enter copy mode (prefix Escape)
bind Escape copy-mode
# paste buffer (prefix Ctrl+p)
bind ^p pasteb
# select (v)
bind -T copy-mode-vi 'v' send -X begin-selection
# copy (y)
bind -T copy-mode-vi 'y' send -X copy-selection
# 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
# }
# Status Bar and colors {
set -g status-justify "left"
set -g status "on"
set -g status-left-style "none"
set -g message-command-style "fg=#c5cdd9,bg=#404455"
set -g status-right-style "none"
set -g pane-active-border-style "fg=#ffcc00"
set -g status-style "none,bg=#2f323e"
set -g message-style "fg=#c5cdd9,bg=#404455"
set -g pane-border-style "fg=#404455"
set -g status-right-length "100"
set -g status-left-length "100"
setw -g window-status-activity-style "none,fg=#ffcc00,bg=#2f323e"
setw -g window-status-separator ""
setw -g window-status-style "none,fg=#c5cdd9,bg=#2f323e"
set -g status-left "#[fg=#2b2d37,bg=#ffcc00] #H #[fg=#ffcc00,bg=#2f323e,nobold,nounderscore,noitalics]"
set -g status-right "#[fg=#2f323e,bg=#2f323e,nobold,nounderscore,noitalics] #[fg=blue]#{sysstat_ntemp} #[fg=#c5cdd9] 祝#{upload_speed} #[fg=#c5cdd9] #{download_speed} #[fg=blue]#{sysstat_itemp} #{sysstat_cpu} #[fg=#c5cdd9,bg=#2f323e] #{sysstat_mem} #[fg=#404455,bg=#2f323e,nobold,nounderscore,noitalics]#[fg=#c5cdd9,bg=#404455] %a #[fg=#ffcc00,bg=#404455,nobold,nounderscore,noitalics]#[fg=#2b2d37,bg=#ffcc00] %R #{prefix_highlight} "
setw -g window-status-format "#[fg=#2f323e,bg=#2f323e,nobold,nounderscore,noitalics]#[fg=#c5cdd9] #I #W #[fg=#2f323e,bg=#2f323e,nobold,nounderscore,noitalics]"
setw -g window-status-current-format "#[fg=#2f323e,bg=#404455,nobold,nounderscore,noitalics]#[fg=#c5cdd9,bg=#404455] #I #W #F #[fg=#404455,bg=#2f323e,nobold,nounderscore,noitalics]"
# other
set -g visual-activity on
setw -g monitor-activity on
# sysstat
set -g @sysstat_cpu_view_tmpl '#[fg=#c5cdd9]C:#[default] #[fg=#{cpu.color}]#{cpu.pused}#[default]'
set -g @sysstat_mem_view_tmpl '#[fg=#c5cdd9]M:#[default] #[fg=#{mem.color}]#{mem.pused}#[default]'
set -g status-interval 3
# }
# List of plugins {
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'beeryardtech/tmux-net-speed'
set -g @plugin 'samoshkin/tmux-plugin-sysstat'
#set -g @plugin 'sainnhe/tmux-fzf'
# 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'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# }