mpv-cam-view/launch

14 lines
386 B
Plaintext
Raw Normal View History

2020-10-27 10:49:20 +00:00
#!/bin/sh
2020-10-27 10:58:09 +00:00
_cam_dir='/usr/local/src/mpv-cam/cams'
2020-10-27 10:49:20 +00:00
2020-10-27 10:58:09 +00:00
_qualities="360\n480\n720\n1080\n2560"
2020-10-27 10:49:20 +00:00
2020-10-27 11:01:04 +00:00
_file="$(ls $_cam_dir | dmenu -p 'Feed:')"
2020-10-27 10:58:09 +00:00
_url="$(cat $_cam_dir/$_file)"
2020-10-27 11:01:04 +00:00
_quality="$(echo -e $_qualities | dmenu -p 'Max quality:')"
2020-10-27 10:49:20 +00:00
echo "Playing '$_file' at $_quality ($_url)"
bspc rule --add mpv --one-shot state=tiled && mpv --ytdl-raw-options=format='best[height<='"$_quality"']' "$_url"