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

Follow the Freedesktop XDG base directory standard #2

Closed
x80486 opened this issue Oct 28, 2020 · 3 comments
Closed

Follow the Freedesktop XDG base directory standard #2

x80486 opened this issue Oct 28, 2020 · 3 comments

Comments

@x80486
Copy link

x80486 commented Oct 28, 2020

On Linux, Cloak currently creates a .cloaklet.cloak/ folder in the user's home directory. Most applications/programs don't create a folder in the user's home directory any more, but instead use the Freedesktop XDG standard – found here: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html.

Using this standard:

  • $XDG_CACHE_HOME says "temporal/non-essential" files go to $HOME/.cache/
  • $XDG_CONFIG_HOME says "configuration files" go to $HOME/.config/
  • $XDG_DATA_HOME says "data files" go to $HOME/.local/share/

This is just a request to consider using this standard. It makes a lot of sense; it is easy for the user to understand, makes it easier to backup / locate / restore / manage / clear user's data, and creates less clutter in the user's home directory.

Thanks in advance...and thanks so much for your hard work on this – it's amazing!

@JokerQyou
Copy link
Contributor

I kind of don't like the idea to split "configuration files" from "data files". I've started to work on moving data files to XDG data directory, but the config file is moving together with the database file (into $XDG_DATA_HOME).

I'll document data locations in README so users can backup / locate / restore their data. For the "clear" part, I might add a "Reset app data" button to Options dialog.

@x80486
Copy link
Author

x80486 commented Oct 29, 2020

The problem that this will create is that (most of the time) what's in XDG_DATA_HOME could be removed at any time. People don't tend to even backup that location.

A different story is XDG_CONFIG_HOME.

So it's really not whether one likes it or not, but what's the purpose for each location.

@JokerQyou
Copy link
Contributor

I've just released 0.8.0 which follows the XDG spec. In this version, config file and database file are separated to different directories as you suggested. However I choose to keep log file in a sub-directory in XDG_DATA_HOME. I've documented all the file locations in README.

Please give it a try and let me know if there are issues with XDG directories handling.

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