diff options
author | Brian Ashworth <bosrsf04@gmail.com> | 2018-10-08 09:56:34 -0400 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2018-10-08 09:59:38 -0400 |
commit | 09c3c33081a8b8c941cbc1eeab0e5a70e54d04ff (patch) | |
tree | 9f657329f7775cd764b60326a419d369eae8a605 /sway/config.c | |
parent | 45f2cd0c73cb21bea6ae27bd396cd3721f3cd41a (diff) |
Allow swaynag to be disabled
Diffstat (limited to 'sway/config.c')
-rw-r--r-- | sway/config.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/config.c b/sway/config.c index 7f29347a..e95c7b35 100644 --- a/sway/config.c +++ b/sway/config.c @@ -137,6 +137,7 @@ void free_config(struct sway_config *config) { free(config->floating_scroll_right_cmd); free(config->font); free(config->swaybg_command); + free(config->swaynag_command); free((char *)config->current_config_path); free((char *)config->current_config); free(config); @@ -167,7 +168,7 @@ static void set_color(float dest[static 4], uint32_t color) { } static void config_defaults(struct sway_config *config) { - config->swaynag_command = strdup("swaynag"); + if (!(config->swaynag_command = strdup("swaynag"))) goto cleanup; config->swaynag_config_errors = (struct swaynag_instance){ .args = "--type error " "--message 'There are errors in your config file' " |