set -g mouse on

set -sa terminal-overrides ",xterm*:Tc"
set-option -g destroy-unattached on

unbind C-b
set -g prefix C-Space
bind C-Space send-prefix

set -g base-index 1
set -g pane-base-index 1
set-window-option -g pane-base-index 1
set-option -g renumber-windows on

bind -n M-H previous-window
bind -n M-: next-window

# List of plugins
set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'catppuccin/tmux#sgoudham-patch-1'
set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tpm'

set -g @catppuccin_flavour 'mocha'
set -g @catppuccin_window_status_style "rounded"
set -g status-right-length 100
set -g status-left-length 100
set -g status-left ""
set -g status-right "#{E:@catppuccin_status_application}"
set -agF status-right "#{E:@catppuccin_status_cpu}"
set -ag status-right "#{E:@catppuccin_status_session}"
set -ag status-right "#{E:@catppuccin_status_uptime}"

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-selection
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel

unbind %
unbind '"'
bind ']' split-window -v -c "#{pane_current_path}"
bind '\' split-window -h -c "#{pane_current_path}"

bind C-l send-keys 'C-l'

run '~/.config/tmux/tpm/tpm'