Eliminar 'scripts/rp_musicplayer.sh'
This commit is contained in:
parent
404ea75207
commit
bcf9937a2f
|
@ -1,49 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# rp_musicplayer by @root.sti
|
||||
|
||||
MDIR="/home/marulo/Música/" # music dir
|
||||
PL="/tmp/rp_musicplayer.pl" # playlist more fancy?
|
||||
PID=$(cat /tmp/rp_musicplayer.pid) # no me convence :/
|
||||
CUR=$(cat /tmp/rp_musicplayer.cur | sed 's/\/home\/marulo\/Música\///') # hacerlo más genérico!
|
||||
HELP=$(echo -e "[ add ]-add playlist\n[ clear ]-erease playlist\n[ new ]-new playlist\n[ current ]-track info\n[ play ]-play\n[ pause ]-pause\n[ continue ]-continue\n[ next ]-next track\n[ stop ]-stop\n[ share ]-clipboard\n[ exit ]-quit" | column -s "-" -t -o " -> ")
|
||||
|
||||
INPUT=$(ratpoison -c "prompt musicplayer | ")
|
||||
case $INPUT in
|
||||
add)
|
||||
find $MDIR$(ls $MDIR | dmenu -i -l 8) -type f >> $PL
|
||||
;;
|
||||
clear)
|
||||
rm $PL
|
||||
;;
|
||||
new)
|
||||
find $MDIR$(ls $MDIR | dmenu -i -l 8) -type f > $PL
|
||||
;;
|
||||
current)
|
||||
ratpoison -c "echo $(ffprobe -loglevel error -show_entries format_tags=title,track,artist,album,album_artist,composer,date -of default=noprint_wrappers=1 $MDIR$CUR | cut -d: -f2 | column -s "=" -t -o " :")"
|
||||
;;
|
||||
play)
|
||||
for f in $(cat $PL); do echo $f > /tmp/rp_musicplayer.cur && ffplay -nodisp -autoexit $f; done & echo $! > /tmp/rp_musicplayer.pid
|
||||
;;
|
||||
pause)
|
||||
kill -STOP $(pgrep ffplay)
|
||||
;;
|
||||
continue)
|
||||
kill -CONT $(pgrep ffplay)
|
||||
;;
|
||||
next)
|
||||
kill $(pgrep ffplay)
|
||||
;;
|
||||
stop)
|
||||
kill $PID && kill $(pgrep ffplay)
|
||||
;;
|
||||
share)
|
||||
echo "$(ffprobe -loglevel error -show_entries format_tags=title,track,artist,album,album_artist,composer,date -of default=noprint_wrappers=1 $MDIR$CUR | cut -d: -f2 | column -s "=" -t -o " :")" | xclip -selection clipboard
|
||||
;;
|
||||
help)
|
||||
ratpoison -c "set msgwait 0" -c "echo $HELP" -c "msgwait 4"
|
||||
;;
|
||||
exit)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
Loading…
Reference in a new issue