Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
Indeed, the $HOME/.application-name is the old way. Doing that nowadays is frowned upon (this is an example of what happens if you try), mostly because, as you said, it clutters the home directory....
Answer
#1: Initial revision
Indeed, the `$HOME/.application-name` is the old way. Doing that nowadays is frowned upon ([this is an example of what happens if you try](https://bugs.launchpad.net/archlinux/+source/snapd/+bug/1575053?comments=all)), mostly because, as you said, it clutters the home directory. Instead, stick to the [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html). The most important points are: > - There is a single base directory relative to which user-specific data files should be written. This directory is defined by the environment variable `$XDG_DATA_HOME`. > > - There is a single base directory relative to which user-specific configuration files should be written. This directory is defined by the environment variable `$XDG_CONFIG_HOME`. They _usually_ boil down to `$HOME/.local/share` and `$HOME/.config`, and, as the document says, those paths should be assumed if the corresponding environment variables are unset or empty.