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

Move ~/.slaprc to $XDG_CONFIG_HOME/slaprc #40

Closed
jeena opened this issue Aug 26, 2014 · 5 comments
Closed

Move ~/.slaprc to $XDG_CONFIG_HOME/slaprc #40

jeena opened this issue Aug 26, 2014 · 5 comments

Comments

@jeena
Copy link

jeena commented Aug 26, 2014

Please don't use the hardcoded ~/.slaprc path for the configuration file, instead use something like this:

config = getenv("XDG_CONFIG_HOME")
if (!config) config = getenv("HOME") + "/.config"
config = config + "/slaprc"

This has many advantages for the users and almost no disadvantages for you (besides the fact that you have to change your code).

For more information see the Freedesktop specification: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html

@rnhmjoj
Copy link

rnhmjoj commented Aug 26, 2014

+1 I hate the home spammed with dotfiles.

@pwoolcoc
Copy link

+1

@dbkaplun
Copy link
Member

Hi all,

Actually slap uses rc for configuration management, which means you can store configuration in ~/.config/slap if you want to, as well as many other locations which are searched automatically. Hope this helps!

@rnhmjoj
Copy link

rnhmjoj commented Aug 27, 2014

@Beardtree Yes it works, however every time you start slap a new ~/.slaprc is created.

@dbkaplun
Copy link
Member

@rnhmjoj I have filed a new ticket, #62, for that issue. Thanks!

Closing this issue.

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

No branches or pull requests

4 participants