Forgot attaching the file...
void
tcl(Monitor *m) {
int x, h, w, mw;
unsigned int i, n;
Client *c;
for(n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
if(n == 0)
return;
/* master */
c = nexttiled(m->clients);
mw = m->mfact * m->ww;
resize(c, n<3?m->wx:m->wx+(m->ww-mw)/2, m->wy, (n == 1 ? m->ww : mw) - 2 * c->bw, m->wh - 2 * c->bw, False);
if(--n == 0)
return;
w=(m->ww-mw)/((n>1)+1);
c = nexttiled(c->next);
/* left stack, if it exists */
if(n>1){
x=m->wx;
h=m->wh/(n/2);
for(i = 0; c && i<n/2; c = nexttiled(c->next), i++) {
resize(c, x, m->wy+i*h, w, h, True);
}
}
/* right stack */
x=m->wx+((n>1)?(mw+m->ww)/2:mw);
h=m->wh/((n+1)/2);
for(i = 0; c; c=nexttiled(c->next), i++) {
resize(c, x, m->wy+i*h, w, h, True);
}
}
pgpjNvGgk1SHa.pgp
Description: PGP signature
