From 289c920fc5a2344aad42980a242ed18e15b24793 Mon Sep 17 00:00:00 2001 From: m-r-r Date: Mon, 2 Jul 2012 11:26:06 +0200 Subject: [PATCH] Fallback on the system configuration file --- src/config.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/config.c b/src/config.c index 40a3610..5fe9815 100644 --- a/src/config.c +++ b/src/config.c @@ -401,7 +401,13 @@ config_init(void) sprintf(W->confpath, "%s/"CONFIG_DEFAULT_PATH, getenv("HOME")); if(get_conf(W->confpath) == -1) - errxl(1, "parsing default configuration file (%s) failed.", W->confpath); + { + warnxl("parsing default configuration file (%s) failed.", W->confpath); + sprintf(W->confpath, "%s/wmfs/wmfsrc", XDG_CONFIG_DIR); + + if(get_conf(W->confpath) == -1) + errxl(1, "parsing system configuration file (%s) failed.", W->confpath); + } } config_theme();