Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for XDG_CONFIG_HOME variable #86

Closed
kmille opened this issue Feb 9, 2022 · 2 comments
Closed

Support for XDG_CONFIG_HOME variable #86

kmille opened this issue Feb 9, 2022 · 2 comments

Comments

@kmille
Copy link

kmille commented Feb 9, 2022

Hey,
it's cool to have config file support at ~/.diceware.ini. But it's uncool to have the home directory full of .dotfiles.
Can you please honor the XDG_CONFIG_HOME envrionment variable? It's documented here:
https://wiki.archlinux.org/title/XDG_Base_Directory
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

The idea is: if XDG_CONFIG_HOME is set, use it as base dir to look for the config file. If there is no config file, use the default location at ~.

@ulif
Copy link
Owner

ulif commented Feb 10, 2022

Sounds reasonable. I will have a look into that next week. Do Windows / Mac support that pattern as well?

@kmille
Copy link
Author

kmille commented Feb 11, 2022

I couldn't find that much information. It seems like it's a feature only used by Linux.
Maybe a good resource is this: https://github.com/adrg/xdg/blob/master/README.md
Qutoe:

On Windows, XDG environment variables are usually not set. If that is the case, the package relies on the appropriate Known Folders. Sensible fallback locations are used for the folders which are not set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants