[dotfiles] functions: find a filename according to a specific pattern

Quite simple and naive but efficient enough for now.