Closed balsoft closed 2 years ago
Thanks! I assume that the copying will fail if a Wayland user has xsel
installed but it seems unlikely.
If a wayland user has xsel installed, chances are they're using Xwayland anyways and so xsel would work. This is handling the case of a pure wayland session with no Xwayland installed (e.g. I'm running such a session).
xsel(1) does not work on pure Wayland. There is a commonly used wl-copy(1) from wl-clipboard which provides similar functionality. Use it when xsel is not available. Also, don't spawn a useless
/bin/sh
and useexecvp
instead.