diff options
author | emersion <contact@emersion.fr> | 2018-11-28 17:13:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-28 17:13:24 +0100 |
commit | ef18745951873025ec7fc44bd6987c39c3bdd0d7 (patch) | |
tree | c6af192b469e6cf86ee00cb5d0ab4e03a98bacae /sway/commands | |
parent | Merge pull request #3211 from emersion/child-view-unmapped-segfault (diff) | |
parent | Introduce a way to show config warnings in swaynag (diff) | |
download | sway-ef18745951873025ec7fc44bd6987c39c3bdd0d7.tar.gz sway-ef18745951873025ec7fc44bd6987c39c3bdd0d7.tar.zst sway-ef18745951873025ec7fc44bd6987c39c3bdd0d7.zip |
Merge pull request #3202 from RedSoxFan/swaynag-config-warnings
Introduce a way to show config warnings in swaynag
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/bind.c | 8 | ||||
-rw-r--r-- | sway/commands/output/background.c | 7 |
2 files changed, 8 insertions, 7 deletions
diff --git a/sway/commands/bind.c b/sway/commands/bind.c index 34881b0f..9112815f 100644 --- a/sway/commands/bind.c +++ b/sway/commands/bind.c | |||
@@ -255,8 +255,12 @@ static struct cmd_results *cmd_bindsym_or_bindcode(int argc, char **argv, | |||
255 | for (int i = 0; i < mode_bindings->length; ++i) { | 255 | for (int i = 0; i < mode_bindings->length; ++i) { |
256 | struct sway_binding *config_binding = mode_bindings->items[i]; | 256 | struct sway_binding *config_binding = mode_bindings->items[i]; |
257 | if (binding_key_compare(binding, config_binding)) { | 257 | if (binding_key_compare(binding, config_binding)) { |
258 | wlr_log(WLR_DEBUG, "overwriting old binding with command '%s'", | 258 | wlr_log(WLR_INFO, "Overwriting binding '%s' for device '%s' " |
259 | config_binding->command); | 259 | "from `%s` to `%s`", argv[0], binding->input, |
260 | binding->command, config_binding->command); | ||
261 | config_add_swaynag_warning("Overwriting binding '%s' for device " | ||
262 | "'%s' to `%s` from `%s`", argv[0], binding->input, | ||
263 | binding->command, config_binding->command); | ||
260 | free_sway_binding(config_binding); | 264 | free_sway_binding(config_binding); |
261 | mode_bindings->items[i] = binding; | 265 | mode_bindings->items[i] = binding; |
262 | overwritten = true; | 266 | overwritten = true; |
diff --git a/sway/commands/output/background.c b/sway/commands/output/background.c index 30fb47c4..2cd1b76a 100644 --- a/sway/commands/output/background.c +++ b/sway/commands/output/background.c | |||
@@ -116,11 +116,8 @@ struct cmd_results *output_cmd_background(int argc, char **argv) { | |||
116 | if (!can_access) { | 116 | if (!can_access) { |
117 | wlr_log(WLR_ERROR, "Unable to access background file '%s': %s", | 117 | wlr_log(WLR_ERROR, "Unable to access background file '%s': %s", |
118 | src, strerror(errno)); | 118 | src, strerror(errno)); |
119 | if (config->reading && !config->validating) { | 119 | config_add_swaynag_warning("Unable to access background file '%s'", |
120 | swaynag_log(config->swaynag_command, | 120 | src); |
121 | &config->swaynag_config_errors, | ||
122 | "Unable to access background file '%s'", src); | ||
123 | } | ||
124 | free(src); | 121 | free(src); |
125 | } else { | 122 | } else { |
126 | // Escape double quotes in the final path for swaybg | 123 | // Escape double quotes in the final path for swaybg |