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

[Enhancement] Follow XDG Base Directory Specification on Linux systems #70

Open
ASHGOLDOFFICIAL opened this issue Jun 25, 2024 · 2 comments

Comments

@ASHGOLDOFFICIAL
Copy link

Benefits
Specification is widely adopted. It allows to clean home directory by moving configs/cache/etc to specified locations. Another benefit is separation of configuration files, cache and data files. By moving ./cache/ folder and other files/folders that are not supposed to be modified by user to another location, you can ensure they will not be modified by user.

Possible way to implement
It's only a draft.

File/folder Possible XDG location
./cache/ XDG_CACHE_HOME or XDG_DATA_HOME
./resources/ XDG_DATA_HOME
./config.ini, ./artwork.xml and examples XDG_CONFIG_HOME
./reports, skipped-* XDG_STATE_HOME
./import/ and other files XDG_DATA_HOME

To remain backwards compatible, add config option like xdg. When this option is enabled, and XDG_* variables are set, they will be used. If XDG_* variables aren't set either fallback to ~/.config/, ~/.local/state or ~/.cache (preferred) or use current ~/.skyscraper.

Useful resources

@Gemba
Copy link
Owner

Gemba commented Aug 12, 2024

I see it as a compile switch/define: A user starts either the current way or uses XDG. I don't like the idea to have it as configuration switch. There might be migration scripts to move exiting config files et.al. from one location to the other and vice-versa.

@Gemba
Copy link
Owner

Gemba commented Nov 15, 2024

@ASHGOLDOFFICIAL , @retrobit, @gbiggs it is merged into main/HEAD . Please do also test on your side and report any issues here. Documentation: https://gemba.github.io/skyscraper/XDG/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants