3

Is ${XDG_CONFIG_HOME:-${HOME}/.config} enough or there are more tricks to it?

Is there maybe some xdg-user-dir CONFIG or xdg-settings invocation that gives me where to expect programs' configs?

3

${XDG_CONFIG_HOME:-~/.config} is exactly how xdg-user-dirs does it (it's a shell script). It hasn't changed since 2008, so you can consider this to be stable.

Incidentally, you'd better not have whitespace or wildcard in the value of XDG_CONFIG_HOME. If XDG_CONFIG_HOME is unset, special characters in the home directory location are ok. Wildcards in the value of XDG_xxx_DIR also don't work, as do sequences of whitespace other than a single space.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.