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

28 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