Closed su-v closed 10 years ago
Should it store the config file at:
$XDG_CONFIG_HOME/.inklingreaderrc
Or at:
$XDG_CONFIG_HOME/inklingreader/config
According to this specification?
Probably depends on your further plans - AFAIU the spec does not define further specific details about this.
Based on what other (e.g. GNOME or GTK-based) apps do, the config file(s) are stored in a subdir named like the app itself:
$XDG_CONFIG_HOME/inklingreader/
The file name of the actual config file then seems to vary wildy (config.ini, ${app_name}rc, ${app_name}.xml, ${app_name}.cfg, etc).
If you only ever need a single file for the config, it probably could also be
$XDG_CONFIG_HOME/inklingreaderrc
i.e. a config file directly in $XDG_CONFIG_HOME
, not hidden (since the XDG user config dir is already hidden) - maybe peek into your ~/.config
for more examples?
See also: https://wiki.gnome.org/action/show/Initiatives/GnomeGoals/XDGConfigFolders (has links to Glib utility functions, and other information).
I've updated the code to use this specification. I think we only need one config file. My system doesn't use XDG_CONFIG_HOME, so my config is located in ~/.config/inklingreaderrc.
AFAIU the currently supported location of the config file is
$HOME/.inklingreaderrc
.Would it make sense to you to support the user's definition of
$XDG_CONFIG_HOME
instead, based on the XDG Base Directory Specification?From the spec:
$XDG_CONFIG_HOME
.and:
$XDG_CONFIG_HOME
defines the base directory relative to which user specific configuration files should be stored. If$XDG_CONFIG_HOME
is either not set or empty, a default equal to$HOME/.config
should be used.