mirror of
https://codeberg.org/dwl/dwl.git
synced 2025-01-30 04:37:28 -08:00
allow gaps in monocle layout if requested
This commit is contained in:
parent
02441863df
commit
fcf3f602af
2 changed files with 6 additions and 1 deletions
|
@ -8,6 +8,7 @@ static const int sloppyfocus = 1; /* focus follows mouse */
|
|||
static const int bypass_surface_visibility = 0; /* 1 means idle inhibitors will disable idle tracking even if it's surface isn't visible */
|
||||
static const int smartborders = 1;
|
||||
static const int smartgaps = 0; /* 1 means no outer gap when there is only one window */
|
||||
static const int monoclegaps = 0; /* 1 means outer gaps in monocle layout */
|
||||
static const unsigned int borderpx = 1; /* border pixel of windows */
|
||||
static const unsigned int gappih = 10; /* horiz inner gap between windows */
|
||||
static const unsigned int gappiv = 10; /* vert inner gap between windows */
|
||||
|
|
6
dwl.c
6
dwl.c
|
@ -2036,8 +2036,12 @@ 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);
|
||||
n++;
|
||||
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 (n)
|
||||
snprintf(m->ltsymbol, LENGTH(m->ltsymbol), "[%d]", n);
|
||||
|
|
Loading…
Reference in a new issue