Skip to content

Support XDG Base Directory specification #154

@TamasBarta

Description

@TamasBarta

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions