Adding option to enable gaps for monocle layout, ref. issue #11
This commit is contained in:
@@ -1,3 +1,21 @@
|
||||
#if VANITYGAPS_PATCH && VANITYGAPS_MONOCLE_PATCH
|
||||
void
|
||||
monocle(Monitor *m)
|
||||
{
|
||||
unsigned int n;
|
||||
int oh, ov, ih, iv;
|
||||
Client *c;
|
||||
|
||||
getgaps(m, &oh, &ov, &ih, &iv, &n);
|
||||
|
||||
#if !MONOCLESYMBOL_PATCH
|
||||
if (n > 0) /* override layout symbol */
|
||||
snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
|
||||
#endif // MONOCLESYMBOL_PATCH
|
||||
for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
|
||||
resize(c, m->wx + ov, m->wy + oh, m->ww - 2 * c->bw - 2 * ov, m->wh - 2 * c->bw - 2 * oh, 0);
|
||||
}
|
||||
#else
|
||||
void
|
||||
monocle(Monitor *m)
|
||||
{
|
||||
@@ -15,4 +33,5 @@ monocle(Monitor *m)
|
||||
#endif // MONOCLESYMBOL_PATCH
|
||||
for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
|
||||
resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
|
||||
}
|
||||
}
|
||||
#endif // VANITYGAPS_PATCH
|
Reference in New Issue
Block a user