feat: tmux mouse mode

This commit is contained in:
2026-02-12 17:02:08 +00:00
parent 6164746811
commit f5ccef0b78

View File

@@ -14,14 +14,21 @@ set -g default-shell "$SHELL"
set -g base-index 1
setw -g pane-base-index 1
set -g renumber-windows on
set -g history-limit 50000
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 cancel
bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy 2>/dev/null || xclip -selection clipboard 2>/dev/null || xsel --clipboard"
# Splits
bind | split-window -h -c "#{pane_current_path}"
@@ -43,6 +50,9 @@ 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"