Fix cliplumber error reporting
This commit is contained in:
parent
c189ae8ae3
commit
38e3917e37
2 changed files with 12 additions and 5 deletions
|
@ -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")
|
||||||
|
|
8
bin/playvideo
Executable file
8
bin/playvideo
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$1" = "-h" ] || [ "$#" -ne "1" ]; then
|
||||||
|
>&2 echo "Usage: $0 <input.mp4> <output.gif>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
mpv --ytdl-format='bestvideo[height<=?720]+bestaudio/best' "$1" 2>&1 | grep 'ERROR:' | tee /dev/fd/2 | xargs -n1 -d "\n" notify-send
|
Loading…
Add table
Reference in a new issue