diff options
author | 2015-08-10 02:20:40 +0200 | |
---|---|---|
committer | 2015-08-10 02:20:40 +0200 | |
commit | d62efd70e423104dc21405535be59782880271c6 (patch) | |
tree | e313897eddbeb38095770de19d1afe554cc8f21d | |
parent | Fix focus follows mouse (diff) | |
download | sway-d62efd70e423104dc21405535be59782880271c6.tar.gz sway-d62efd70e423104dc21405535be59782880271c6.tar.zst sway-d62efd70e423104dc21405535be59782880271c6.zip |
commands: re-add log_colors
-rw-r--r-- | sway/commands.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index 12d38244..15c43ac2 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -197,6 +197,21 @@ int cmd_splith(struct sway_config *config, int argc, char **argv) { | |||
197 | return _do_split(config, argc, argv, L_HORIZ); | 197 | return _do_split(config, argc, argv, L_HORIZ); |
198 | } | 198 | } |
199 | 199 | ||
200 | int cmd_log_colors(struct sway_config *config, int argc, char **argv) { | ||
201 | if (argc != 1) { | ||
202 | sway_log(L_ERROR, "Invalid log_colors command (expected 1 argument, got %d)", argc); | ||
203 | return 1; | ||
204 | } | ||
205 | |||
206 | if (strcasecmp(argv[0], "no") != 0 && strcasecmp(argv[0], "yes") != 0) { | ||
207 | sway_log(L_ERROR, "Invalid log_colors command (expected `yes` or `no`, got '%s')", argv[0]); | ||
208 | return 1; | ||
209 | } | ||
210 | |||
211 | sway_log_colors(!strcasecmp(argv[0], "yes")); | ||
212 | return 0; | ||
213 | } | ||
214 | |||
200 | /* Keep alphabetized */ | 215 | /* Keep alphabetized */ |
201 | struct cmd_handler handlers[] = { | 216 | struct cmd_handler handlers[] = { |
202 | { "bindsym", cmd_bindsym }, | 217 | { "bindsym", cmd_bindsym }, |
@@ -205,6 +220,7 @@ struct cmd_handler handlers[] = { | |||
205 | { "focus", cmd_focus }, | 220 | { "focus", cmd_focus }, |
206 | { "focus_follows_mouse", cmd_focus_follows_mouse }, | 221 | { "focus_follows_mouse", cmd_focus_follows_mouse }, |
207 | { "layout", cmd_layout }, | 222 | { "layout", cmd_layout }, |
223 | { "log_colors", cmd_log_colors }, | ||
208 | { "set", cmd_set }, | 224 | { "set", cmd_set }, |
209 | { "splith", cmd_splith }, | 225 | { "splith", cmd_splith }, |
210 | { "splitv", cmd_splitv } | 226 | { "splitv", cmd_splitv } |