blob: da71719b1c4e536397d0f2268199bc7608102cfa (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
#!/usr/bin/env bash
# open youtube link in mpv
URL=https:$(awk -F'https%3a' '{print $2}' <<< "$1")
if curl --head --silent $URL > /dev/null 2>&1; then
echo "Opening Youtube video $URL" >> $HOME/.lynx-log
notify-send "Launching mpv $URL"
mpv $URL >/dev/null 2>&1 &
else
echo "Youtube video: invalid URL $URL" >> $HOME/.lynx-log
notify-send "invalid URL $URL"
fi
|