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

26 lines
513 B
Bash
Executable File

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