Copybara bot | ca5ce64 | 2024-11-08 17:38:08 +0100 | [diff] [blame^] | 1 | set -g mouse on |
| 2 | |
| 3 | unbind C-b |
| 4 | set-option -g prefix C-a |
| 5 | bind-key C-a send-prefix |
| 6 | |
| 7 | bind c new-window -c "#{pane_current_path}" |
| 8 | bind v split-window -h -c "#{pane_current_path}" |
| 9 | bind h split-window -v -c "#{pane_current_path}" |
| 10 | unbind '"' |
| 11 | unbind % |
| 12 | |
| 13 | bind r source-file ~/.tmux.conf |
| 14 | |
| 15 | bind -n M-Left select-pane -L |
| 16 | bind -n M-Right select-pane -R |
| 17 | bind -n M-Up select-pane -U |
| 18 | bind -n M-Down select-pane -D |
| 19 | |
| 20 | set -sg escape-time 10 |
| 21 | |
| 22 | {{if and .chezmoi.osRelease .chezmoi.osRelease.id (eq .chezmoi.osRelease.id "ubuntu") -}} |
| 23 | set-option -s set-clipboard off |
| 24 | bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard -i" |
| 25 | {{- end}} |
| 26 | |
| 27 | set -g @plugin "tmux-plugins/tpm" |
| 28 | |
| 29 | #set -g @plugin 'christoomey/vim-tmux-navigator' |
| 30 | set -g @plugin 'dracula/tmux' |
| 31 | set -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) |
| 33 | set -g @plugin 'tmux-plugins/tmux-continuum' |
| 34 | |
| 35 | set -g @resurrect-capture-pane-contents 'on' |
| 36 | set -g @continuum-restore 'on' |
| 37 | |
| 38 | set -g @dracula-show-fahrenheit false |
| 39 | set -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")) -}} |
| 41 | set -g @dracula-plugins "cpu-usage ram-usage weather" |
| 42 | {{- else if and .chezmoi.os (eq .chezmoi.os "android") -}} |
| 43 | set -g @dracula-plugins "ram-usage" |
| 44 | {{- else -}} |
| 45 | set -g @dracula-plugins "ram-usage weather" |
| 46 | {{- end }} |
| 47 | set -g @dracula-fixed-location "Barcelona" |
| 48 | set -g @dracula-show-flags true |
| 49 | set -g @dracula-show-left-icon session |
| 50 | set -g status-position bottom |
| 51 | |
| 52 | # Automatic tpm installation |
| 53 | if "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 |
| 57 | run '~/.tmux/plugins/tpm/tpm' |