summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-07-20 00:58:46 -0500
committerzachir <zachir@librem.one>2023-07-20 01:01:08 -0500
commitf8168692d7c42a168270c73974607730619342ce (patch)
tree1564d21d93f335bf18bf3bce22d9e89381ed5a68
parent9aeae2e662aa1384b14fa507b525dadd30300499 (diff)
Fix catclip on wayland
-rw-r--r--sh/functions6
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 () {