summaryrefslogtreecommitdiff
path: root/sh
diff options
context:
space:
mode:
Diffstat (limited to 'sh')
-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 () {