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/musica
diego castillo salazar 9a82d82fd6 Update dotfiles
2023-04-21 12:33:06 -05:00

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