-
Notifications
You must be signed in to change notification settings - Fork 0
/
tmux.conf.symlink
72 lines (56 loc) · 2.42 KB
/
tmux.conf.symlink
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
set -s escape-time 0
set -g default-terminal "screen-256color"
# Apply Tc
set-option -ga terminal-overrides ",screen-256color:Tc"
# mouse support
set -g mouse on
set-option -g -q mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'select-pane -t=; copy-mode -e; send-keys -M'"
# change tmux prefix
set -g prefix C-a
unbind C-b
bind C-a send-prefix
# start with pane and window 1
set -g base-index 1
set -g pane-base-index 1
# splitting panes
bind | split-window -h
bind - split-window -v
# moving between panes
bind -n C-h run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-h) || tmux select-pane -L"
bind -n C-j run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-j) || tmux select-pane -D"
bind -n C-k run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-k) || tmux select-pane -U"
bind -n C-l run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys C-l) || tmux select-pane -R"
bind -n C-\ run "(tmux display-message -p '#{pane_current_command}' | grep -iq vim && tmux send-keys 'C-\\') || tmux select-pane -l"
# bind -n C-k send-keys -R \; send-keys C-l \; clear-history
# Pane resizing
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
# enable activity alerts
setw -g monitor-activity on
set -g visual-activity on
# Status line
# set -g status-interval 60 check if is ok with smaller
if-shell "test -f .theme_airline.tmux" "source .theme_airline.tmux"
# override cmd+k
# bind -n C-o send-keys -R \; clear-history
bind -n C-o delete-buffer \; clear-history \; send-keys "clear" \; send-keys "Enter" \; delete-buffer \; clear-history
set -g @continuum-restore 'on'
# for vim
set -g @resurrect-strategy-vim 'session'
# for neovim
set -g @resurrect-strategy-nvim 'session'
# use tmux plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-sessionist'
set -g @plugin 'jbnicolai/tmux-fpp'
set -g @plugin 'tmux-plugins/tmux-battery'
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'