aboutsummaryrefslogtreecommitdiff
path: root/sway
diff options
context:
space:
mode:
Diffstat (limited to 'sway')
-rw-r--r--sway/commands/hide_edge_borders.c2
-rw-r--r--sway/layout.c7
2 files changed, 9 insertions, 0 deletions
diff --git a/sway/commands/hide_edge_borders.c b/sway/commands/hide_edge_borders.c
index 0be940c1..cb4f052d 100644
--- a/sway/commands/hide_edge_borders.c
+++ b/sway/commands/hide_edge_borders.c
@@ -15,6 +15,8 @@ struct cmd_results *cmd_hide_edge_borders(int argc, char **argv) {
config->hide_edge_borders = E_HORIZONTAL;
} else if (strcasecmp(argv[0], "both") == 0) {
config->hide_edge_borders = E_BOTH;
+ } else if (strcasecmp(argv[0], "smart") == 0) {
+ config->hide_edge_borders = E_SMART;
} else {
return cmd_results_new(CMD_INVALID, "hide_edge_borders",
"Expected 'hide_edge_borders <none|vertical|horizontal|both>'");
diff --git a/sway/layout.c b/sway/layout.c
index ea4a680d..bb37a360 100644
--- a/sway/layout.c
+++ b/sway/layout.c
@@ -665,6 +665,13 @@ void update_geometry(swayc_t *container) {
border_bottom = 0;
}
}
+
+ if (config->hide_edge_borders == E_SMART && workspace->children->length == 1) {
+ border_top = 0;
+ border_bottom = 0;
+ border_left = 0;
+ border_right = 0;
+ }
}
int title_bar_height = config->font_height + 4; //borders + padding