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

XDG base spec implementation #581

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

dgcampea
Copy link
Contributor

@dgcampea dgcampea commented Jun 7, 2021

Summary of the changes in this pull request

Implements XDG Base spec.
Under Windows it tries to do something similar by using APPDATA env var.
Addresses #404

Pull request checklist

  • I have added an entry in CHANGELOG.md including my name and issue and/or pull request number.
  • If applicable: I have removed the corresponding entry in TODO.md.

@dgcampea dgcampea force-pushed the xdg branch 2 times, most recently from a454d6e to a9c9e79 Compare June 7, 2021 20:13
@dgcampea
Copy link
Contributor Author

dgcampea commented Oct 4, 2021

ping @jendrikseipp

@jendrikseipp
Copy link
Owner

I appreciate you looking into this. However, I'm not sure if the change is worth it, since it makes user support more difficult. Currently, I can tell users where to look for their files. With the XDG spec, I won't know where the files are, even if I know which version of RedNotebook version they're using. I'll have to think a bit about this. What are your arguments for making the change? Could you please provide a table of before and after for all directories, the config file and the log file (using the XDG_* names) and a mapping of XDG_* variable names to their most common values?

@dgcampea
Copy link
Contributor Author

dgcampea commented Oct 5, 2021

What are your arguments for making the change?

XDG base lessens the clutter to the users directory and allows users to retarget the directories for storing their configs (instead of forcing a specific choice on the user).
Flatpak for instance manages the XDG variables too, to allow sandboxing/app config separation.

Before After After (default XDG vars) After (flatpak) Fallback
Settings ~/.rednotebook $XDG_CONFIG_HOME/rednotebook ~/.config/rednotebook ~/.var/app/app.rednotebook.RedNotebook/data/rednotebook ~/.config/rednotebook
Temp files ? ~/.rednotebook/tmp $TMPDIR/rednotebook-<random string> /tmp/rednotebook-<random string> ~/.var/app/app.rednotebook.RedNotebook/cache/rednotebook-<random string> ? depends on python tempfile
Log file ~/.rednotebook/rednotebook.log $XDG_STATE_HOME/rednotebook/rednotebook.log ~/.local/state/rednotebook/rednotebook.log (not yet implemented by flatpak) ~/.local/state/rednotebook/rednotebook.log ~/.local/state/rednotebook/rednotebook.log
Help file ~/.rednotebook/tmp/help.html $XDG_CACHE_HOME/help.html ~/.cache/help.html ~/.var/app/app.rednotebook.RedNotebook/cache/help.html ~/.cache/help.html

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

Successfully merging this pull request may close these issues.

None yet

2 participants