-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
180 lines (146 loc) · 5.44 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
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
# Written by Frank_Xu
# General Setting
# https://superuser.com/questions/196060/selecting-text-in-tmux-copy-mode
# 1.Ctrl-b [
# 2. Space
# 3. Enter
# 4. paste: Ctrl-ab ]
set-option -g prefix C-x
# set-option -g prefix2 C-x
# set-window-option -g automatic-rename off
setw -g mode-keys vi
# Statusbar properties.
# bind-key C-^\ send-prefix
# unbind-key C-b
#set -g prefix C-m
#bind-key C-m send-prefix
# set-option -g prefix C-o
# set -g display-time 3000
# set -g status-bg black
# set -g status-fg cyan
# set -g status-right "#(uptime|awk '{print $11}') #(date)"
set -g status-right '#{prefix_highlight} | %a %Y-%m-%d %H:%M'
# Fix putty/pietty function key problem
set -g terminal-overrides "xterm*:kf1=\e[11~:kf2=\e[12~:kf3=\e[13~:kf4=\e[14~:kf5=\e[15~:kf6=\e[17~:kf7=\e[18~:kf8=\e[19~"
# bind s split-window
#bind '2' splitw\; selectl main-vertical
# bind -n F1 lock
# bind -n F6 copy-mode
bind -n F7 next-window
bind -n F8 select-pane -t :.+
bind -n F2 select-pane -U
bind -n F3 select-pane -D
bind -n F9 resizep -U 1
bind -n F10 resizep -D 1
unbind-key F11
bind -n F11 resizep -L 1
bind -n F12 resizep -R 1
# Tmux lock setting
# pass -c ''
#
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
#
# # Other examples:
# # set -g @plugin 'github_username/plugin_name'
# # set -g @plugin '[email protected]/user/plugin'
# # set -g @plugin '[email protected]/user/plugin'
#
# # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=black,bg=yellow,bold' # default is 'fg=default,bg=yellow'
#####################
### DESIGN CHANGES ###
######################
# panes
set -g pane-border-style fg=black
set -g pane-active-border-style fg=brightred
bind '2' split-window -c "#{pane_current_path}"
bind '3' split-window -h -c "#{pane_current_path}"
# scroll
bind -T copy-mode-vi C-v send-keys -X halfpage-up
bind -T copy-mode-vi C-f send-keys -X halfpage-down
## Status bar design
# status line
# set -g status-utf8 on
set -g status-justify left
set -g status-bg default
set -g status-fg colour12
set -g status-interval 2
# messaging
set -g message-style fg=black,bg=yellow
set -g message-command-style fg=blue,bg=black
#window mode
setw -g mode-style bg=colour6,fg=colour0
# window status
setw -g window-status-format " #F#I:#W#F "
setw -g window-status-current-format " #F#I:#W#F "
setw -g window-status-format "#[fg=magenta]#[bg=black] #I #[bg=cyan]#[fg=colour8] #W "
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
setw -g window-status-current-style bg=colour0,fg=colour11
setw -g window-status-current-style dim
setw -g window-status-style bg=green,fg=black
setw -g window-status-style reverse
# Info on left (I don't have a session display for now)
set -g status-left ''
# loud or quiet?
set-option -g visual-activity off
set-option -g visual-bell off
set-option -g visual-silence off
set-window-option -g monitor-activity off
set-option -g bell-action none
set -g default-terminal "screen-256color"
# The modes {
setw -g clock-mode-colour colour135
setw -g mode-style bold,fg=colour196,bg=colour238
# }
# The panes {
set -g pane-border-style bg=colour235,fg=colour238
set -g pane-active-border-style bg=colour236,fg=colour51
#
# }
# The statusbar {
set -g status-position bottom
set -g status-bg colour234
set -g status-fg colour137
set -g status-style dim
set -g status-left ''
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-left-length 20
setw -g window-status-current-style bold,fg=colour81,bg=colour238
setw -g window-status-current-format ' #I#[fg=colour250]:#[fg=colour255]#W#[fg=colour50]#F '
setw -g window-status-style none,fg=colour138,bg=colour235
setw -g window-status-format ' #I#[fg=colour237]:#[fg=colour250]#W#[fg=colour244]#F '
setw -g window-status-bell-style bold,fg=colour255,bg=colour1
# }
# The messages {
set -g message-style bold,fg=colour232,bg=colour166
# }
#
#
setw -g window-style 'bg=colour241'
setw -g window-active-style 'bg=black'
###########################################################################
# Mouse mode is on by default.
# <prefix> M -- to turn it off
# <prefix> m -- to turn it on
#
# As of tmux 2.1, a backward-incompatible change was introduced.
# mode-mouse and mouse-* no longer exist, replaced by simply
# mouse <on|off>. Which is great, and easier, but unfortunately I use
# tmux on systems which I don't foresee going to 2.1+ anytime soon.
# So, time to test versions... this is kind of cheap and hacky, and it
# won't work for 2.2 and beyond, but will work for now. I tried to make
# this more generalized but have not been successful so far.
#
# if-shell '[[ $(echo "$(tmux -V | cut -d" " -f2) >= 2.1" | bc) -eq 1 ]]' \
# 'set -g mouse on; bind m set -g mouse on \; display "Mouse ON"; bind M set -g mouse off \; display "Mouse OFF"' \
# 'set -g mouse-resize-pane on; set -g mouse-select-pane on; set -g mouse-select-window on; set -g mouse-resize-pane on \; set -g mouse-select-pane on \; set -g mouse-select-window on \; display "Mouse ON"; set -g mouse-resize-pane off \; set -g mouse-select-pane off \; set -g mouse-select-window off \; display "Mouse OFF"'
#For tmux version 2.1 and up
# set -g mouse on
#For tmux versions < 2.1
# set -g mode-mouse on