diff options
author | zachir <zachir@librem.one> | 2023-07-20 00:58:46 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-08-10 21:34:55 -0500 |
commit | 56e346da2d358df90badd7a77663277bf5ad59a8 (patch) | |
tree | fa91cfad67a9026ab6ddfb600ffc6ead0f6da047 /sh | |
parent | 5ce04b9775f27a5d540ee231be01ff464a19ac6b (diff) |
Fix catclip on wayland
Diffstat (limited to 'sh')
-rw-r--r-- | sh/functions | 6 |
1 files changed, 5 insertions, 1 deletions
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 () { |