+ } else if (streq("single_monocle", name)) {
+ bool b;
+ if (parse_bool(value, &b)) {
+ if (b == single_monocle) {
+ fail(rsp, "");
+ return;
+ }
+ single_monocle = b;
+ for (monitor_t *m = mon_head; m != NULL; m = m->next) {
+ for (desktop_t *d = m->desk_head; d != NULL; d = d->next) {
+ layout_t l = (single_monocle && tiled_count(d->root, true) <= 1) ? LAYOUT_MONOCLE : d->user_layout;
+ set_layout(m, d, l, false);
+ }
+ }
+ } else {
+ fail(rsp, "config: %s: Invalid value: '%s'.\n", name, value);
+ return;
+ }