Hi,
On Tue, 28 Jul 2020 12:59:27 -0400, Kaushal Modi wrote:
> set -g set-clipboard off # default is on
If your terminal supports OSC-52 escape sequences, you can leave this
setting at its default value and have tmux's copy-mode selections and
mouse selections go directly to your clipboard (without the need for
intermediary tools like xclip and their X11-forwarding requirements).
By default, tmux writes to X11's primary selection, but you can tell it
to instead write to X11's clipboard selection using a terminal-override:
# yank to system clipboard rather than primary selection
#
http://invisible-island.net/xterm/terminfo-contents.html#tic-xterm_tmux
set-option -ga terminal-overrides ',xterm*:Ms=\E]52;c;%p2%s\007'
Another advantage of this approach is that it works over SSH (through
any number of additional SSH sessions nested therein)! See my article
for more information:
https://sunaku.github.io/tmux-yank-osc52.html
Cheers.