beetbox / beetbox/confuse

XDG_CONFIG_HOME, if set, should have priority over ~/.config and other platform-specific variants

Open
#98 6 comments 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
424
Forks
57
PR merge metrics
No merged PRs in 30d

Description

Currently, we look for `~/.config/beets/config.yaml` (on linux) and if it is not found, fall back to `$XDG_CONFIG_HOME/beets/config.yaml`. This priority is inverted.

From the [freedesktop.org base directory specification](https://specifications.freedesktop.org/basedir-spec/latest/):

> There is a single base directory relative to which user-specific configuration files should be written. This directory is defined by the environment variable $XDG_CONFIG_HOME.
> ...
> $XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If *[and only if]* $XDG_CONFIG_HOME **is either not set or empty**, *[then]* a default equal to $HOME/.config should be used.

*emphasis added*

If a PR making this change would be accepted I can find time to put it together.

Also, it might be nice to make use of the [`appdirs`](https://pypi.org/project/appdirs/) module to offload some of the logic where the platform directory paths are hard-coded.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.