101 lines
2.4 KiB
Bash
101 lines
2.4 KiB
Bash
#############
|
|
### THEME ###
|
|
#############
|
|
|
|
set -g default-terminal "tmux-256color"
|
|
|
|
run ~/.config/tmux/plugins/catppuccin/tmux/catppuccin.tmux
|
|
|
|
set -g @catppuccin_flavor "mocha" # latte, frappe, macchiato, or mocha
|
|
set -g @catppuccin_window_status_style "rounded" # basic, rounded, slanted, custom, or none
|
|
|
|
set -g status-right-length 100
|
|
set -g status-right "#{E:@catppuccin_status_application}#{E:@catppuccin_status_session}"
|
|
set -g status-left ""
|
|
|
|
################
|
|
### BINDINGS ###
|
|
################
|
|
|
|
## PREFIXED
|
|
|
|
# r : RELOAD
|
|
bind r source-file ~/.config/tmux/tmux.conf
|
|
|
|
# | : HORIZONTAL SPLIT
|
|
bind | split-window -h
|
|
|
|
# - : VERTICAL SPLIT
|
|
bind - split-window -v
|
|
|
|
# X : KILL PANE
|
|
bind X kill-pane
|
|
|
|
# Alt-arrow : RESIZE 1 ROW
|
|
bind M-Left resize-pane -L 1 \; switch-client -T prefix
|
|
bind M-Down resize-pane -D 1 \; switch-client -T prefix
|
|
bind M-Up resize-pane -U 1 \; switch-client -T prefix
|
|
bind M-Right resize-pane -R 1 \; switch-client -T prefix
|
|
|
|
# C-arrow : RESIZE 5 ROWS
|
|
bind C-Left resize-pane -L 5 \; switch-client -T prefix
|
|
bind C-Down resize-pane -D 5 \; switch-client -T prefix
|
|
bind C-Up resize-pane -U 5 \; switch-client -T prefix
|
|
bind C-Right resize-pane -R 5 \; switch-client -T prefix
|
|
|
|
bind M-m select-pane -l
|
|
|
|
## UNPREFIXED
|
|
|
|
# Alt-arrow : SWITCH PANES
|
|
bind -n M-Left select-pane -L
|
|
bind -n M-Down select-pane -D
|
|
bind -n M-Up select-pane -U
|
|
bind -n M-Right select-pane -R
|
|
|
|
# Alt-hjkl : SWITCH PANES
|
|
bind -n M-h select-pane -L
|
|
bind -n M-j select-pane -D
|
|
bind -n M-k select-pane -U
|
|
bind -n M-l select-pane -R
|
|
|
|
# Alt-z : FULL SCREEN
|
|
bind -n M-z resize-pane -Z
|
|
|
|
################
|
|
### SETTINGS ###
|
|
################
|
|
|
|
# Enable mouse
|
|
set -g mouse on
|
|
|
|
# Don't rename windows automatically
|
|
set-option -g allow-rename off
|
|
|
|
# Don't do anything when a 'bell' rings
|
|
set -g visual-activity off
|
|
set -g visual-bell off
|
|
set -g visual-silence off
|
|
setw -g monitor-activity off
|
|
set -g bell-action none
|
|
|
|
## Vi mode copying
|
|
|
|
# Enable Vi keybindings in copy mode
|
|
set-window-option -g mode-keys vi
|
|
|
|
# Bind 'v' to start selection in copy mode
|
|
bind-key -T copy-mode-vi v send -X begin-selection
|
|
|
|
# Bind 'y' to copy the selection to the system clipboard
|
|
bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel
|
|
|
|
# Bind 'Y' to copy the entire buffer to the system clipboard
|
|
bind-key -T copy-mode-vi Y send -X copy-pipe-and-cancel
|
|
|
|
##################
|
|
### LOCAL CONF ###
|
|
##################
|
|
|
|
if-shell "[ -f ~/.config/tmux/local.tmux.conf ]" "source-file ~/.config/tmux/local.tmux.conf"
|