15 lines
460 B
Bash
Executable File
15 lines
460 B
Bash
Executable File
#!/bin/sh -e
|
|
# launch my focus playlist
|
|
playlistPath="$MUSIC/Playlists"
|
|
mpc clear
|
|
if test -z "$1"
|
|
then mp -q "$playlistPath/focus.m3u"
|
|
else
|
|
(find -L $playlistPath -iname "focus-$1.m3u" -print0 | grep --null-data . ||
|
|
find -L $playlistPath -iname "$1.m3u*" -print0 | grep --null-data . ||
|
|
find -L $MUSIC -iname "*$1*" -prune -exec find {} -size +2M -type f -not -iregex ".*.\(jpe?g\|png\)" -print0 \; ) |
|
|
xargs -0 mp -q
|
|
fi
|
|
mpc -q shuffle
|
|
mpc next
|