XDG basedir spec for configuration files?



The XDG Base Directory Specification provides some common paths in user's home to store personal application configurations, or, using their own words "defines where these files should be looked for by defining one or more base directories relative to which files should be located".

XDG Base Directory Specification allows efficient backup, in which you can easily choose to backup your data and/or your configuration files for instance (see http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data ). An application could easily propose such backup for the whole system if all applications were matching these specification

Therefore, although I think that this bug/enhancement is not vital, it would be great for Sawfish to be "FreeDesktop XDG Base Directory Specification" compliant. What do you think about it?

There's already some lisp code for configuration directory transition, writen when the name was changed from sawmill to sawfish.

Currently Sawfish is using "$HOME/.sawfish/". This is what XDG basedir spec defines:

In order to make Sawfish XDG basedir compliant, I think that it would be enough to use $XDG_CONFIG_HOME/sawfish instead of $HOME/sawfish

Glib (one sawfish dependencies, according to the .deb package) provides some useful functions (since version 2.6) in order to retrieve the current location of $XDG_*_HOME directories:

(http://library.gnome.org/devel/glib/stable/glib-Miscellaneous-Utility-Functions.html#g-get-user-config-dir)

(Note that the basedir spec also defines system-wide directories for system data and configuration, and glib provides g_get_system_data_dirs() and g_get_system_config_dirs() functions to retrieve them).

I don't know how deep is the Gnome library involved in the code, though.
There's also a small library that might be useful, written for the only purpose of xdg basedir spec compliance: https://n.ethz.ch/student/nevillm/download/libxdg-basedir/


--
Ferk



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]