diff options
author | Ryan Dwyer <RyanDwyer@users.noreply.github.com> | 2018-07-24 19:23:04 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 19:23:04 +1000 |
commit | e02a6718c2c7313309b45e499034d614ee6207fc (patch) | |
tree | 429de47906f0ba1f114689c48cbabc5be8bb6e71 /sway/commands/show_marks.c | |
parent | 94dd8823a0081f7983dce368d5d093d1d3eeaefe (diff) | |
parent | 6ccf2a2c66c1264450a4b3ab3dd344e1b3b44ca3 (diff) |
Merge branch 'master' into mouse-bindings
Diffstat (limited to 'sway/commands/show_marks.c')
-rw-r--r-- | sway/commands/show_marks.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sway/commands/show_marks.c b/sway/commands/show_marks.c index c7fdc538..434a0e27 100644 --- a/sway/commands/show_marks.c +++ b/sway/commands/show_marks.c @@ -7,6 +7,7 @@ #include "list.h" #include "log.h" #include "stringop.h" +#include "util.h" static void rebuild_marks_iterator(struct sway_container *con, void *data) { if (con->type == C_VIEW) { @@ -20,14 +21,7 @@ struct cmd_results *cmd_show_marks(int argc, char **argv) { return error; } - if (strcmp(*argv, "yes") == 0) { - config->show_marks = true; - } else if (strcmp(*argv, "no") == 0) { - config->show_marks = false; - } else { - return cmd_results_new(CMD_INVALID, "show_marks", - "Expected 'show_marks <yes|no>'"); - } + config->show_marks = parse_boolean(argv[0], config->show_marks); if (config->show_marks) { container_for_each_descendant_dfs(&root_container, |