27 lines
544 B
Bash
Executable file
27 lines
544 B
Bash
Executable file
#!/bin/sh
|
|
|
|
MDIR="$HOME/Musica"
|
|
INPUT=$(echo "ADD\nPLAY\nPAUSE\nCONTINUE\nNEXT\nSTOP\nEXIT" | dmenu )
|
|
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)
|
|
;;
|
|
STOP)
|
|
kill $(pgrep ffplay)
|
|
;;
|
|
EXIT)
|
|
kill $(pgrep ffplay)
|
|
;;
|
|
esac
|