diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-01-21 15:15:50 -0500 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-01-21 15:15:50 -0500 |
commit | 72f297fc713c55fc17a0f41614a33ad2942d0979 (patch) | |
tree | 4252d87c803f6be90a627cbcc60b0919481ed900 | |
parent | Fix memory leak in config.c (diff) | |
parent | Fix issue #455 (diff) | |
download | sway-72f297fc713c55fc17a0f41614a33ad2942d0979.tar.gz sway-72f297fc713c55fc17a0f41614a33ad2942d0979.tar.zst sway-72f297fc713c55fc17a0f41614a33ad2942d0979.zip |
Merge pull request #456 from gpyh/fix-config-dir
Fix issue #455
-rw-r--r-- | sway/CMakeLists.txt | 4 | ||||
-rw-r--r-- | sway/config.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt index f7cc88ab..d23c80b0 100644 --- a/sway/CMakeLists.txt +++ b/sway/CMakeLists.txt | |||
@@ -26,6 +26,10 @@ add_executable(sway | |||
26 | workspace.c | 26 | workspace.c |
27 | ) | 27 | ) |
28 | 28 | ||
29 | add_definitions( | ||
30 | -DSYSCONFDIR="${CMAKE_INSTALL_FULL_SYSCONFDIR}" | ||
31 | ) | ||
32 | |||
29 | target_link_libraries(sway | 33 | target_link_libraries(sway |
30 | sway-common | 34 | sway-common |
31 | sway-protocols | 35 | sway-protocols |
diff --git a/sway/config.c b/sway/config.c index d8e1e938..c4614521 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -197,8 +197,8 @@ static char *get_config_path(void) { | |||
197 | "$XDG_CONFIG_HOME/sway/config", | 197 | "$XDG_CONFIG_HOME/sway/config", |
198 | "$HOME/.i3/config", | 198 | "$HOME/.i3/config", |
199 | "$XDG_CONFIG_HOME/i3/config", | 199 | "$XDG_CONFIG_HOME/i3/config", |
200 | "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sway/config", | 200 | SYSCONFDIR "/sway/config", |
201 | "${CMAKE_INSTALL_FULL_SYSCONFDIR}/i3/config", | 201 | SYSCONFDIR "/i3/config", |
202 | }; | 202 | }; |
203 | 203 | ||
204 | if (!getenv("XDG_CONFIG_HOME")) { | 204 | if (!getenv("XDG_CONFIG_HOME")) { |