From 40301fcd06d6ab7bb00c4166dfce6939eb70e9a1 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 44d8e4f..7a9f715 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