20 lines
413 B
Bash
20 lines
413 B
Bash
|
#!/usr/bin/env sh
|
||
|
# https://wiki.ubuntuusers.de/Internet-TV/Stationen/
|
||
|
set -eu -o pipefail
|
||
|
|
||
|
SCRIPT=$(readlink -f "$0")
|
||
|
SCRIPTPATH=$(dirname "$SCRIPT")
|
||
|
|
||
|
MAP="$SCRIPTPATH/tv.csv"
|
||
|
|
||
|
cat "$MAP" \
|
||
|
| cut -d ',' -f 1 \
|
||
|
| rofi -dmenu -i -p "TV" \
|
||
|
| head -n 1 \
|
||
|
| xargs -i --no-run-if-empty grep "{}" "$MAP" \
|
||
|
| cut -d ',' -f 2 \
|
||
|
| head -n 1 \
|
||
|
| xargs -i --no-run-if-empty /bin/mpv "{}"
|
||
|
|
||
|
exit 0
|