-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
executable file
·33 lines (25 loc) · 1.24 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
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
set -g @plugin 'arcticicestudio/nord-tmux'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @continuum-restore 'on'
set -g @continuum-save-interval '15'
set -g mouse on
set -g base-index 1
setw -g mode-keys vi
unbind C-b
set-option -g prefix C-x
is_vim="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
is_fzf="ps -o state= -o comm= -t '#{pane_tty}' | grep -iqE '^[^TXZ ]+ +(\\S+\\/)?fzf$'"
bind -n M-h run "($is_vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n M-j run "($is_vim && tmux send-keys C-j) || ($is_fzf && tmux send-keys C-j) || tmux select-pane -D"
bind -n M-k run "($is_vim && tmux send-keys C-k) || ($is_fzf && tmux send-keys C-k) || tmux select-pane -U"
bind -n M-l run "($is_vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n M-s split-window -h -c "#{pane_current_path}"
bind -n M-v split-window -v -c "#{pane_current_path}"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '/usr/share/tmux-plugin-manager/tpm'