From f75aaee39f79adac35f14c3a05d4b08f4e2690d2 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Sun, 2 Jul 2023 08:54:45 +0530 Subject: damb: update display server selection logic --- damb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'damb') 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" & -- cgit v1.2.3