Skip to content

XDG base spec implementation - #581

Open
dgcampea wants to merge 5 commits into
jendrikseipp:masterfrom
dgcampea:xdg
Open

XDG base spec implementation#581
dgcampea wants to merge 5 commits into
jendrikseipp:masterfrom
dgcampea:xdg

Conversation

@dgcampea

@dgcampea dgcampea commented Jun 7, 2021

Copy link
Copy Markdown
Contributor

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

dgcampea commented Oct 4, 2021

Copy link
Copy Markdown
Contributor Author

ping @jendrikseipp

@jendrikseipp

Copy link
Copy Markdown
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

dgcampea commented Oct 5, 2021

Copy link
Copy Markdown
Contributor Author

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.

2 participants