unbind C-b set -g prefix C-a bind C-a send-prefix set -g base-index 1 set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0 # Basic functions bind -n M-n new-window bind -n M-- split-window -v bind -n M-| split-window -h bind -n M-R command-prompt -I "" "rename-window '%%'" bind -n M-X confirm-before "kill-window" bind -n M-x confirm-before "kill-pane" bind -n M-/ copy-mode # ALT interface for switching windows bind -n M-Tab last-window bind -n M-1 select-window -t 1 bind -n M-2 select-window -t 2 bind -n M-3 select-window -t 3 bind -n M-4 select-window -t 4 bind -n M-5 select-window -t 5 bind -n M-6 select-window -t 6 {{- if eq .chezmoi.os "darwin" }} bind-key -T copy-mode-vi 'y' send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' bind-key -T copy-mode-vi Enter send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel 'reattach-to-user-namespace pbcopy' {{- else }} bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -in -selection clipboard" {{- end }} # enable vi mode setw -g mode-keys vi # don't allow tmux to rename the window based on commands running set-option -wg automatic-rename off # upgrade $TERM set -g default-terminal "tmux-256color" set-option -sa terminal-features ',{{ .term }}:RGB' # Enable mouse mode (tmux 2.1 and above) set -g mouse on set -g default-command {{ .shell }} set -g default-shell {{ .shell }} set-option -g status-position top set -g @catppuccin_window_left_separator "" set -g @catppuccin_window_right_separator " " set -g @catppuccin_window_middle_separator " █" set -g @catppuccin_window_number_position "right" set -g @catppuccin_window_default_fill "number" set -g @catppuccin_window_default_text "#W" set -g @catppuccin_window_current_fill "number" set -g @catppuccin_window_current_text "#W" set -g @catppuccin_status_modules_right "directory user host date_time session" set -g @catppuccin_status_left_separator " " set -g @catppuccin_status_right_separator "" set -g @catppuccin_status_right_separator_inverse "no" set -g @catppuccin_status_fill "icon" set -g @catppuccin_status_connect_separator "no" set -g @catppuccin_directory_text "#{pane_current_path}" set -g @catppuccin_host_text "#{host_short}" set -g @catppuccin_directory_icon " " set -g @catppuccin_user_icon " " set -g @catppuccin_host_icon " " set -g @catppuccin_date_time_icon " " set -g @catppuccin_session_icon " " set -g @catppuccin_date_time_text "%H:%M" # List of plugins set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'tmux-plugins/tmux-pain-control' set -g @plugin 'tmux-plugins/tmux-logging' set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'catppuccin/tmux' {{- if eq .chezmoi.os "openbsd" }} set -g @plugin 'tmux-plugins/tmux-battery' {{- end }} # Initialize TMUX plugin manager run -b '~/.tmux/plugins/tpm/tpm'