From: Maximilian Friedersdorff Date: Tue, 4 May 2021 07:59:56 +0000 (+0100) Subject: Expand wm_paste to cover wayland X-Git-Url: https://git.friedersdorff.com/?a=commitdiff_plain;h=7d48f821e2b663373c76ff6da2107d80058edd82;p=max%2Fsaltfiles.git Expand wm_paste to cover wayland --- 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 diff --git a/states/tmux/files/wm_paste b/states/tmux/files/wm_paste index d96d0ee..f25a0d2 100644 --- a/states/tmux/files/wm_paste +++ b/states/tmux/files/wm_paste @@ -1,3 +1,7 @@ #!/bin/sh -xclip -o -selection "clipboard" +if [[ XDG_SESSION_TYPE == "wayland" ]]; then + wl-paste +else + xclip -o +fi