allow gaps in monocle layout if requested

This commit is contained in:
Leonardo Hernández Hernández 2022-07-20 00:15:32 -05:00
parent 01df83eb65
commit 8ba581f2ae
No known key found for this signature in database
GPG key ID: E538897EE11B9624
2 changed files with 6 additions and 1 deletions

6
dwl.c
View file

@ -1916,7 +1916,11 @@ monocle(Monitor *m)
wl_list_for_each(c, &clients, link) {
if (!VISIBLEON(c, m) || c->isfloating || c->isfullscreen)
continue;
resize(c, m->w, 0, !smartborders);
if (!monoclegaps)
resize(c, m->w, 0, !smartborders);
else
resize(c, (struct wlr_box){.x = m->w.x + gappoh, .y = m->w.y + gappov,
.width = m->w.width - 2 * gappoh, .height = m->w.height - 2 * gappov}, 0, !smartborders);
}
if ((c = focustop(m)))
wlr_scene_node_raise_to_top(c->scene);