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 XDG Base Directory specification #154

Open
TamasBarta opened this issue Oct 18, 2021 · 3 comments · May be fixed by #165
Open

Support XDG Base Directory specification #154

TamasBarta opened this issue Oct 18, 2021 · 3 comments · May be fixed by #165

Comments

@TamasBarta
Copy link

Is your feature request related to a problem? Please describe.

The XDG Base Directory specification tells config files should be under $XDG_CONFIG_HOME which defaults to $HOME/.config. Azote at the moment saves its config to $HOME/.azotebg. This is a problem, since the home directory gets cluttered as more and more apps that don't support the specification are installed.

Describe the solution you'd like

The config file should default to $XDG_CONFIG_HOME/azote/azotebg or similar. I understand the config file is a script, but looking at the code told me it is also used to be read as configuration.

My proposal is to check ~/.azotebg, if it exists use that, but otherwise use $XDG_CONFIG_HOME/azote/azotebg and if both exist, use $XDG_CONFIG_HOME/azote/azotebg. This is what other apps did when they started transitioning to supporting the specification.

Azote could also check an environment variable, use its value as the path to the azotebg file, and if it's empty default to $XDG_CONFIG_HOME/azote/azotebg, so it can cater everyone. This is also something that many apps do.

Describe alternatives you've considered

A partial support solution would only check the environment variable, but that would require users to specify it if they want the specification to be followed.

Additional context

See the ArchWiki entry for a list of how applications support the specification.

@nwg-piotr
Copy link
Owner

I'm aware it should be done. I'm an after hours developer with hardly any contributors, so my TODO list keeps growing. Adding your issue to the queue.

@TamasBarta
Copy link
Author

Hey @nwg-piotr, I wasn't clear because I couldn't fit it in the template, but I'm mostly interested in your opinion what you'd want to see in the project, and I'd be glad to contribute.

@nwg-piotr
Copy link
Owner

Well, this project just works for most people, so it doesn't receive much feedback. I have no idea on new features at the moment. If it could be improved to follow the standards better, this should be done sooner or later. Feel free to contribute.

@emanuelserpa emanuelserpa linked a pull request Sep 6, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants