Adding gappless grid layout

This commit is contained in:
bakkeby
2019-09-09 19:11:31 +02:00
parent cccb8fcecb
commit 9081aef748
14 changed files with 143 additions and 68 deletions

View File

@@ -14,4 +14,20 @@ setcfact(const Arg *arg) {
return;
c->cfact = f;
arrange(selmon);
}
void
getfacts(Monitor *m, float *mf, float *sf)
{
float mfacts = 0, sfacts = 0;
Client *c;
for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
if (!m->nmaster || n < m->nmaster)
mfacts += c->cfact;
else
sfacts += c->cfact;
}
*mf = mfacts; // total factor of master area
*sf = sfacts; // total factor of slave area
}