diff options
author | msglm <msglm@techchud.xyz> | 2023-01-14 10:33:04 -0600 |
---|---|---|
committer | msglm <msglm@techchud.xyz> | 2023-01-14 10:33:04 -0600 |
commit | 0d05ef1e12314985988e567ac22a179d0f646899 (patch) | |
tree | de702ad5f7550a27a6fb982e617363ccaca4fecf /.local/bin/playvideo | |
download | msglm-dotfiles-0d05ef1e12314985988e567ac22a179d0f646899.tar.gz msglm-dotfiles-0d05ef1e12314985988e567ac22a179d0f646899.tar.bz2 msglm-dotfiles-0d05ef1e12314985988e567ac22a179d0f646899.zip |
Inital Commit
Diffstat (limited to '.local/bin/playvideo')
-rwxr-xr-x | .local/bin/playvideo | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/.local/bin/playvideo b/.local/bin/playvideo new file mode 100755 index 0000000..8f90a52 --- /dev/null +++ b/.local/bin/playvideo @@ -0,0 +1,26 @@ +#!/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 |