summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to 'bin')
-rwxr-xr-xbin/guiscripts/clipo8
-rwxr-xr-xbin/guiscripts/clipp8
2 files changed, 10 insertions, 6 deletions
diff --git a/bin/guiscripts/clipo b/bin/guiscripts/clipo
index e3ae714..39994f9 100755
--- a/bin/guiscripts/clipo
+++ b/bin/guiscripts/clipo
@@ -1,4 +1,6 @@
#!/bin/sh
-[ "$WAYLAND_DISPLAY" ] &&
- wl-paste -n ||
- xclip -o -selection clipboard -r
+[ "$1" = "-p" ] && arg='primary'
+if [ "$WAYLAND_DISPLAY" ]
+then wl-paste -n ${1}
+else xclip -o -selection "${arg:-clipboard}" -r
+fi
diff --git a/bin/guiscripts/clipp b/bin/guiscripts/clipp
index 538f69b..c9e4f51 100755
--- a/bin/guiscripts/clipp
+++ b/bin/guiscripts/clipp
@@ -1,4 +1,6 @@
#!/bin/sh
-[ "$WAYLAND_DISPLAY" ] &&
- wl-copy -n ||
- xclip -selection clipboard -r
+[ "$1" = "-p" ] && arg='primary'
+if [ "$WAYLAND_DISPLAY" ]
+then wl-copy -n $1
+else xclip -selection "${arg:-clipboard}" -r
+fi