Read config from XDG_CONFIG_HOME (Fix #65)

Config file is read from the first of these two locations:
* $XDG_CONFIG_HOME/rtv/rtv.cfg
* ~/.rtv
This commit is contained in:
Samir Benmendil
2015-04-03 12:46:05 +01:00
parent 4017c8655f
commit a294010e27
2 changed files with 14 additions and 5 deletions

View File

@@ -91,14 +91,12 @@ In submission mode you can view the self text for a submission and browse commen
Configuration
-------------
RTV will read a configuration file located at **~/.rtv**.
RTV will read a configuration file located at ``$XDG_CONFIG_HOME/rtv/rtv.cfg`` or ``~/.config/rtv/rtv.cfg`` if ``$XDG_CONFIG_HOME`` is not set.
This can be used to avoid having to re-enter login credentials every time the program is launched.
Each line in the file will replace the corresponding default argument in the launch script.
Example config:
**~/.rtv**
.. code-block:: ini
[rtv]