diff options
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sway/config.c b/sway/config.c index 94bc2abb..9f65e8a2 100644 --- a/sway/config.c +++ b/sway/config.c | |||
@@ -144,10 +144,15 @@ _continue: | |||
144 | return test; | 144 | return test; |
145 | } | 145 | } |
146 | 146 | ||
147 | bool load_config(void) { | 147 | bool load_config(const char *file) { |
148 | sway_log(L_INFO, "Loading config"); | 148 | sway_log(L_INFO, "Loading config"); |
149 | 149 | ||
150 | char *path = get_config_path(); | 150 | char *path; |
151 | if (file != NULL) { | ||
152 | path = strdup(file); | ||
153 | } else { | ||
154 | path = get_config_path(); | ||
155 | } | ||
151 | 156 | ||
152 | if (path == NULL) { | 157 | if (path == NULL) { |
153 | sway_log(L_ERROR, "Unable to find a config file!"); | 158 | sway_log(L_ERROR, "Unable to find a config file!"); |