dotfiles/tmux/tmux.conf

134 lines
4.7 KiB
Plaintext

set -g default-terminal "xterm-256color"
set -ag terminal-overrides ",*-256color:RGB"
setw -g mode-keys vi
set -g allow-passthrough on
# Increase scrollback buffer size from 2000 to 50000 lines
set -g history-limit 50000
# Focus events enabled for terminals that support them
set -g focus-events on
set -g mouse on
# Address vim mode switching delay (http://superuser.com/a/252717/65504)
set -s escape-time 0
# set -sg escape-time 20
# Configure window style (use default background)
set -g window-style "bg=default"
# set -g window-style "bg=#1a1b27" <-- option for filled background
# Configure status-bar
set -g status on
# default window with an activity alert
setw -g window-status-activity-style none
# start window indexing from 1 instead of 0
set -g base-index 1
# start pane indexing from 1 instead of 0
setw -g pane-base-index 1
# re-number windows when one is closed
set -g renumber-windows on
# Change prefix key from C-b to C-a
unbind C-b
set-option -g prefix C-a
bind-key C-a send-prefix
# VIM-like select and copy
bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection
unbind -T copy-mode-vi MouseDragEnd1Pane
# VIM-like pane switching
bind -r ^ last-window
bind k select-pane -U
bind j select-pane -D
bind h select-pane -L
bind l select-pane -R
unbind %
bind | split-window -h -c "#{pane_current_path}"
unbind '"'
bind - split-window -v -c "#{pane_current_path}"
unbind r
bind r source-file ~/.tmux.conf
unbind =
bind = choose-session
bind -r J resize-pane -D 5
bind -r K resize-pane -U 5
bind -r H resize-pane -L 5
bind -r L resize-pane -R 5
# bind -r m resize-pane -Z
# ---------------------------------------------------------------------------------------------------------------------
# https://github.com/catppuccin/tmux
set -g @catppuccin_flavour "mocha"
set -g @catppuccin_status_modules_right "application session user host date_time"
set -g @plugin "catppuccin/tmux"
# ---------------------------------------------------------------------------------------------------------------------
# https://github.com/laktak/extrakto
# Allow to complete text that is already on the screen. This works everywhere, even in remote ssh sessions.
# Activates by 'prefix + tab'
set -g @plugin "laktak/extrakto"
set -g @extrakto_insert_key "enter" # Key to insert selection.
set -g @extrakto_copy_key "ctrl-c" # Key to copy selection to clipboard.
# ---------------------------------------------------------------------------------------------------------------------
# https://github.com/tmux-plugins/tmux-open
# o - "open" a highlighted selection with the system default program.
# set -g @plugin 'tmux-plugins/tmux-open'
# ---------------------------------------------------------------------------------------------------------------------
# https://github.com/sainnhe/tmux-fzf
# 'prefix + F' (shift-F)
set -g @plugin 'sainnhe/tmux-fzf'
# ---------------------------------------------------------------------------------------------------------------------
# https://github.com/roy2220/easyjump.tmux
# Press prefix + S to invoke EasyJump.
# Press Ctrl + j to invoke EasyJump in copy mode.
# Press Enter to cancel EasyJump.
set -g @plugin "roy2220/easyjump.tmux"
set -g @easyjump-key-binding "S"
set -g @easyjump-text-attrs "\e[0m\e[38;5;243m"
# ---------------------------------------------------------------------------------------------------------------------
# https://github.com/schasse/tmux-jump
# 'prefix + s' and enter the first character of a word.
set -g @plugin 'schasse/tmux-jump'
set -g @jump-key 's'
# ---------------------------------------------------------------------------------------------------------------------
# https://github.com/MunifTanjim/tmux-mode-indicator
set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @mode_indicator_empty_prompt ' NORMAL '
set -g @mode_indicator_empty_mode_style "bg=default,fg=#3a4163"
set -g @mode_indicator_prefix_prompt ' WAIT '
set -g @mode_indicator_prefix_mode_style "bg=default,fg=#73a1fb"
set -g @mode_indicator_copy_prompt ' COPY '
set -g @mode_indicator_copy_mode_style "bg=default,fg=yellow"
set -g @mode_indicator_sync_prompt ' SYNC '
set -g @mode_indicator_sync_mode_style "bg=default,fg=red"
# ---------------------------------------------------------------------------------------------------------------------
# https://github.com/jaclu/tmux-menus
# 'prefix + \' to open the menu
set -g @plugin 'jaclu/tmux-menus'
# ---------------------------------------------------------------------------------------------------------------------
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin:/usr/local/bin"
run "~/.tmux/plugins/tpm/tpm"