baton
baton copied to clipboard
Follow XDG Base Directory for cfgFile
According to the XDG Base Directory Specification we should check the XDG_CONFIG_HOME environment variable before assuming that it is $HOME/.config. Thus we should check this variable then assign cfgFile to it + "/baton.json" or continue with the current behavior if it doesn't exist.
This might be useful for the implementation instead of using homedir.