tmux-plugins / tmux-yank

Tmux plugin for copying to system clipboard. Works on OSX, Linux and Cygwin.
https://tmux-plugins.github.io/tmux-yank/
MIT License
2.72k stars 122 forks source link

scripts: helpers.sh: use primary clipboard on wayland with mouse #168

Open nunojsa opened 1 year ago

nunojsa commented 1 year ago

Follow the same logic as in X and use the primary clipboard for Wayland sessions when mouse support is on.

Note a new parameter (@yank_wayland_mouse), which is off by default, was introduced so that the old behavior is maintained. That means that users need to set the following in their tmux.conf:

set -g @yank_wayland_mouse 'true'

to enable the above behavior.

nunojsa commented 1 year ago

@bruno- @ctjhoa @jbnicolai can anyone give some feedback or is this not maintained anymore?

anakimluke commented 1 year ago

Hey! Thanks for the PR! Why have a yank_wayland_mouse option in addition to yank_selection_mouse? I guess your reasoning is to keep backwards compatibility? I think it'd ok not to have it. Only people that have yank_selection_mouse set AND don't use it AND are on wayland would encounter different behaviour, if I understood correctly.

nunojsa commented 1 year ago

guess your reasoning is to keep backwards compatibility?

Exactly...

Only people that have yank_selection_mouse set AND don't use it AND are on wayland would encounter different behaviour, if I understood correctly.

Not sure about that. I think anyone using wayland with mouse will see different behavior. With this change wl-copy --primary will be used by default (assuming no option is given). And that is different from using wl-copy.