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

Make config file placement adhere to the XDG Base Directory Specification #95

Open
xantoz opened this issue Nov 17, 2018 · 2 comments
Open

Comments

@xantoz
Copy link
Contributor

xantoz commented Nov 17, 2018

I'd like to avoid having another .directory cluttering up my home folder if possible. The XDG Base Directory Specification says that config directories and the like should reside under ${XDG_CONFIG_HOME:-$HOME/.config} (read as sh script).

What this would mean for webmacs is that the config directory is $XDG_CONFIG_HOME/.config/webmacs when XDG_CONFIG_HOME is defined and ~/.config/webmacs when not defined.

See: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html

P.S.
Reading the specification further I realize this probably means the ~/.webmacs/profiles directory should live under ${XDG_DATA_HOME:-$HOME/.local/share}/webmacs/profiles as well.
D.S.

@parkouss
Copy link
Owner

Thanks for reporting this (and sorry for the delay). I think it's a good idea and a requirement to adhere to standards.
To not make that change a hard breaking change, here is what I can think of:

  1. add a check to move config to the new directories automatically. (and remove that check in some versions)
  2. or, add a deprecation warning to indicate how / where to move the configuration - but still use the configuration (and remove that in some versions)

I'm more in favor of 2.

It would be nice to:

  • show current path in some web page, say webmacs://config or something. Or maybe in webmacs://version.
  • would be nice to add the possibility to configure the config dir from the command line. And the profiles directory.

@xantoz , what do you think?

@xantoz
Copy link
Contributor Author

xantoz commented Jan 7, 2019

@parkouss Sounds good to me. It doesn't even have to be complicated. First look in .webmacs, if it's there use that + maybe emit deprecation warning. If it's not there check ~/.config/webmacs

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