From f5ccef0b788d924c9f524124098484d29a647f0a Mon Sep 17 00:00:00 2001 From: Andrejus Date: Thu, 12 Feb 2026 17:02:08 +0000 Subject: [PATCH] feat: tmux mouse mode --- files/home/.tmux.conf | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/files/home/.tmux.conf b/files/home/.tmux.conf index 5a55a6d..8a299b4 100644 --- a/files/home/.tmux.conf +++ b/files/home/.tmux.conf @@ -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"