archy-dwm/src/layouts/monocle.c

17 lines
444 B
C
Raw Normal View History

#include "../archy_dwm.h"
2022-10-31 13:25:39 +00:00
#include "../util.h"
void
2022-10-31 13:25:39 +00:00
monocle(Monitor *m) {
unsigned int n = 0;
Client *c;
2022-10-31 13:25:39 +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);
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);
}