summaryrefslogtreecommitdiffhomepage
path: root/patch/cfacts.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2019-09-09 21:35:19 +0200
committerbakkeby <[email protected]>2019-09-09 21:35:19 +0200
commit637cc50ddafc5aedc24ebfc5498cfec38cb22cc0 (patch)
tree15360754e45d3260f0afd35fbfb9ef6e580f130a /patch/cfacts.c
parent973d64f51be939daa50d85151262d8602e09e978 (diff)
downloaddwm-flexipatch-637cc50ddafc5aedc24ebfc5498cfec38cb22cc0.tar.gz
dwm-flexipatch-637cc50ddafc5aedc24ebfc5498cfec38cb22cc0.zip
Adding centered master patches
Diffstat (limited to 'patch/cfacts.c')
-rw-r--r--patch/cfacts.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/patch/cfacts.c b/patch/cfacts.c
index b193c92..b06098a 100644
--- a/patch/cfacts.c
+++ b/patch/cfacts.c
@@ -1,5 +1,6 @@
void
-setcfact(const Arg *arg) {
+setcfact(const Arg *arg)
+{
float f;
Client *c;
@@ -19,10 +20,11 @@ setcfact(const Arg *arg) {
void
getfacts(Monitor *m, float *mf, float *sf)
{
+ unsigned int n;
float mfacts = 0, sfacts = 0;
Client *c;
- for (c = nexttiled(m->clients); c; c = nexttiled(c->next)) {
+ for (n = 0, c = nexttiled(m->clients); c; c = nexttiled(c->next), n++) {
if (!m->nmaster || n < m->nmaster)
mfacts += c->cfact;
else