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: return test; } -bool load_config(void) { +bool load_config(const char *file) { sway_log(L_INFO, "Loading config"); - char *path = get_config_path(); + char *path; + if (file != NULL) { + path = strdup(file); + } else { + path = get_config_path(); + } if (path == NULL) { sway_log(L_ERROR, "Unable to find a config file!"); |