diff options
author | taiyu <[email protected]> | 2015-09-10 11:07:40 -0700 |
---|---|---|
committer | taiyu <[email protected]> | 2015-09-10 11:07:40 -0700 |
commit | aaa0923bc4fe4ffda114482a9b8023c90c26c8dc (patch) | |
tree | 7c12a435bf56e4ebfcae689ce46280eeeb330346 /sway/config.c | |
parent | 6388241abb7e2e66e716fc128e658d3d3419442a (diff) |
cmd status + workspace ws output op
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index 11394a7c..23d6ac0d 100644 --- a/sway/config.c +++ b/sway/config.c @@ -102,6 +102,7 @@ static void config_defaults(struct sway_config *config) { config->active = false; config->failed = false; config->auto_back_and_forth = false; + config->reading = false; config->gaps_inner = 0; config->gaps_outer = 0; @@ -217,6 +218,7 @@ bool read_config(FILE *file, bool is_active) { config = malloc(sizeof(struct sway_config)); config_defaults(config); + config->reading = true; if (is_active) { sway_log(L_DEBUG, "Performing configuration file reload"); config->reloading = true; @@ -228,7 +230,8 @@ bool read_config(FILE *file, bool is_active) { while (!feof(file)) { line = read_line(file); line = strip_comments(line); - if (!config_command(line)) { + if (config_command(line) == CMD_FAILURE) { + sway_log(L_ERROR, "Error on line '%s'", line); success = false; } free(line); @@ -242,6 +245,7 @@ bool read_config(FILE *file, bool is_active) { free_config(old_config); } + config->reading = false; return success; } |