don't forget $XDG_RUNTIME_DIR for sockets and the like
Re:Managing dotfiles with GNU Stow
by scrollaway on Monday April 18, 2016 @08:40AM
(#11519425)
Nobody really uses that outside of pulseaudio/dconf/systemd.
I also often hear it's confusing and hard to follow correctly (which is true) so I'll make it simple: if you are an app author now, please don't use dot files in $HOME. Instead:
* ${XDG_CONFIG_HOME:-~/.config}/<appname>/ for your app's configuration directory
* ${XDG_CACHE_HOME:-~/.cache}/<appname>/ for your app's cache directory (in other words, all files which are safe to delete at any time without impact)
* ${XDG_DATA_HOME:-~/.local/share}/<appname>/ for your app's data files directory. If you're confused about what this is, just use the former two, no big deal.