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

28 lines
511 B
Bash
Executable File

#!/bin/sh
m="rofi -dmenu -i -no-custom"
tutos() {
tutodir="$HOME/vid/Learning/"
cd "$tutodir" || exit
sel=$(fd -d 1 | $m -p " ")
[ -z "$sel" ] && exit 0
cd "$tutodir/$sel" || exit
play=$(fd -d 1 | sort -d | $m -p " ")
[ -z "$play" ] && exit 0
mpv "$play"
}
tele() {
canal="$(rofi -theme dprompt -dmenu -i -p " ")"
[ -z "$canal" ] && exit 0
mpv https://twitch.tv/"$canal"
}
MENU="$(printf "Twitch\\nTuto" | $m -p " ")"
case $MENU in
'Twitch') tele ;;
'Tuto') tutos ;;
esac