#!/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