From 7d48f821e2b663373c76ff6da2107d80058edd82 Mon Sep 17 00:00:00 2001 From: Maximilian Friedersdorff Date: Tue, 4 May 2021 08:59:56 +0100 Subject: [PATCH] Expand wm_paste to cover wayland --- states/tmux/files/wm_copy | 6 +++++- states/tmux/files/wm_paste | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) 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 -- 2.45.2