Skip to content

[Feature Request] Respect XDG Base Directory Specification #2519

Description

@FwuXi

I would like to ask that consideration be made in respecting the FreeDesktop's XDG desktop directory specification when it comes to the folder containing the configuration files and such for at least Linux environments.

Right now sourcegit defaults to creating its files into the ~/.sourcegit directory of the user using the program, and it would be nice if the application first checked if the XDG_CONFIG_HOME is a valid absolute path, or XDG_CONFIG_DIRS contains valid absolute paths, and create this directory there instead. This would often default to ~/.config/sourcegit for all files that currently reside in the directory. Though if a more proper implementation is desired, if the avatars folder is intended to be a "cache" of those avatar icons, then this might better reside in XDG_CACHE_HOME which would often default to ~/.cache/sourcegit and the process.lock file could reside in XDG_STATE_HOME which normally resides in ~/.local/state/sourcegit ... These suggestions however shouldn't be hard-coded to these directories, but rather follow the guidance provided by the FreeDesktop specification.

While there are some stubborn outlier programs that for one reason or another can't/won't respect this specification, it would be nice if sourcegit were capable of joining the ones that do, as home directory "clutter" is a valid concern, and providing greater flexibility of where and how these kinds of files are stored, provides a nice benefit to all. Especially when a portable option exists for windows/appimage versions.

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