Closed laur89 closed 4 years ago
Hi @laur89 and thanks for your PR!
What's the reason for xsel? https://askubuntu.com/a/898094/402745?
Also could you move the cleanup into a separate PR? Thank you!
Reason is xclip doesn't work nice with neovim (maybe also affects vim, unsure). It's extremely minor thing, but annoying one. eg see
Think there's some interplay between xclip and clipboard manager. But easiest way was avoiding xclip altogether.
I use vim in the terminal so I can't say.
Are you sure that switching to xsel won't break it for existing users or do we need an option?
That's a good question, and quite frankly i do not know. Wouldn't expect it to break anything - xsel, in my experience, works just fine; and if they don't have xsel then it'll fall through to try other options. I've been using extrakto from my branch and it's been just fine so far. Plus all the other ecosystem depending on xsel instead of xclip.
So my best guess is it's fine to go with it. But to make things safer/more flexible in the future, i think we should start using a config file to allow users to deviate from our defaults.
Choosing the clip tool is already an option, I've added it as a sample to the readme:
set -g @extrakto_clip_tool "xsel --input --clipboard" # works better for nvim
Does this work for you?
Because of the potential for breaking things I'm not going to accept the PR at this time. Thank you.
Ah this is perfect, cheers.