dwm

Kris's build of dwm
git clone git clone https://git.krisyotam.com/krisyotam/dwm.git
Log | Files | Refs | README | LICENSE

layout_monocle.c (979B)


      1 #if VANITYGAPS_PATCH && VANITYGAPS_MONOCLE_PATCH
      2 void
      3 monocle(Monitor *m)
      4 {
      5 	unsigned int n;
      6 	int oh, ov, ih, iv;
      7 	Client *c;
      8 
      9 	getgaps(m, &oh, &ov, &ih, &iv, &n);
     10 
     11 	#if !MONOCLESYMBOL_PATCH
     12 	if (n > 0) /* override layout symbol */
     13 		snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
     14 	#endif // MONOCLESYMBOL_PATCH
     15 	for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
     16 		resize(c, m->wx + ov, m->wy + oh, m->ww - 2 * c->bw - 2 * ov, m->wh - 2 * c->bw - 2 * oh, 0);
     17 }
     18 #else
     19 void
     20 monocle(Monitor *m)
     21 {
     22 	#if !MONOCLESYMBOL_PATCH
     23 	unsigned int n = 0;
     24 	#endif // MONOCLESYMBOL_PATCH
     25 	Client *c;
     26 
     27 	#if !MONOCLESYMBOL_PATCH
     28 	for (c = m->clients; c; c = c->next)
     29 		if (ISVISIBLE(c))
     30 			n++;
     31 	if (n > 0) /* override layout symbol */
     32 		snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
     33 	#endif // MONOCLESYMBOL_PATCH
     34 	for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
     35 		resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
     36 }
     37 #endif // VANITYGAPS_PATCH
     38