dynamic framecount
@@ -3531,9 +3531,14 @@ tagtoright(const Arg *arg) {
void
tile(Monitor *m)
{
- unsigned int i, n, h, mw, my, ty;
+ unsigned int i, n, h, mw, my, ty, framecount;
Client *c;
+ if (clientcount() > 5)
+ framecount = 5;
+ else
+ framecount = 10;
+
for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++);
if (n == 0)
return;
@@ -3545,12 +3550,12 @@ tile(Monitor *m)
for (i = my = ty = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), i++)
if (i < m->nmaster) {
h = (m->wh - my) / (MIN(n, m->nmaster) - i);
- animateclient(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), 7, 0);
+ animateclient(c, m->wx, m->wy + my, mw - (2*c->bw), h - (2*c->bw), framecount, 0);
if (my + HEIGHT(c) < m->wh)
my += HEIGHT(c);
} else {
h = (m->wh - ty) / (n - i);
- animateclient(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), 7, 0);
+ animateclient(c, m->wx + mw, m->wy + ty, m->ww - mw - (2*c->bw), h - (2*c->bw), framecount, 0);
if (ty + HEIGHT(c) < m->wh)
ty += HEIGHT(c);
}
