Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

yank with mouse selection not working #160

Open
TwiggyWan opened this issue Jul 24, 2022 · 2 comments
Open

yank with mouse selection not working #160

TwiggyWan opened this issue Jul 24, 2022 · 2 comments

Comments

@TwiggyWan
Copy link

i'm trying to follow a guide in which it's explained how to get copy/paste working without shift.

but with the following config :

set -g mouse on
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_action 'copy-pipe-no-clear'

set -g @override_copy_command 'xsel -i --clipboard'
set -g @yank_selection_mouse 'primary'
set -g @yank_selection 'primary'

bind -T copy-mode    C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
bind -T copy-mode-vi C-c send -X copy-pipe-no-clear "xsel -i --clipboard"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'

I'm expecting to select something with the mouse, press y or Control-c, then go to any other app, press Control-v and have my selection pasted, but nothing happens.

when I list the keys I can see my bind:

bind-key    -T copy-mode    C-c   send-keys -X copy-pipe-no-clear "xsel -i --clipboard"

and xsel works fine on its own :

$ echo hello | xsel -i --clipboard # C-V contains 'hello' as expected

What am i doing wrong?

@yankee14
Copy link

yankee14 commented Nov 1, 2023

I have had the same issue for about 2-3 years now, just been dealing with yank not working. Have you ever found a way to resolve it?

@anakimluke
Copy link

Change @yank_selection_mouse from primary to clipboard. I think that does the trick ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants