summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-07-20 00:58:46 -0500
committerzachir <zachir@librem.one>2023-08-10 21:34:55 -0500
commit56e346da2d358df90badd7a77663277bf5ad59a8 (patch)
treefa91cfad67a9026ab6ddfb600ffc6ead0f6da047
parent5ce04b9775f27a5d540ee231be01ff464a19ac6b (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 () {