1 2 3 4 5 6
#!/bin/sh [ "$1" = "-p" ] && arg='primary' if [ "$WAYLAND_DISPLAY" ] then wl-paste -n "$1" else xclip -o -selection "${arg:-clipboard}" -r fi