aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@firemail.cc>2023-07-02 08:54:45 +0530
committersinanmohd <sinan@firemail.cc>2023-07-02 08:54:45 +0530
commitf75aaee39f79adac35f14c3a05d4b08f4e2690d2 (patch)
tree1bb9483ddef34b547fd4db3d932c44e6e1638367
parent49dfd829ffa55065acf44d0e055a4c64b2798094 (diff)
damb: update display server selection logic
-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" &