-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
88 lines (68 loc) · 2.75 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
# Setting the prefix from C-b to C-a
# and free the original C-b prefix keybinding
set -g prefix C-a
unbind C-b
# Setting the delay between prefix and command
set -s escape-time 1
# Set window and pane indexing to start at 1
set -g base-index 1
setw -g pane-base-index 1
# Reload the file with Prefix r
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Ensure thar we can send C-a to other apps
bind C-a send-prefix
# Splitting panes using | and -
bind | split-window -h
bind - split-window -v
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n 'C-h' if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n 'C-j' if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n 'C-k' if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n 'C-l' if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
tmux_version='$(tmux -V | sed -En "s/^tmux ([0-9]+(.[0-9]+)?).*/\1/p")'
if-shell -b '[ "$(echo "$tmux_version < 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\' 'select-pane -l'"
if-shell -b '[ "$(echo "$tmux_version >= 3.0" | bc)" = 1 ]' \
"bind-key -n 'C-\\' if-shell \"$is_vim\" 'send-keys C-\\\\' 'select-pane -l'"
bind-key -T copy-mode-vi 'C-h' select-pane -L
bind-key -T copy-mode-vi 'C-j' select-pane -D
bind-key -T copy-mode-vi 'C-k' select-pane -U
bind-key -T copy-mode-vi 'C-l' select-pane -R
bind-key -T copy-mode-vi 'C-\' select-pane -l
# Pane resizing in units of 5 using Prefixes H,J,K,L
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
# Mouse support - set to on if you want to use the mouse
set -g mouse off
# Set the default terminal mode to 256color mode
set -g default-terminal "screen-256color"
# Enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
###############################
#### COLOR (Solarized 256) ####
###############################
# Default statusbar colors
set -g status-style fg=colour136,bg=colour235,default
# Default window title colors
setw -g window-status-style fg=colour244,bg=default
# Active window title colors
setw -g window-status-current-style fg=colour166,bg=default
# Pane border
set -g pane-border-style fg=colour235
set -g pane-active-border-style fg=colour240
# Active pane normal, other panes shaded out
setw -g window-style fg=colour237
setw -g window-active-style fg=colour11
# Message text
set -g message-style fg=colour166,bg=colour235
# Pane number display
set -g display-panes-colour colour166 #orange
set -g display-panes-active-colour colour33 #blue
# Clock
setw -g clock-mode-colour colour64 #green