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

Suggestion: Comply with XDG Base Directory Specification #29

Open
dennisklein opened this issue Oct 7, 2021 · 0 comments
Open

Suggestion: Comply with XDG Base Directory Specification #29

dennisklein opened this issue Oct 7, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@dennisklein
Copy link
Member

dennisklein commented Oct 7, 2021

By conincidence, I noticed that you default the ODC log directory to $HOME/.ODC/log. I would like to suggest to comply with the XDG Base Directory Specification instead of inventing yet another custom app-specific dotfiles scheme, e.g. on page 3 one can read:

$XDG_DATA_HOME defines the base directory relative to which user-specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.

$XDG_CONFIG_HOME defines the base directory relative to which user-specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

$XDG_STATE_HOME defines the base directory relative to which user-specific state files should be stored. If $XDG_STATE_HOME is either not set or empty, a default equal to $HOME/.local/state should be used.

The $XDG_STATE_HOME contains state data that should persist between (application) restarts, but that is not important or portable enough to the user that it should be stored in $XDG_DATA_HOME. It may contain:

  • actions history (logs, history, recently used files, …)
  • current state of the application that can be reused on a restart (view, layout, open files, undo history, …)

User-specific executable files may be stored in $HOME/.local/bin. Distributions should ensure this directory shows up in the UNIX $PATH environment variable, at an appropriate place.

Since $HOME might be shared between systems of different achitectures, installing compiled binaries to $HOME/.local/bin could cause problems when used on systems of differing architectures. This is often not a problem, but the fact that $HOME becomes partially achitecture-specific if compiled binaries are placed in it should be kept in mind.

(...)

In the arch wiki you can get an idea about the adoption distribution of this spec.

Thank you for considering this (at least for linux 😉)!


@dennisklein dennisklein added documentation Improvements or additions to documentation enhancement New feature or request labels Oct 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant