blob: 329346bc7f01546a4261028bf8fd5bcbc77e133f [file] [log] [blame]
Copybara botca5ce642024-11-08 17:38:08 +01001set -g mouse on
2
3unbind C-b
4set-option -g prefix C-a
5bind-key C-a send-prefix
6
7bind c new-window -c "#{pane_current_path}"
8bind v split-window -h -c "#{pane_current_path}"
9bind h split-window -v -c "#{pane_current_path}"
10unbind '"'
11unbind %
12
13bind r source-file ~/.tmux.conf
14
15bind -n M-Left select-pane -L
16bind -n M-Right select-pane -R
17bind -n M-Up select-pane -U
18bind -n M-Down select-pane -D
19
20set -sg escape-time 10
21
22{{if and .chezmoi.osRelease .chezmoi.osRelease.id (eq .chezmoi.osRelease.id "ubuntu") -}}
23set-option -s set-clipboard off
24bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i"
25{{- end}}
26
27set -g @plugin "tmux-plugins/tpm"
28
29#set -g @plugin 'christoomey/vim-tmux-navigator'
30set -g @plugin 'dracula/tmux'
31set -g @plugin 'tmux-plugins/tmux-resurrect'
32# This should be the latest plugin (more info: https://github.com/tmux-plugins/tmux-continuum/blob/0698e8f4b17d6454c71bf5212895ec055c578da0/README.md#known-issues)
33set -g @plugin 'tmux-plugins/tmux-continuum'
34
35set -g @resurrect-capture-pane-contents 'on'
36set -g @continuum-restore 'on'
37
38set -g @dracula-show-fahrenheit false
39set -g @dracula-show-powerline true
40{{if or (and .chezmoi.os (eq .chezmoi.os "darwin")) (and .chezmoi.osRelease .chezmoi.osRelease.id (eq .chezmoi.osRelease.id "ubuntu" "debian")) -}}
41set -g @dracula-plugins "cpu-usage ram-usage weather"
42{{- else if and .chezmoi.os (eq .chezmoi.os "android") -}}
43set -g @dracula-plugins "ram-usage"
44{{- else -}}
45set -g @dracula-plugins "ram-usage weather"
46{{- end }}
47set -g @dracula-fixed-location "Barcelona"
48set -g @dracula-show-flags true
49set -g @dracula-show-left-icon session
50set -g status-position bottom
51
52# Automatic tpm installation
53if "test ! -d ~/.tmux/plugins/tpm" \
54 "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
55
56# NOTE: Keep the following line at the end of the file
57run '~/.tmux/plugins/tpm/tpm'