aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dotfiles/common/.tmux.conf11
1 files changed, 7 insertions, 4 deletions
diff --git a/dotfiles/common/.tmux.conf b/dotfiles/common/.tmux.conf
index 071be99..6c18a05 100644
--- a/dotfiles/common/.tmux.conf
+++ b/dotfiles/common/.tmux.conf
@@ -81,10 +81,13 @@ unbind-key C-z
set -g status-keys emacs
# copy-mode keys mirror the Emacs cj/vterm-tmux-history story
-# (~/.emacs.d/modules/vterm-config.el): M-w copies and stays in mode
-# for repeated copying; q / Escape / C-g exit without copying;
-# Enter is unbound so RET has no "copy and exit" shortcut.
-bind-key -T copy-mode M-w send-keys -X copy-selection
+# (~/.emacs.d/modules/vterm-config.el): M-w copies to the system
+# clipboard via wl-copy and stays in mode for repeated copying;
+# q / Escape / C-g exit without copying; Enter is unbound so RET
+# has no "copy and exit" shortcut. `copy-selection' alone writes
+# only to tmux's internal paste buffer; the pipe-no-clear variant
+# reaches the OS clipboard and keeps the selection visible.
+bind-key -T copy-mode M-w send-keys -X copy-pipe-no-clear "wl-copy"
bind-key -T copy-mode C-g send-keys -X cancel
unbind-key -T copy-mode Enter