frc-frecon / frecon

An API for building scouting apps for FRC competitions
MIT License
3 stars 0 forks source link

Load user configuration from ~/.config vs ~/config. #69

Closed rye closed 9 years ago

rye commented 9 years ago

Some people don't like lowercase dirnames, and I'm one of them. This fixes that, by using a dot-file, which should be hidden for most users.

Sammidysam commented 9 years ago

I like the prefixed dot too. However, I feel like ~/.config is probably used by other programs, so this could cause problems with using the same directory. I would prefer ~/.frecon. It's okay if we use ~/.config though.

rye commented 9 years ago

This PR made it so that FReCon reads from ~/.config/frecon.yml, which will almost certainly be used only by us. I'd rather not create a whole new directory; using the ~/.config folder conforms with the XDG Base Directory Specification:

If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.

I'd like to work on implementing the XDG_CONFIG_HOME and other environment variables and supporting them appropriately; that seems smart.