diff options
| author | bakkeby <[email protected]> | 2019-09-09 19:11:31 +0200 |
|---|---|---|
| committer | bakkeby <[email protected]> | 2019-09-09 19:11:31 +0200 |
| commit | 9081aef7485d4d201ff0531e913702586e04929e (patch) | |
| tree | d4b1ea24ce89710179a30119945e5d3b9e43712b /patch/cfacts.c | |
| parent | cccb8fcecb1e6bce06bec81557d9d3a37631561f (diff) | |
| download | dwm-flexipatch-9081aef7485d4d201ff0531e913702586e04929e.tar.gz dwm-flexipatch-9081aef7485d4d201ff0531e913702586e04929e.zip | |
Adding gappless grid layout
Diffstat (limited to 'patch/cfacts.c')
| -rw-r--r-- | patch/cfacts.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/patch/cfacts.c b/patch/cfacts.c index 085071f..b193c92 100644 --- a/patch/cfacts.c +++ b/patch/cfacts.c @@ -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 }
\ No newline at end of file |
