From b0caca4289dbb01b7522744ca3d8de0c31700243 Mon Sep 17 00:00:00 2001 From: Alexander Whitestone Date: Sun, 15 Mar 2026 08:11:49 -0400 Subject: [PATCH] fix: mouse-select copies to system clipboard via pbcopy Drag-select, y, or Enter in copy-mode all pipe to pbcopy. Holding Option still bypasses tmux for native Terminal.app select. --- tmux/tmux.conf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tmux/tmux.conf b/tmux/tmux.conf index 0a19adf..c7d34ce 100644 --- a/tmux/tmux.conf +++ b/tmux/tmux.conf @@ -31,6 +31,14 @@ set -g pane-active-border-style "fg=#6c5ce7" set -g pane-border-status top set -g pane-border-format " #{pane_title} " +# ── Copy / Paste ────────────────────────────────────────────────────── +# Mouse-select copies to system clipboard automatically +set -g set-clipboard on +setw -g mode-keys vi +bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy" +bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy" +bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel "pbcopy" + # ── Quality of Life ─────────────────────────────────────────────────── # Easier splits (keep old bindings too) bind | split-window -h -c "#{pane_current_path}"