-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathtmux.conf
160 lines (124 loc) · 4.7 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
#
# author : Xu Xiaodong <[email protected]>
# modified : 2013 Jul 06
#
# 设置Shell
set-option -g default-shell /bin/zsh
# set -g default-terminal "screen-256color"
#-- base settings --# set -g default-terminal "screen-256color" set -g display-time 3000
set -g escape-time 0
set -g history-limit 65535
set -g base-index 1
set -g pane-base-index 1
#-- bindkeys --#
# prefix key (Ctrl+a)
set -g prefix ^a
unbind ^b
bind a send-prefix
# split window
unbind '"'
bind - splitw -v # vertical split (prefix -)
unbind %
bind | splitw -h # horizontal split (prefix |)
# 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
bind ^u swapp -U # swap with the previous pane (prefix Ctrl+u)
bind ^d swapp -D # swap with the next pane (prefix Ctrl+d)
# misc
bind e lastp # select the last pane (prefix e)
bind ^e last # select the last window (prefix Ctrl+e)
bind q killp # kill pane (prefix q)
bind ^q killw # kill window (prefix Ctrl+q)
#copy-mode 将快捷键设置为vi 模式
setw -g mode-keys vi
# app
bind ! splitw htop # htop (prefix !)
bind m command-prompt "splitw 'exec man %%'" # man (prefix m)
bind @ command-prompt "splitw 'exec perldoc -t -f %%'" # perl func (prefix @)
bind * command-prompt "splitw 'exec perldoc -t -v %%'" # perl var (prefix *)
bind % command-prompt "splitw 'exec perldoc -t %%'" # perl doc (prefix %)
bind / command-prompt "splitw 'exec ri %%'" # ruby doc (prefix /)
# reload config (prefix r)
bind r source ~/.tmux.conf \; display "Configuration reloaded!"
<<<<<<< HEAD
# set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"
set -g status-left "#[fg=green]#S:w#I.p#P#[default]"
=======
# set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"
set -g status-left "#[fg=green]#S:w#I.p#P#[default]"
>>>>>>> ab8e0c152f321431137c20f35edef5bef963b828
#鼠标滚轮可以使用
set-window-option -g mode-mouse on
# 鼠标可以选中窗口
set-option -g mouse-select-pane on
# 放大窗口
bind ^k run "tmux-zoom.sh"
<<<<<<< HEAD
set -g status-justify centre
set-option -g status-right "#[fg=cyan]#(date +%H:%M' ')"
#### COLOUR (Solarized 256)
=======
set -g status-justify centre
set-option -g status-right "#[fg=cyan]#(date +%H:%M' ')"
#### COLOUR (Solarized 256)
>>>>>>> ab8e0c152f321431137c20f35edef5bef963b828
# default statusbar colors
set-option -g status-bg colour235 #base02
set-option -g status-fg colour136 #yellow
set-option -g status-attr default
<<<<<<< HEAD
=======
>>>>>>> ab8e0c152f321431137c20f35edef5bef963b828
# default window title colors
set-window-option -g window-status-fg colour244 #base0
set-window-option -g window-status-bg default
#set-window-option -g window-status-attr dim
<<<<<<< HEAD
=======
>>>>>>> ab8e0c152f321431137c20f35edef5bef963b828
# active window title colors
set-window-option -g window-status-current-fg colour166 #orange
set-window-option -g window-status-current-bg default
#set-window-option -g window-status-current-attr bright
<<<<<<< HEAD
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
=======
# pane border
set-option -g pane-border-fg colour235 #base02
set-option -g pane-active-border-fg colour240 #base01
# message text
set-option -g message-bg colour235 #base02
set-option -g message-fg colour166 #orange
# pane number display
set-option -g display-panes-active-colour colour33 #blue
set-option -g display-panes-colour colour166 #orange
# clock
set-window-option -g clock-mode-colour colour64 #green
# set-option -g status on
# set-option -g status-interval 2
# set-option -g status-utf8 on
# set-option -g status-justify "centre"
# set-option -g status-left-length 60
# set-option -g status-right-length 90
# set-option -g status-left "#(~/Github/tmux-powerline/powerline.sh left)"
# set-option -g status-right "#(~/Github/tmux-powerline/powerline.sh right)"
>>>>>>> ab8e0c152f321431137c20f35edef5bef963b828