dgy
/
hexagons
Archived
1
0
Fork 0
This repository has been archived on 2021-03-24. You can view files and clone it, but cannot push or open issues or pull requests.
hexagons/.local/bin/tv

35 lines
645 B
Plaintext
Raw Normal View History

#!/bin/sh
tutos(){
tutodir="$HOME/vid/Learning/"
cd "$tutodir" || exit
sel=$(fd -d 1 'ztm' | dmenu -i -p " ")
if [ "$sel" = "" ]; then
exit 0
else
cd "$tutodir/$sel" || exit
play=$(fd -d 1 | sort -d | dmenu -i -p " ")
if [ "$play" = "" ]; then
exit 0
else
mpv "$play"
fi
fi
}
tele(){
canal="$(dmenu -i -p " ")" 2> /dev/null
if [ "$canal" = "" ]; then
exit 0
else
mpv https://twitch.tv/"$canal"
fi
}
MENU="$(printf "Twitch\\nTuto" | dmenu -i -w 120 -p "磊 ")"
case $MENU in
'Twitch') tele;;
'Tuto') tutos;;
esac