diff options
author | zachir <zachir@librem.one> | 2023-07-20 00:58:46 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-07-20 01:01:08 -0500 |
commit | f8168692d7c42a168270c73974607730619342ce (patch) | |
tree | 1564d21d93f335bf18bf3bce22d9e89381ed5a68 | |
parent | 9aeae2e662aa1384b14fa507b525dadd30300499 (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 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 () { |