diff options
author | sinanmohd <sinan@firemail.cc> | 2023-07-02 08:54:45 +0530 |
---|---|---|
committer | sinanmohd <sinan@firemail.cc> | 2023-07-02 08:54:45 +0530 |
commit | f75aaee39f79adac35f14c3a05d4b08f4e2690d2 (patch) | |
tree | 1bb9483ddef34b547fd4db3d932c44e6e1638367 /damb | |
parent | 49dfd829ffa55065acf44d0e055a4c64b2798094 (diff) |
damb: update display server selection logic
Diffstat (limited to 'damb')
-rwxr-xr-x | damb | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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" & |