summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sh/functions6
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 () {