blob: 5a2e09e7e1935ae24b251d7913f24eac72631cda (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/bin/sh
case "$1" in
"-d")
save_path="$(find "$(xdg-user-dir VIDEOS)" -maxdepth 2 -type d | fzf)"
notify-send "Downloading…"
setsid -f sh -c "yt-dlp $2 -o $save_path/%\(title\)s.%\(ext\)s && notify-send 'newsboat' 'Finished downloading'" 1>/dev/null;;
*youtube.com*|*youtu.be*)
setsid -f "$(command -v io.mpv.Mpv mpv | head -1)" --no-terminal -- "$1" 1>/dev/null 2>&1;;
*)
setsid -f "$BROWSER" "$1" 1>/dev/null 2>&1;;
esac
|