aboutsummaryrefslogtreecommitdiff
path: root/dotfiles
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2026-05-18 17:07:51 -0400
committerCraig Jennings <c@cjennings.net>2026-05-18 17:07:51 -0400
commit99efe19e30dbcc4c162ff47411d7add94e55424f (patch)
treeb106bfbf2b250a8ea2f90f27fd2caebaa155afb6 /dotfiles
parent01a1aea2afe5a7a63ca55d13a1552050ca3a772b (diff)
downloadarchsetup-99efe19e30dbcc4c162ff47411d7add94e55424f.tar.gz
archsetup-99efe19e30dbcc4c162ff47411d7add94e55424f.zip
fix(tmux): pipe M-w copies to the system clipboard via wl-copy
`copy-selection' writes only to tmux's internal paste buffer, so a paste in any other app got stale content. Switch the M-w binding to `copy-pipe-no-clear "wl-copy"' (same engine as the existing y binding, minus the -and-cancel so M-w stays in copy-mode for repeated grabs). The selection stays visible after copy to make multi-range copying easier to follow.
Diffstat (limited to 'dotfiles')
-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