2020-03-07 17:03:19 +01: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-09 00:18:47 +02:00
|
|
|
void
|
|
|
|
monocle(Monitor *m)
|
|
|
|
{
|
2019-10-04 22:51:42 +02:00
|
|
|
#if !MONOCLESYMBOL_PATCH
|
2019-09-09 00:18:47 +02:00
|
|
|
unsigned int n = 0;
|
2019-10-04 22:51:42 +02:00
|
|
|
#endif // MONOCLESYMBOL_PATCH
|
2019-09-09 00:18:47 +02:00
|
|
|
Client *c;
|
|
|
|
|
2019-10-04 22:51:42 +02:00
|
|
|
#if !MONOCLESYMBOL_PATCH
|
2019-09-09 00:18:47 +02: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 22:51:42 +02:00
|
|
|
#endif // MONOCLESYMBOL_PATCH
|
2019-09-09 00:18:47 +02: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 17:03:19 +01:00
|
|
|
}
|
2021-06-14 07:16:17 +02:00
|
|
|
#endif // VANITYGAPS_PATCH
|
|
|
|
|