-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_tmux.conf.tmpl
More file actions
63 lines (57 loc) · 2.39 KB
/
dot_tmux.conf.tmpl
File metadata and controls
63 lines (57 loc) · 2.39 KB
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
# vi: ft=tmux
set-option -g escape-time 0
set-option -g prefix C-Space
bind-key -T prefix \; command-prompt
set-option -g history-limit 100000
# Number windows and panes starting from 1
set-option -g base-index 1
set-window-option -g pane-base-index 1
# Open splits in the same directory
bind - split-window -v -c '#{pane_current_path}'
bind \\ split-window -h -c '#{pane_current_path}'
# Ctrl-L/Ctrl-\ (SIGQUIT) is overwritten by vim-tmux-navigator
bind C-l send-keys 'C-l'
bind C-\\ send-keys 'C-\'
# Enable Neovim focus events
set-option -g focus-events on
set-option -g mouse on
# Enable true color support
set-option -sa terminal-overrides ',xterm-256color:RGB'
set-option -g default-terminal 'tmux-256color'
set-window-option -g mode-keys vi
bind-key -T copy-mode-vi v send-keys -X begin-selection
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
bind-key -T copy-mode-vi Y send-keys -X copy-end-of-line-and-cancel
bind-key -T copy-mode-vi C-y send-keys -X copy-line-and-cancel
set-option -g set-clipboard on
{{- if eq .chezmoi.os "linux" }}
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel wl-copy
bind-key -T prefix * run "wl-paste --primary | tmux load-buffer - ; tmux paste-buffer"
bind-key -T prefix + run "wl-paste | tmux load-buffer - ; tmux paste-buffer"
{{- else if eq .chezmoi.os "darwin" }}
bind-key -T prefix * run 'pbpaste | tmux load-buffer - ; tmux paste-buffer'
bind-key -T prefix + run 'pbpaste | tmux load-buffer - ; tmux paste-buffer'
{{- end }}
set-option -g @plugin 'tmux-plugins/tpm'
set-option -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'ctrlmachine/tmux-amp-theme'
{{ if eq .chezmoi.os "darwin" -}}
set -g @plugin 'erikw/tmux-dark-notify'
set -g @dark-notify-theme-path-light '$HOME/.config/tmux/amp-light.conf'
set -g @dark-notify-theme-path-dark '$HOME/.config/tmux/amp-dark.conf'
{{ else -}}
set -g @amp-theme-appearance 'auto'
{{ end -}}
{{- if eq .chezmoi.os "darwin" }}
# Homebrew is only added to PATH in .profile which is loaded by shell later
set-environment -g PATH "/opt/homebrew/bin:$PATH"
{{- end }}
{{- if eq .chezmoi.os "darwin" }}
run '/opt/homebrew/opt/tpm/share/tpm/tpm'
{{- else }}
run '~/.tmux/plugins/tpm/tpm'
{{- end }}
# Override after plugins load — amp-theme overwrites this if set earlier
set -g window-status-current-style 'fg=blue,bold'