Add wl-clipboard support on *nix
Add wl-clipboard support on *nix

On *nix, clipboard is managed by graphical stack. There are two main
players out there: X.org server and Wayland. Despite running XWayland
proxy, dealing with X.org clipbiard is a pain because there are bunch of
corner cases when it does not work fine. Thus, we need a better solution
than simply using xclip/xsel tools. Luckily there is wl-clipboard [1]
project that solves this issue by providing wl-copy/wl-paste command
lines tools. This project is already packaged for popular Linux
distributives (such as Arch [2], Ubuntu [3] and Debian [4]). So this
commit adds support for wl-clipboard if Wayland session is detected.

Please note, there's a way to fallback to xclip/xsel because they work
somehow on Wayland anyway.

[1] https://github.com/bugaevc/wl-clipboard
[2] https://www.archlinux.org/packages/community/x86_64/wl-clipboard/
[3] https://packages.ubuntu.com/search?keywords=wl-clipboard
[4] https://packages.debian.org/search?keywords=wl-clipboard

atotto/clipboard