tmux-yank icon indicating copy to clipboard operation
tmux-yank copied to clipboard

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

Open nunojsa opened this issue 1 year ago • 3 comments

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 avatar Jun 07 '23 19:06 nunojsa

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

nunojsa avatar Jul 13 '23 13:07 nunojsa

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.

anakimluke avatar Sep 03 '23 04:09 anakimluke

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.

nunojsa avatar Sep 07 '23 08:09 nunojsa