dotfiles/.local/bin/focus

4 lines
273 B
Plaintext
Raw Normal View History

2020-09-04 10:05:10 +00:00
playlistPath="$MUSIC/Playlists"
2021-01-02 18:53:10 +00:00
result="$(test "$1" && (find -L $playlistPath -iname "focus-$1.m3u8" | grep . || find -L $playlistPath -iname "$1.m3u*" | grep . || find -L $MUSIC -iname "*$1*") | head -1 || echo "$playlistPath/focus.m3u8" )"
test "$result" && vp "$result"