Add smart_gaps inverse_outer command

Add a subcommand for `smart_gaps` that enables outer gaps only
on workspaces with exactly one visible child.
Also add documentation for `smart_gaps toggle`.
This commit is contained in:
bR3iN 2021-10-28 15:31:23 +02:00 committed by Simon Ser
parent aaf68cf423
commit 9969de9e00
5 changed files with 44 additions and 20 deletions

View file

@ -15,7 +15,12 @@ struct cmd_results *cmd_smart_gaps(int argc, char **argv) {
return error;
}
config->smart_gaps = parse_boolean(argv[0], config->smart_gaps);
if (strcmp(argv[0], "inverse_outer") == 0) {
config->smart_gaps = SMART_GAPS_INVERSE_OUTER;
} else {
config->smart_gaps = parse_boolean(argv[0], config->smart_gaps)
? SMART_GAPS_ON : SMART_GAPS_OFF;
}
arrange_root();