3 ms·
One really annoying argument I got when evangalizing this spec (trying to, anyway...) was "the XDG basedir spec is only made for GUI apps". Which is absolutely
by scrollaway 11y ago
One really annoying argument I got when evangalizing this spec (trying to, anyway...) was "the XDG basedir spec is only made for GUI apps". Which is absolutely ridiculous - git and htop both follow it since several versions as well as a bunch of other command line apps now.
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.
- johnny22 11y agodon't forget $XDG_RUNTIME_DIR for sockets and the like
- scrollaway 11y agoNobody really uses that outside of pulseaudio/dconf/systemd.