Support XDG Base Directory specification
TamasBarta opened this issue · 3 comments
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.
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.
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.
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.