|
|
@ -14,9 +14,9 @@ check_exists() { |
|
|
done |
|
|
done |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if ! which wl-paste > /dev/null && [ ! -z "$WAYLAND_DISPLAY" ]; then |
|
|
if ! which wl-paste > /dev/null 2>&1 && [ ! -z "$WAYLAND_DISPLAY" ]; then |
|
|
die "Wayland detected and wl-paste not found" |
|
|
die "Wayland detected and wl-paste not found" |
|
|
elif ! which xsel > /dev/null && [ -z "$WAYLAND_DISPLAY" ]; then |
|
|
elif ! which xsel > /dev/null 2>&1 && [ -z "$WAYLAND_DISPLAY" ]; then |
|
|
die "xsel not found" |
|
|
die "xsel not found" |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
@ -61,8 +61,7 @@ case "$choice" in |
|
|
path="$HOME/mus/$(printf "%s" "$choice" | cut -d " " -f 2-)" |
|
|
path="$HOME/mus/$(printf "%s" "$choice" | cut -d " " -f 2-)" |
|
|
[ -d "$path" ] || mkdir -p "$path" |
|
|
[ -d "$path" ] || mkdir -p "$path" |
|
|
cd "$path" || exit |
|
|
cd "$path" || exit |
|
|
youtube-dl -x --audio-format mp3 --no-playlist -o "%(title)s.%(ext)s" "$urls" 2>&1 | grep 'ERROR:' | xargs -n1 -d "\n" notify-send |
|
|
youtube-dl -x --audio-format mp3 --no-playlist -o "%(title)s.%(ext)s" "$urls" 2>&1 | grep 'ERROR:' | tee /dev/fd/2 | xargs -n1 -d "\n" notify-send |
|
|
#notify-send "Error while downloading: $clip" |
|
|
|
|
|
;; |
|
|
;; |
|
|
"crawl") |
|
|
"crawl") |
|
|
path="$HOME/books/" |
|
|
path="$HOME/books/" |
|
|
@ -80,7 +79,7 @@ case "$choice" in |
|
|
dragon -x "$clip" |
|
|
dragon -x "$clip" |
|
|
;; |
|
|
;; |
|
|
"play") |
|
|
"play") |
|
|
mpv --ytdl-format='bestvideo[height<=?720]+bestaudio/best' "$clip" 2>&1 | grep 'ERROR:' | xargs -n1 -d "\n" notify-send |
|
|
playvideo "$clip" |
|
|
|
|
|
|
|
|
;; |
|
|
;; |
|
|
"audio-search") |
|
|
"audio-search") |
|
|
|