X-Git-Url: https://git.friedersdorff.com/?a=blobdiff_plain;f=states%2Ftmux%2Ffiles%2Fwm_copy;h=44a802cd431a58dfeb5264cd83e05e592b973ff8;hb=7d48f821e2b663373c76ff6da2107d80058edd82;hp=d11db6f8b5c55d7d689032caa67f82b88c66fc18;hpb=fc9d6ed81c336713988f92f13165a6dcdbe2c159;p=max%2Fsaltfiles.git diff --git a/states/tmux/files/wm_copy b/states/tmux/files/wm_copy index d11db6f..44a802c 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 -i < /dev/stdin > /dev/null +fi