Loris  View Ticket

Ticket Hash: c259d40c622479ee552e18db2b27b634097297f6
Title: Support for XDG base directory structure
Status: Open Type: Feature_Request
Severity: Critical Priority:
Subsystem: Resolution:
Last Modified: 2016-04-18 10:20:44
Version Found In: 2.0.0
User Comments:
jesper added on 2016-04-18 10:20:44: (text/x-fossil-wiki)
The <a href="https://wiki.archlinux.org/index.php/XDG_Base_Directory_support">XDG Base Directory</a> structure should optionally be used.

Loris does not create configuration files, and thus, does not stipulate where they must be. Under *nix systems, the first file existing file out of the following file paths is sought out and used to construct the config object.

<ol>
<li>A path specified by the `PROGRAM_NAME_RC` environment variable, where PROGRAM_NAME is constructed from the program name set with config:init.</li>
<li>`$HOME/.program-filename/config`</li>
<li>`$HOME/.program-filenamerc`</li>
</ol>

The most simple way to implement XDG base directory support would be to add an additional step between 1 and 2, checking for `$HOME/$XDG_CONFIG_HOME/program-filename/config`, where $XDG_CONFIG_HOME defaults to `.config`.