From 0062fbf55097480d4ff595a7f070e4b1d44e09a1 Mon Sep 17 00:00:00 2001 From: Lionel Sambuc Date: Tue, 5 May 2026 08:41:32 +0200 Subject: [PATCH] tmux: Support mouse mode and copy to clipboard --- _config/tmux/tmux.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/_config/tmux/tmux.conf b/_config/tmux/tmux.conf index 5991582..cb66d86 100644 --- a/_config/tmux/tmux.conf +++ b/_config/tmux/tmux.conf @@ -14,6 +14,14 @@ set -g default-terminal "tmux-256color" set -g mouse on bind-key -T prefix m set -g mouse\; display 'Mouse: #{?mouse,ON,OFF}' +# Copy to system clipboard +if-shell "uname | grep -q Darwin" \ + 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"' \ + 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"' +if-shell "uname | grep -q Darwin" \ + 'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"' \ + 'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"' + # Highlight pane with activity setw -g monitor-activity on