summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-07-20 00:58:46 -0500
committerzachir <zachir@librem.one>2023-07-20 00:58:46 -0500
commitbd56292b033cfef8824466f2db4fbb2a7f67dbd2 (patch)
tree4ae7b404c1c60ddb694ad95471838b9e69eb1f91
parentf502f550d618d7ba56fc57ece5f273c9fcddf48e (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 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 () {