commit 32b6e386b3ff3aa102cfedd7dda72598be4c3924
parent bf216ec57eb224a3ff8bea0192e5f5eb3fc1842e
Author: Chris Bracken <chris@bracken.jp>
Date: Sat, 20 Sep 2025 18:54:56 +0900
tmux: use pbcopy instead of relying on set-clipboard
I'm on macOS most of the time. iTerm supports OSC 52 pasteboard
integration but Terminal.app does not, so just hardcode the interaction
with pbcopy for now.
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/.config/tmux/tmux.conf b/.config/tmux/tmux.conf
@@ -50,7 +50,8 @@ bind-key ? list-keys
# Use vi-like selection keys in copy mode.
set -g set-clipboard on
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
-bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
+bind-key -T copy-mode-vi 'y' send-keys -X copy-pipe-and-cancel "pbcopy"
+bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi 'r' send-keys -X rectangle-toggle
# Bindings: Clear screen and reset the scroll buffer.