53 lines
1.8 KiB
Bash
53 lines
1.8 KiB
Bash
# ~/.config/tmux/tmux.conf
|
|
|
|
# Enable extended key reporting for terminals/apps that support it.
|
|
set -g extended-keys on
|
|
set -g extended-keys-format csi-u
|
|
|
|
# Index windows/tabs and panes from 1 instead of 0.
|
|
set -g base-index 1
|
|
setw -g pane-base-index 1
|
|
|
|
# Automatically close gaps in window/tab numbers after a window is closed.
|
|
set -g renumber-windows on
|
|
|
|
# Use 256-colour tmux terminfo and advertise truecolour support to apps.
|
|
set -g default-terminal "tmux-256color"
|
|
set -as terminal-features ",*:RGB"
|
|
|
|
# Keep a large scrollback history.
|
|
set -g history-limit 1000000
|
|
|
|
# Reload config with prefix + r.
|
|
bind-key r source-file ~/.config/tmux/tmux.conf \; display-message "tmux config reloaded"
|
|
|
|
# Pane navigation with Vim-style keys
|
|
bind-key h select-pane -L
|
|
bind-key j select-pane -D
|
|
bind-key k select-pane -U
|
|
bind-key l select-pane -R
|
|
|
|
# Mouse support: scroll with the wheel, resize/select panes, and make mouse
|
|
# selections pane-aware instead of selecting across the whole terminal window.
|
|
set-option -g mouse on
|
|
|
|
# Vim-like copy mode
|
|
setw -g mode-keys vi
|
|
|
|
# Quieter tmux: no audible/visual bell or activity bell noise
|
|
set-option -g bell-action none
|
|
set-option -g visual-bell off
|
|
set-option -g visual-activity off
|
|
set-window-option -g monitor-bell off
|
|
|
|
# Vi-style selection/copy bindings in copy-mode.
|
|
# tmux copy-mode sends plain text, not ANSI colour/control codes.
|
|
bind-key -T copy-mode-vi v send-keys -X begin-selection
|
|
bind-key -T copy-mode-vi C-v send-keys -X rectangle-toggle
|
|
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel
|
|
bind-key -T copy-mode-vi Enter send-keys -X copy-selection-and-cancel
|
|
|
|
# Mouse drag selection stays inside the pane; releasing the mouse copies it to
|
|
# the system clipboard using wl-copy.
|
|
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-selection-and-cancel
|