1 2 3 4 5 6 7
#!/usr/bin/env sh url="$(xclip -o -selection clipboard)" log="$(mktemp)" cmd="mpv -quiet $url 2>&1 > $log" echo "$cmd" eval "$cmd" || notify-send "$url" "$(cat "$log")"