Subir archivos a 'scripts'
This commit is contained in:
parent
bcf9937a2f
commit
c5579517ce
45
scripts/rp_musicplayer.sh
Normal file
45
scripts/rp_musicplayer.sh
Normal file
|
@ -0,0 +1,45 @@
|
|||
#!/bin/bash
|
||||
|
||||
# rp_mediaplayer by @root.sti
|
||||
|
||||
MDIR="/home/marulo/Música/" # music dir
|
||||
PL="/tmp/ffplay.pl" # playlist more fancy?
|
||||
PID=$(cat /tmp/ffplay.pid) # no me convence :/
|
||||
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 mediaplayer | ")
|
||||
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
|
||||
;;
|
||||
play)
|
||||
for f in $(cat $PL); do echo $f > /tmp/ffplay.cur && ffplay -nodisp -autoexit $f; done & echo $! > /tmp/ffplay.pid
|
||||
;;
|
||||
pause)
|
||||
kill -STOP $(pgrep ffplay)
|
||||
;;
|
||||
continue)
|
||||
kill -CONT $(pgrep ffplay)
|
||||
;;
|
||||
next)
|
||||
kill $(pgrep ffplay)
|
||||
;;
|
||||
stop)
|
||||
kill $PID && kill $(pgrep ffplay)
|
||||
;;
|
||||
share)
|
||||
ratpoison -c "putsel $(ffprobe -loglevel error -show_entries format_tags=title,track,artist,album,album_artist,composer,date -of default=noprint_wrappers=1 $(cat /tmp/ffplay.cur) | cut -d: -f2 | column -s "=" -t -o " :")"
|
||||
;;
|
||||
help)
|
||||
ratpoison -c "set msgwait 0" -c "echo $HELP" -c "msgwait 4"
|
||||
;;
|
||||
exit)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
28
scripts/rp_podcastplayer.sh
Normal file
28
scripts/rp_podcastplayer.sh
Normal file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
PDIR="/home/marulo/Descargas/ytdl/"
|
||||
TRASH="/home/marulo/Descargas/ytdl/trash"
|
||||
|
||||
if [ "$(pgrep youtube_sync.sh | wc -l)" == "0" ]; then
|
||||
cd $PDIR
|
||||
spacekiller.sh
|
||||
cd
|
||||
|
||||
else
|
||||
echo "downloading..."
|
||||
exit 0
|
||||
|
||||
fi
|
||||
|
||||
# file=$(ls | grep mp3 | fzf --exact --print-query | tail -n 1)
|
||||
file=$(ls $PDIR | grep "$(ls -F $PDIR | grep -v "/" | cut -c 1-100 | dmenu -i -l 8)")
|
||||
if [ "$file" != ":quit" ]; then
|
||||
echo "$PDIR$file" > /tmp/ffplay.cur
|
||||
ffplay -nodisp -autoexit $PDIR$file
|
||||
cp $PDIR$file $TRASH
|
||||
rm $PDIR$file
|
||||
|
||||
else
|
||||
exit 0
|
||||
|
||||
fi
|
Loading…
Reference in a new issue