karlch/vimiv

Additional XDG_*_HOME changes

Closed this issue · 2 comments

Additionally to the changes according to the freedesktop standard mentioned in #37 and #38 it makes sense to:

  • Look for configuration files (vimivrc and keys.conf) in XDG_CONFIG_HOME/vimiv/
  • Save data, namely history, logfile and Tags in XDG_DATA_HOME/vimiv/

At least temporarily the current and the proposed new standard should be supported, possibly with a deprecation warning at start-up.

What do you think @popeye123 ?

woefe commented

Yes, we should do this. The basedir-spec specifies even more $XDG_* variables, but I am not sure if we need to support all of them.
Vimiv should look for config files in all of the following directories and override the values of a previously read file.

  1. /etc/vimiv
  2. XDG_*/vimiv/ (or ~/.config/vimiv)
  3. ~/.vimiv
  4. --config commandline parameter

This can be implemented using configparser.read([filenames]) (documentation) and would clean up the current configparser implementation.

Should be completed with the commits referenced above.