2020-03-07 16:03:19 +00:00
|
|
|
#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
|
2019-09-08 22:18:47 +00:00
|
|
|
void
|
|
|
|
monocle(Monitor *m)
|
|
|
|
{
|
2019-10-04 20:51:42 +00:00
|
|
|
#if !MONOCLESYMBOL_PATCH
|
2019-09-08 22:18:47 +00:00
|
|
|
unsigned int n = 0;
|
2019-10-04 20:51:42 +00:00
|
|
|
#endif // MONOCLESYMBOL_PATCH
|
2019-09-08 22:18:47 +00:00
|
|
|
Client *c;
|
|
|
|
|
2019-10-04 20:51:42 +00:00
|
|
|
#if !MONOCLESYMBOL_PATCH
|
2019-09-08 22:18:47 +00:00
|
|
|
for (c = m->clients; c; c = c->next)
|
|
|
|
if (ISVISIBLE(c))
|
|
|
|
n++;
|
|
|
|
if (n > 0) /* override layout symbol */
|
|
|
|
snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
|
2019-10-04 20:51:42 +00:00
|
|
|
#endif // MONOCLESYMBOL_PATCH
|
2019-09-08 22:18:47 +00:00
|
|
|
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);
|
2020-03-07 16:03:19 +00:00
|
|
|
}
|
2021-06-14 05:16:17 +00:00
|
|
|
#endif // VANITYGAPS_PATCH
|
|
|
|
|