-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
125 lines (95 loc) · 3.48 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
#
# General
#
set-option -s default-terminal screen-256color
set-option -s escape-time 1
set-option -g base-index 1
set-option -g pane-base-index 1
set-option -g renumber-windows on
set-option -g clock-mode-style 12
set-option -g remain-on-exit on
set-option -g history-limit 10000
set-option -wg xterm-keys on
set-option -wg automatic-rename off
set-option -wg mode-keys vi
#
# Key Bindings
#
set-option -g prefix C-Space
bind-key C-Space send-prefix
unbind-key C-b
bind-key r source-file ~/.tmux.conf
bind-key c new-window -a # Insert window at next index
bind-key -n M-p previous-window
bind-key -n M-n next-window
bind-key -n M-1 select-window -t :1
bind-key -n M-2 select-window -t :2
bind-key -n M-3 select-window -t :3
bind-key -n M-4 select-window -t :4
bind-key -n M-5 select-window -t :5
bind-key -n M-6 select-window -t :6
bind-key -n M-7 select-window -t :7
bind-key -n M-8 select-window -t :8
bind-key -n M-9 select-window -t :9
bind-key -n M-0 select-window -t :10
bind-key -n C-S-Left swap-window -t -1 \; select-window -t -1
bind-key -n C-S-Right swap-window -t +1 \; select-window -t +1
bind-key '\' split-pane -h -c "#{pane_current_path}"
bind-key - split-pane -v -c "#{pane_current_path}"
# 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 M-h if-shell "$is_vim" 'send-keys C-h' 'select-pane -L'
bind-key -n M-j if-shell "$is_vim" 'send-keys C-j' 'select-pane -D'
bind-key -n M-k if-shell "$is_vim" 'send-keys C-k' 'select-pane -U'
bind-key -n M-l if-shell "$is_vim" 'send-keys C-l' 'select-pane -R'
bind-key -n 'M-\' if-shell '$is_vim' 'send-keys C-\\' 'select-pane -l'
bind-key -T copy-mode-vi M-h select-pane -L
bind-key -T copy-mode-vi M-j select-pane -D
bind-key -T copy-mode-vi M-k select-pane -U
bind-key -T copy-mode-vi M-l select-pane -R
bind-key -T copy-mode-vi 'M-\' select-pane -l
bind-key -n M-w kill-pane
bind-key n respawn-pane
bind-key -n M-s set-window-option synchronize-panes on
bind-key -n M-o set-window-option synchronize-panes off
bind-key / copy-mode \; send-key / # Search forwards
bind-key ? copy-mode \; send-key ? # Search backwards
#
# Colors
#
# Borders
set-option -g pane-border-style fg=colour10
set-option -g pane-active-border-style fg=colour10
# Status Bar
set-option -g status-style bg=colour10,fg=colour8
set-option -g status-left-style fg=colour0
set-option -g status-left-length 30
set-option -g status-left "\
#{?client_prefix,#[bg=colour5#,fg=colour15],#[bg=colour14]} #S #[default]\
#{?client_prefix,#[fg=colour5],#[fg=colour14]}#[default] "
set-option -g status-right-style fg=colour8
set-option -g status-right "\
%d-%b %I:%M %p \
#[bg=colour10,fg=colour11]#[bg=colour11,fg=colour12] #{host_short} "
set-option -wg window-status-format " #I #W "
set-option -wg window-status-current-format "\
#[bg=colour11,fg=colour10]\
#[bg=colour11,fg=colour12] #I #W #{?window_zoomed_flag,🔍,} \
#[bg=colour10,fg=colour11]"
set-option -g mode-style fg=colour0,bg=colour5
set-option -g message-style bg=colour0,fg=colour12
set-option -g message-command-style bg=colour0,fg=colour12
# Display Panes
set-option -g display-panes-active-colour colour4
set-option -g display-panes-colour colour14
set-option -g display-panes-time 3000
#
# Plugin Manager
#
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-resurrect'
# Configuration
set -g @resurrect-strategy-vim 'session'
set -g @resurrect-strategy-nvim 'session'
run -b '~/.tmux/plugins/tpm/tpm'