andcli icon indicating copy to clipboard operation
andcli copied to clipboard

Possibility to set clipboard command

Open dyuri opened this issue 1 year ago • 3 comments

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.

dyuri avatar Jan 08 '24 18:01 dyuri

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.

tjblackheart avatar Jan 09 '24 09:01 tjblackheart

👍 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 avatar Jan 09 '24 09:01 dyuri

What about this kind of messaging? image

dyuri avatar Jan 11 '24 18:01 dyuri