Files
dotfiles/files/home/.tmux.conf
2026-02-12 17:11:08 +00:00

77 lines
2.1 KiB
Bash

# Prefix: Ctrl+A
unbind C-b
set -g prefix C-a
bind C-a send-prefix
# True color
set -g default-terminal "tmux-256color"
set -ag terminal-overrides ",xterm-256color:RGB"
# Shell
set -g default-shell "$SHELL"
# Windows and panes start at 1
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g history-limit 100000
set -sg escape-time 10
set -g focus-events on
set -g display-time 4000
# Mouse
set -g mouse on
set -g set-clipboard on
# Copy mode
setw -g mode-keys vi
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy 2>/dev/null || xclip -selection clipboard 2>/dev/null || xsel --clipboard"
bind -T copy-mode-vi MouseDown1Pane send -X clear-selection
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe "pbcopy 2>/dev/null || xclip -selection clipboard 2>/dev/null || xsel --clipboard"
# Splits
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
unbind '"'
unbind %
bind c new-window -c "#{pane_current_path}"
# Pane navigation
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Pane resize
bind -r C-h resize-pane -L 5
bind -r C-j resize-pane -D 5
bind -r C-k resize-pane -U 5
bind -r C-l resize-pane -R 5
# Quick switch to last window
bind a last-window
# Reload
bind r source-file ~/.tmux.conf \; display "Config reloaded"
# Status bar
set -g status-position bottom
set -g status-interval 5
set -g status-style "fg=#728cb8,bg=default"
set -g status-left ""
set -g status-right ""
set -g window-status-format " #I:#W "
set -g window-status-current-format "#[fg=#2cb494,bold] #I:#W "
set -g window-status-bell-style "fg=#f88c14,bold"
set -g pane-border-style "fg=#728cb8"
set -g pane-active-border-style "fg=#2cb494"
set -g message-style "fg=#2cb494,bg=default"
set -g message-command-style "fg=#f88c14,bg=default"
set -g mode-style "fg=default,bg=#728cb8,bold"
# Auto-rename
set -g automatic-rename on
set -g automatic-rename-format '#{?#{==:#{pane_current_command},zsh},zsh:#{b:pane_current_path},#{pane_current_command}}'