#!/bin/sh #Description: Shuffles and plays videos from your CONTENTDIR and, upon finishing watching them, removes them. You can pass a number of videos to this program and it'll queue that many videos up for you. #Axioms: CONTENTDIR #Dependencies: https://packages.debian.org/sid/mpv numofvids=1 playablevideo="$(find ~/Videos/Content/ -maxdepth 1 -type f | shuf | head -1)" if [ $# -eq 0 ] then mpv --ontop --geometry=100%:0% --autofit=20%x20% "$playablevideo" rm "$playablevideo" exit fi while [ $numofvids -le $1 ] do mpv --ontop --geometry=100%:0% --autofit=20%x20% "$playablevideo" rm "$playablevideo" playablevideo="$(find ~/Videos/Content/ -maxdepth 1 -type f | shuf | head -1)" numofvids=$(($numofvids+1)) done