-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathdot_tmux.conf
54 lines (45 loc) · 2.01 KB
/
dot_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
# Proper prefix
set-option -g prefix C-a
# Aggressive resize
setw -g aggressive-resize on
# Status bar
set -g status-left ' ❐ #S @ #{hostname} | ↑#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '
set -g status-right '#{paired}#{?battery_hbar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} '
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_editor="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$|emacs.*$'"
bind-key -n M-h if-shell "$is_editor" "send-keys C-h" "select-pane -L"
bind-key -n M-j if-shell "$is_editor" "send-keys C-j" "select-pane -D"
bind-key -n M-k if-shell "$is_editor" "send-keys C-k" "select-pane -U"
bind-key -n M-l if-shell "$is_editor" "send-keys C-l" "select-pane -R"
bind-key -n "M-\\" if-shell "$is_editor" "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
set -g @resurrect-save 'S'
set -g @resurrect-restore 'R'
set -g @default-shell /usr/bin/fish
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-strategy-vim 'session'
set -g repeat-time 200
unbind-key Up
bind-key -n C-] send-keys C-l
set -g status-justify centre
setw -g window-status-separator ''
# set -g default-terminal "screen-256color"
# set-option -ga terminal-overrides "screen-256color:Tc"
# set -g default-terminal "tmux-256color"
# set-option -ga terminal-overrides "tmux-256color:Tc"
set -g default-terminal "xterm-256color"
set-option -ga terminal-overrides "xterm-256color:Tc"
set -as terminal-overrides ',xterm*:Tc:sitm=\E[3m'
# Plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Initialize TPM
run '~/.tmux/plugins/tpm/tpm'