/
dot_tmux.conf.tmpl
89 lines (75 loc) · 2.36 KB
/
dot_tmux.conf.tmpl
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
# Rebind prefix key
unbind C-b
{{- if eq .chezmoi.os "darwin" }}
set-option -g prefix C-Space
bind-key C-Space send-prefix
set-option -g default-shell "/bin/zsh"
{{- else }}
{{- if (.chezmoi.kernel.osrelease | lower | contains "microsoft") }}
set-option -g prefix C-a
bind-key C-a send-prefix
{{- else }}
set-option -g prefix C-Space
bind-key C-Space send-prefix
{{- end }}
{{- end }}
set -g set-titles on
# Set automatic renumber of windows
set -g renumber-windows on
# Panes config
set -g base-index 1
setw -g pane-base-index 1
set -g display-panes-time 2000
set -sg repeat-time 600
set display-panes-colour "magenta"
set display-panes-active-colour "red"
# Activity monitors
setw -g monitor-activity off
set -g visual-activity off
# Custom configs
set -g default-terminal "tmux-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -g assume-paste-time 0
set -g mouse on
set -g status on
setw -g aggressive-resize on
setw -g main-pane-width 200
setw -g mode-keys vi
# Resize pane shortcuts
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
# Swap panes
bind < swap-pane -U
bind > swap-pane -D
# Bindings for copy mode
bind Enter copy-mode
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi C-v send -X rectangle-toggle
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi Escape send -X cancel
bind -T copy-mode-vi H send -X start-of-line
bind -T copy-mode-vi L send -X end-of-line
# Custom bindings
bind-key | split-window -h -c "#{pane_current_path}"
bind-key - split-window -v -c "#{pane_current_path}"
bind-key r source-file ~/.tmux.conf \; display-message "Config reloaded"
bind C-l send-keys 'C-l'
bind x kill-pane
# TPM 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"
set -g @plugin "tmux-plugins/tmux-yank"
set -g @plugin "thewtex/tmux-mem-cpu-load"
set -g @plugin "christoomey/vim-tmux-navigator"
set -g @plugin "erikw/tmux-powerline"
# TPM Binding
set -g @tpm-clean 'u'
# TPM Config
if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'