]> git.sur5r.net Git - i3/i3/commitdiff
Look for $SYSCONFDIR/i3/config instead of hard-coded /etc/i3/config (Thanks Don)
authorMichael Stapelberg <michael@stapelberg.de>
Sat, 31 Jul 2010 13:04:13 +0000 (15:04 +0200)
committerMichael Stapelberg <michael@stapelberg.de>
Sat, 31 Jul 2010 13:04:13 +0000 (15:04 +0200)
common.mk
src/config.c

index 7ba0376978ff04cc0c741bdcb858c87c28ca98df..e3a9f80bf09de5ba6e2ee9196fae5d7e66dfea9c 100644 (file)
--- a/common.mk
+++ b/common.mk
@@ -24,6 +24,7 @@ CFLAGS += -Wunused-value
 CFLAGS += -Iinclude
 CFLAGS += -I/usr/local/include
 CFLAGS += -DI3_VERSION=\"${GIT_VERSION}\"
+CFLAGS += -DSYSCONFDIR=\"${SYSCONFDIR}\"
 
 # Check if pkg-config is installed, because without pkg-config, the following
 # check for the version of libxcb cannot be done.
index e22e7c8ec12fc7f0f2eeb243bd93c92f9b0d6648..cd88da3d104a8dfb79199c2b8894ceb478696376 100644 (file)
@@ -277,11 +277,11 @@ static char *get_config_path() {
         if (path_exists(config_path))
                 return config_path;
 
-        config_path = strdup("/etc/i3/config");
+        config_path = strdup(SYSCONFDIR "/i3/config");
         if (!path_exists(config_path))
                 die("Neither $XDG_CONFIG_HOME/i3/config, nor "
                     "$XDG_CONFIG_DIRS/i3/config, nor ~/.i3/config nor "
-                    "/etc/i3/config exist.");
+                    SYSCONFDIR "/i3/config exist.");
 
         return config_path;
 }