The XDG Base Directory Specification has been around for a while and there seems to be growing support for it in various applications. This issue is to start discussion around if and how we should support it.
If the project is interested in supporting it (or a subset of it), here's an example of what we could do for the config file:
- Check for config files in the following order (first hit is applied, warn if multiple found)
-confcommand line parameter$datadir/bitcoin.conf$XDG_CONFIG_HOME/.config/bitcoin/bitcoin.conf$HOME/.config/bitcoin/bitcoin.conf$HOME/.bitcoin/bitcoin/bitcoin.conf(current non-XDG directory)
A question: should we use $XDG_DATA_HOME ($HOME/.local/share) or $XDG_STATE_HOME ($HOME/.local/state) for the datadir?