diff options
author | db <github@benedik.si> | 2019-02-24 10:00:15 +0100 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-02-24 15:26:37 -0500 |
commit | 2510e3df384d9ab7b27e66c27371ec44606f5d8e (patch) | |
tree | 604c78e79e5ba5c780429a69d5c617ffc0a5cbe4 /sway/commands | |
parent | d4b1e71b919a52fbad0ba8191259eb4f14dfd1ab (diff) |
add --i3 flag to hide_edge_borders
Enables i3-compatible behavior regarding hiding the title bar on tabbed and
stacked containers with one child.
Related issues and merge requests: #3031, #3002, #2912, #2987.
Diffstat (limited to 'sway/commands')
-rw-r--r-- | sway/commands/hide_edge_borders.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sway/commands/hide_edge_borders.c b/sway/commands/hide_edge_borders.c index 84a217b8..6120a17f 100644 --- a/sway/commands/hide_edge_borders.c +++ b/sway/commands/hide_edge_borders.c @@ -5,10 +5,16 @@ struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) { struct cmd_results *error = NULL; - if ((error = checkarg(argc, "hide_edge_borders", EXPECTED_EQUAL_TO, 1))) { + if ((error = checkarg(argc, "hide_edge_borders", EXPECTED_AT_LEAST, 1))) { return error; } + if (strcmp(*argv, "--i3") == 0) { + config->hide_lone_tab = true; + ++argv; + --argc; + } + if (strcmp(argv[0], "none") == 0) { config->hide_edge_borders = E_NONE; } else if (strcmp(argv[0], "vertical") == 0) { @@ -23,7 +29,7 @@ struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) { config->hide_edge_borders = E_SMART_NO_GAPS; } else { return cmd_results_new(CMD_INVALID, "Expected 'hide_edge_borders " - "<none|vertical|horizontal|both|smart|smart_no_gaps>'"); + "[--i3] <none|vertical|horizontal|both|smart|smart_no_gaps>'"); } config->saved_edge_borders = config->hide_edge_borders; |