use XDG_CONFIG_HOME since it might not be ~/.config
use my coding style, convert old config format
use bashisms since we can