#!/bin/sh _cam_dir='/home/ray/mpv-cam-views/' _qualities="360\n480\n720\n1080" _file="$(ls cams | dmenu)" _url="$(cat cams/$_file)" _quality="$(echo -e $_qualities | dmenu)" echo "Playing '$_file' at $_quality ($_url)" bspc rule --add mpv --one-shot state=tiled && mpv --ytdl-raw-options=format='best[height<='"$_quality"']' "$_url"