l2md: use XDG compliant paths for config file and work dir

Change the default locations of the config file and the work directory.
Prefered config file is taken from ~/${XDG_CONFIG_HOME}/config
('.config' as fallback for XDG_CONFIG_HOME), the old default location
~/.l2mdconfig is used as fallback.

To avoid breakage of old setups, use ~/.l2md/ as default base directory
iff it exists. Otherwise, use ~/${XDG_DATA_HOME}/l2md/.

Signed-off-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
2 files changed