summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbin/guiscripts/clipo4
-rwxr-xr-xbin/guiscripts/clipp4
-rw-r--r--config/essentials/zsh/aliases.sh9
3 files changed, 10 insertions, 7 deletions
diff --git a/bin/guiscripts/clipo b/bin/guiscripts/clipo
new file mode 100755
index 0000000..e3ae714
--- /dev/null
+++ b/bin/guiscripts/clipo
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ "$WAYLAND_DISPLAY" ] &&
+ wl-paste -n ||
+ xclip -o -selection clipboard -r
diff --git a/bin/guiscripts/clipp b/bin/guiscripts/clipp
new file mode 100755
index 0000000..538f69b
--- /dev/null
+++ b/bin/guiscripts/clipp
@@ -0,0 +1,4 @@
+#!/bin/sh
+[ "$WAYLAND_DISPLAY" ] &&
+ wl-copy -n ||
+ xclip -selection clipboard -r
diff --git a/config/essentials/zsh/aliases.sh b/config/essentials/zsh/aliases.sh
index e9c7e2f..575502c 100644
--- a/config/essentials/zsh/aliases.sh
+++ b/config/essentials/zsh/aliases.sh
@@ -17,18 +17,13 @@ then
alias calc='bc <<<'
- if [ "$WAYLAND_DISPLAY" ]
- then
- alias -g clipp='wl-copy -n'
- alias -g clipo='wl-paste -n'
- else
+ if [ -z "$WAYLAND_DISPLAY" ]
+ then
if which devour > /dev/null 2>&1
then
alias mpv='devour mpv'
alias zathura='devour zathura'
fi
- alias -g clipp='xclip -selection clipboard -r'
- alias -g clipo='xclip -o -selection clipboard -r'
fi
alias clipic='clipo > /tmp/pic.png'