blob: 72f4b3dca59cf861641af84ea76dab94bf8bc3ac [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
Adrià Vilanova Martínezaf5754f2024-11-23 12:22:23 +010022{{if and .chezmoi.os (eq .chezmoi.os "linux") -}}
23if-shell 'test "$XDG_SESSION_TYPE" = "wayland"' '
24 set-option -s copy-command 'wl-copy'
25' '
26 # Assume we're running X if we're not running Wayland.
27 set-option -s set-clipboard off
28 bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i"
29'
Copybara botca5ce642024-11-08 17:38:08 +010030{{- end}}
31
32set -g @plugin "tmux-plugins/tpm"
33
34#set -g @plugin 'christoomey/vim-tmux-navigator'
35set -g @plugin 'dracula/tmux'
36set -g @plugin 'tmux-plugins/tmux-resurrect'
37# This should be the latest plugin (more info: https://github.com/tmux-plugins/tmux-continuum/blob/0698e8f4b17d6454c71bf5212895ec055c578da0/README.md#known-issues)
38set -g @plugin 'tmux-plugins/tmux-continuum'
39
40set -g @resurrect-capture-pane-contents 'on'
41set -g @continuum-restore 'on'
42
43set -g @dracula-show-fahrenheit false
44set -g @dracula-show-powerline true
45{{if or (and .chezmoi.os (eq .chezmoi.os "darwin")) (and .chezmoi.osRelease .chezmoi.osRelease.id (eq .chezmoi.osRelease.id "ubuntu" "debian")) -}}
46set -g @dracula-plugins "cpu-usage ram-usage weather"
47{{- else if and .chezmoi.os (eq .chezmoi.os "android") -}}
48set -g @dracula-plugins "ram-usage"
49{{- else -}}
50set -g @dracula-plugins "ram-usage weather"
51{{- end }}
52set -g @dracula-fixed-location "Barcelona"
53set -g @dracula-show-flags true
54set -g @dracula-show-left-icon session
55set -g status-position bottom
56
57# Automatic tpm installation
58if "test ! -d ~/.tmux/plugins/tpm" \
59 "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
60
61# NOTE: Keep the following line at the end of the file
62run '~/.tmux/plugins/tpm/tpm'