aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYacine Hmito <yacine.hmito@gmail.com>2015-12-01 01:23:16 +0100
committerYacine Hmito <yacine.hmito@gmail.com>2015-12-01 19:41:44 +0100
commitf3f77f9ff1912a2b05304ba8a5278f42e16b6c1b (patch)
treedc64bfc3a3fe77cf607c2251f61caa3cb6cdc4a1
parent09feef89eea03527c9c81b8d15fe8c1474942209 (diff)
downloadsway-f3f77f9ff1912a2b05304ba8a5278f42e16b6c1b.tar.xz
FALLBACK_CONFIG_DIR did not work. Fixed.
- Flag was ignored. Now it's taken into account. - Missing trailing slashes in path now behaves properly.
-rw-r--r--CMakeLists.txt3
-rw-r--r--sway/config.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e1e1dde..68dd7fa3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,8 @@ cmake_minimum_required(VERSION 3.1.0)
project(sway C)
-set(FALLBACK_CONFIG_DIR "/etc/sway/")
+set(FALLBACK_CONFIG_DIR "/etc/sway" CACHE PATH
+ "Fallback config directory defaults to /etc/sway")
add_definitions('-DFALLBACK_CONFIG_DIR=\"${FALLBACK_CONFIG_DIR}\"')
set(CMAKE_C_FLAGS "-g")
diff --git a/sway/config.c b/sway/config.c
index dac3e8f8..6a1d172b 100644
--- a/sway/config.c
+++ b/sway/config.c
@@ -136,7 +136,7 @@ static char *get_config_path(void) {
"$XDG_CONFIG_HOME/sway/config",
"$HOME/.i3/config",
"$XDG_CONFIG_HOME/i3/config",
- FALLBACK_CONFIG_DIR "config",
+ FALLBACK_CONFIG_DIR "/config",
"/etc/i3/config",
};