diff options
-rw-r--r-- | CMakeLists.txt | 4 | ||||
-rw-r--r-- | README.md | 5 | ||||
-rw-r--r-- | sway/CMakeLists.txt | 2 | ||||
-rw-r--r-- | sway/config.c | 4 | ||||
-rw-r--r-- | swaylock/CMakeLists.txt | 2 |
5 files changed, 6 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4c349865..adb1650b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -2,10 +2,6 @@ cmake_minimum_required(VERSION 3.1.0) | |||
2 | 2 | ||
3 | project(sway C) | 3 | project(sway C) |
4 | 4 | ||
5 | set(FALLBACK_CONFIG_DIR "/etc/sway" CACHE PATH | ||
6 | "Fallback config directory defaults to /etc/sway") | ||
7 | add_definitions(-DFALLBACK_CONFIG_DIR=\"${FALLBACK_CONFIG_DIR}\") | ||
8 | |||
9 | set(CMAKE_C_FLAGS "-g") | 5 | set(CMAKE_C_FLAGS "-g") |
10 | set(CMAKE_C_STANDARD 99) | 6 | set(CMAKE_C_STANDARD 99) |
11 | set(CMAKE_C_EXTENSIONS OFF) | 7 | set(CMAKE_C_EXTENSIONS OFF) |
@@ -66,9 +66,8 @@ On systems without logind, you need to suid the sway binary: | |||
66 | 66 | ||
67 | If you already use i3, then copy your i3 config to `~/.config/sway/config` and | 67 | If you already use i3, then copy your i3 config to `~/.config/sway/config` and |
68 | it'll work out of the box. Otherwise, copy the sample configuration file to | 68 | it'll work out of the box. Otherwise, copy the sample configuration file to |
69 | `~/.config/sway/config`. It is located at `/etc/sway/config`, unless the | 69 | `~/.config/sway/config`. It is usually located at `/etc/sway/config`. |
70 | `DFALLBACK_CONFIG_DIR` flag has been set. Run `man 5 sway` for information on | 70 | Run `man 5 sway` for information on the configuration. |
71 | the configuration. | ||
72 | 71 | ||
73 | ## Running | 72 | ## Running |
74 | 73 | ||
diff --git a/sway/CMakeLists.txt b/sway/CMakeLists.txt index 894163b8..259e9ab3 100644 --- a/sway/CMakeLists.txt +++ b/sway/CMakeLists.txt | |||
@@ -42,7 +42,7 @@ install( | |||
42 | ) | 42 | ) |
43 | install( | 43 | install( |
44 | FILES ${PROJECT_SOURCE_DIR}/config | 44 | FILES ${PROJECT_SOURCE_DIR}/config |
45 | DESTINATION ${FALLBACK_CONFIG_DIR} | 45 | DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/sway/ |
46 | COMPONENT configuration | 46 | COMPONENT configuration |
47 | ) | 47 | ) |
48 | 48 | ||
diff --git a/sway/config.c b/sway/config.c index 853a7111..1973de02 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -153,8 +153,8 @@ static char *get_config_path(void) { | |||
153 | "$XDG_CONFIG_HOME/sway/config", | 153 | "$XDG_CONFIG_HOME/sway/config", |
154 | "$HOME/.i3/config", | 154 | "$HOME/.i3/config", |
155 | "$XDG_CONFIG_HOME/i3/config", | 155 | "$XDG_CONFIG_HOME/i3/config", |
156 | FALLBACK_CONFIG_DIR "/config", | 156 | "${CMAKE_INSTALL_FULL_SYSCONFDIR}/sway/config", |
157 | "/etc/i3/config", | 157 | "${CMAKE_INSTALL_FULL_SYSCONFDIR}/i3/config", |
158 | }; | 158 | }; |
159 | 159 | ||
160 | if (!getenv("XDG_CONFIG_HOME")) { | 160 | if (!getenv("XDG_CONFIG_HOME")) { |
diff --git a/swaylock/CMakeLists.txt b/swaylock/CMakeLists.txt index 950a170d..6b110e77 100644 --- a/swaylock/CMakeLists.txt +++ b/swaylock/CMakeLists.txt | |||
@@ -39,6 +39,6 @@ install( | |||
39 | 39 | ||
40 | install( | 40 | install( |
41 | FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock | 41 | FILES ${CMAKE_CURRENT_SOURCE_DIR}/pam/swaylock |
42 | DESTINATION /etc/pam.d/ | 42 | DESTINATION ${CMAKE_INSTALL_SYSCONFDIR}/pam.d/ |
43 | COMPONENT data | 43 | COMPONENT data |
44 | ) | 44 | ) |