-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
147 lines (113 loc) · 4.49 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
# reload config file using `CTRL+b r` (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf
#############
### MOUSE ###
#############
# Enable mouse control before tmux 2.1 (clickable windows, panes, resizable panes)
# set-option -g mouse-select-window on
# set-option -g mouse-select-pane on
# disabled mouse selection in order to keep the "select with mouse" possibility
# set-option -g mouse-resize-pane on
# Enable mouse control since tmux 2.1
set-option -g mouse on
###############
### CONTROL ###
###############
# don't rename windows automatically
set-option -g allow-rename off
# Use current dir when splitting pane and $HOME when creating pane
bind '%' split-window -h -c '#{pane_current_path}' # Split panes horizontal in current dir
bind '"' split-window -v -c '#{pane_current_path}' # Split panes vertically in current dir
bind c new-window -c '~/' # Create new window in $HOME dir
# switch panes using Alt-arrow without prefixing with CTRL+b
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
######################
### DESIGN CHANGES ###
######################
# 24 bit color
# See https://github.com/tmux/tmux/issues/1246
# set -g default-terminal "tmux-256color"
# set -ga terminal-overrides ",*256col*:Tc"
# Status bar design
# status line
set-option -g status-justify left
#set-option -g status-bg default
set-option -g status-bg colour235
set-option -g status-fg colour12
set-option -g status-interval 60
# messaging
set-option -g message-style fg=black,bg=yellow
set-option -g message-command-style fg=blue,bg=black
# window mode
set-window-option -g mode-style bg=colour6,fg=colour0
# start windows at index 1 instead of 0
set-option -g base-index 1
set-window-option -g pane-base-index 1
## window status
### inactive window
set-window-option -g window-status-format " #F#I:#W#F "
set-window-option -g window-status-format "#[bg=colour243]#[fg=colour222] #I #[bg=colour243]#[fg=colour215] #W "
# set-window-option -g window-status-style bg=green,fg=black,reverse
### current window
set-window-option -g window-status-current-format " #F#I:#W#F "
set-window-option -g window-status-current-format "#[bg=colour255]#[fg=colour208] #I #[bg=colour255]#[fg=colour202] #W "
set-window-option -g window-status-current-style bg=colour0,fg=colour11,dim
set-option -g automatic-rename-format '#{b:pane_current_path}'
# Info on left (I don't have a session display for now)
set-option -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
# The modes {
set-window-option -g clock-mode-colour colour135
set-window-option -g mode-style fg=colour196,bg=colour238,bold
# }
# The panes {
set-option -g pane-border-style bg=colour235,fg=colour238
set-option -g pane-active-border-style bg=colour236,fg=colour51
# }
# The statusbar {
set-option -g status-position bottom
set-option -g status-bg colour234
set-option -g status-fg colour137
#set-option -g status-attr dim
# set-option -g status-left ''
set-option -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M '
# set-option -g status-right ''
set-option -g status-right-length 50
# }
#############
### OTHER ###
#############
# avoid conflicts with vim
# set-option -s escape-time 0
# but in fact, set it to "1", cf. https://superuser.com/questions/629227/tmux-prints-12c-whenever-i-start-it-or-re-attach-to-a-session-in-cygwin and https://github.com/chrahunt/dotfiles/commit/90af50345d32454b34cc6252b181356ef5d1ce97
set-option -s escape-time 20
# Share same ssh agent through all panes
set-environment -g 'SSH_AUTH_SOCK' ~/.ssh/ssh_auth_sock
###############
### PLUGINS ###
###############
# List of plugins
set-option -g @plugin 'tmux-plugins/tpm'
set-option -g @plugin 'tmux-plugins/tmux-sensible'
# set-option -g @plugin 'tmux-plugins/tmux-resurrect'
# set-option -g @plugin 'tmux-plugins/tmux-continuum'
# for vim
# set-option -g @resurrect-strategy-vim 'session'
# for neovim
# set-option -g @resurrect-strategy-nvim 'session'
# set-option -g @continuum-restore 'on'
# set-option -g @continuum-boot 'on'
# Other examples:
# set-option -g @plugin 'github_username/plugin_name'
# set-option -g @plugin '[email protected]/user/plugin'
# set-option -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'