X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=states%2Ftmux%2Ffiles%2Fwm_copy;h=4e4750af167a458fd796409c3c3fe86af489b022;hb=bf414b48e94ca6e551138e70a13a9eac1413f2ff;hp=d11db6f8b5c55d7d689032caa67f82b88c66fc18;hpb=fc9d6ed81c336713988f92f13165a6dcdbe2c159;p=max%2Fsaltfiles.git diff --git a/states/tmux/files/wm_copy b/states/tmux/files/wm_copy index d11db6f..4e4750a 100644 --- a/states/tmux/files/wm_copy +++ b/states/tmux/files/wm_copy @@ -1,3 +1,7 @@ #!/bin/sh -xclip -i -selection "clipboard" +if [ $XDG_SESSION_TYPE == "wayland" ]; then + wl-copy < /dev/stdin > /dev/null +else + xclip -selection clipboard -i < /dev/stdin > /dev/null +fi