From f8168692d7c42a168270c73974607730619342ce Mon Sep 17 00:00:00 2001 From: zachir Date: Thu, 20 Jul 2023 00:58:46 -0500 Subject: Fix catclip on wayland --- sh/functions | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sh/functions b/sh/functions index 3c73fb7..e8515d8 100644 --- a/sh/functions +++ b/sh/functions @@ -1,6 +1,10 @@ #!/bin/sh catclip () { - cat $@ | xclip -selection clipboard + if [ -n "$WAYLAND_DISPLAY" ]; then + cat $@ | wl-copy + elif [ -n "$DISPLAY" ]; then + cat $@ | xclip -selection clipboard + fi } catpass () { -- cgit v1.2.3