This repository has been archived on 2023-10-17. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/scripts/music

25 lines
575 B
Bash
Executable File

#!/bin/sh
MDIR="$HOME/Musica"
INPUT=$(echo "Add\nPlay\nPause\nContinue\nNext\nExit" | dmenu -p "Ffplay reproductor:")
case $INPUT in
Add)
find $MDIR$(ls $MDIR | dmenu -i -l 8)
;;
Play)
for f in "$MDIR"/*; do herbe $f | ffplay -x 800 -nodisp -loglevel quiet -autoexit $f; done
;;
Pause)
kill -STOP $(pgrep ffplay)
;;
Continue)
kill -CONT $(pgrep ffplay)
;;
Next)
kill $(pgrep ffplay)
;;
Exit)
pkill music && pkill ffplay
;;
esac