diff options
author | zachir <zachir@librem.one> | 2023-07-20 00:58:46 -0500 |
---|---|---|
committer | ZachIR <zachir@zdx-raina> | 2023-07-26 10:25:53 -0500 |
commit | 40301fcd06d6ab7bb00c4166dfce6939eb70e9a1 (patch) | |
tree | 0cc4ee300d7bf9cedb7bdf4e17bc706a29ef0053 | |
parent | 7bb7b3595a443a7e52f9f83e12340602cccd0148 (diff) |
Fix catclip on wayland
-rw-r--r-- | sh/functions | 6 |
1 files changed, 5 insertions, 1 deletions
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 () { |