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

Possibility to set clipboard command #1

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

dyuri
Copy link

@dyuri dyuri commented Jan 8, 2024

Since I both have xclip and wl-copy installed and I don't want to uninstall xclip, I wanted to be able to manually set the clipboard copy command.

You can now set it via:

  • command line flag -c
  • configuration option clipboard_cmd

If not set, it falls back to the old autodetect mechanism.

@tjblackheart
Copy link
Owner

tjblackheart commented Jan 9, 2024

Hi @dyuri, thank you very much! I love that idea, however this implementation will crash if somebody enters a random string as clipboard_cmd into the config (i.e. a nonexistent binary).

I suppose the easiest way to fix that would be to just add prepend the (basepathed) custom string into the cmds slice, then the exec.LookPath check can work in any case.

@dyuri
Copy link
Author

dyuri commented Jan 9, 2024

👍
My problem with that is, that I also want to use some command line arguments (currently wl-copy -p -n), but I'll try to come up with something.

@dyuri dyuri marked this pull request as draft January 9, 2024 09:51
@dyuri
Copy link
Author

dyuri commented Jan 11, 2024

What about this kind of messaging?
image

@dyuri dyuri marked this pull request as ready for review January 11, 2024 18:52
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

Successfully merging this pull request may close these issues.

2 participants