aboutsummaryrefslogtreecommitdiff
path: root/damb
diff options
context:
space:
mode:
Diffstat (limited to 'damb')
-rwxr-xr-xdamb7
1 files changed, 4 insertions, 3 deletions
diff --git a/damb b/damb
index 737e720..d1f198c 100755
--- a/damb
+++ b/damb
@@ -81,13 +81,14 @@ main()
paste=
dep_check "mpv"
- if [ -z "$DISPLAY" ]
- then
+ if [ -n "$WAYLAND_DISPLAY" ]; then
dep_check "wl-paste"
paste="$(wl-paste)"
- else
+ elif [ -n "$DISPLAY" ]; then
dep_check "xclip"
paste="$(xclip -o -sel clip)"
+ else
+ die "tty supported, run a display server"
fi
mpv --no-video "$paste" &