jaymzh / pius

PGP Individual User Signer
Other
97 stars 25 forks source link

Support XDG_CONFIG_HOME request #99

Closed mcritchlow closed 5 years ago

mcritchlow commented 6 years ago

Would you consider supporting the standard XDG_CONFIG_HOME ~/.config for pius? This would prevent yet another dot directory in HOME.

It looks like there's been some work in this context before that supports backward compatibility for older config files, but I'm not familiar enough with the codebase to take a stab at it myself.

Either way, thanks for the great tool.

F9Alejandro commented 6 years ago

You can change the constants.py in libpius directory for the variable "PIUS_HOME". So instead of it being: PIUS_HOME = os.path.join(HOME, '.pius') it will be: PIUS_HOME = os.path.join(HOME, '.config') That should be the only file that needs to be changed. Just use the commands to build and install as normal: ./setup.py build && sudo ./setup.py install

jaymzh commented 6 years ago

I will add support for XDG_CONFIG_HOME - just need to get around to doing this and adding the proper back-compat stuff

F9Alejandro commented 6 years ago

Doing a bit of testing should be able to tell if XDG_CONFIG_HOME is an env variable, if not then it will check to see if directory .config exists, else it will stick with the fallback of .pius

F9Alejandro commented 6 years ago

104 should contain the enhancement you are looking for.

jaymzh commented 5 years ago

Support is now in the 3_work branch in https://github.com/jaymzh/pius/commit/f4b4e0924ac68cc551a557bcfea58f9390a4ca4a and will be in PIUS 3.x

jaymzh commented 5 years ago

3.0.0 is now out which fixes this.

mcritchlow commented 5 years ago

@jaymzh - Thank you!