jonls/redshift — pull request #38 by maandree (2014-03-11 17:57:32+00:00)
Title: Improvements for open_config_file

These commits improves `open_config_file` by:

- adding $HOME/.redshift.conf as fallback for $HOME/.config/redshift.conf
- adding ~/.config/redshift.conf as fallback for $HOME/.config/redshift.conf where ~
is the read user's home directory, read from passwd using pwd.h
- adding ~/.redshift.conf as fallback for ~/.config/redshift.conf (~ = $HOME fallback from above)
- adding support for $XDG_CONFIG_DIRS, used if user specific configuration is not found
- adding /etc as fallback for $XDG_CONFIG_DIRS
- also checking that the file actually exists before commiting to it.

Also: added src/redshift to .gitignore