BIN: Deletes open-youtube and puts functionality in yt

The yt script now accepts a --url option which will take a url as an
option like

yt --url youtube.com/watch?v=blar
or
echo youtube.com/watch?v=blar | yt --url

It will also use rofi rather than fzf if not being run from a terminal
or the --rofi flag is given

I have updated the files that used to use open-youtube to reflect this
This commit is contained in:
Jonathan Hodgson 2021-07-30 13:14:50 +01:00
parent c619f884bd
commit 99736427be
5 changed files with 99 additions and 52 deletions

View file

@ -9,9 +9,9 @@ url="$1"
browser="${BROWSER:-firefox-developer-edition}"
case "$url" in
*"//invidious.*/"*) open-youtube "$url"; exit 0 ;;
*//*.youtube.*/*) open-youtube "$url"; exit 0 ;;
*"//videos.*"*) open-youtube "$url"; exit 0 ;;
*"//invidious.*/"*) yt --url "$url"; exit 0 ;;
*//*.youtube.*/*) yt --url "$url"; exit 0 ;;
*"//videos.*"*) yt --url "$url"; exit 0 ;;
*"//xkcd.com/"*) xkcd "$url"; exit 0 ;;
"mailto:"*) neomutt "$url"; exit 0 ;;
*) $browser "$url"; exit 0 ;;