dotfiles/.local/bin/focus

4 lines
273 B
Plaintext
Executable File

playlistPath="$MUSIC/Playlists"
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"