summaryrefslogtreecommitdiffhomepage
path: root/patch/cfacts.c
diff options
context:
space:
mode:
authorbakkeby <[email protected]>2019-09-09 00:18:47 +0200
committerbakkeby <[email protected]>2019-09-09 00:18:47 +0200
commite490af0eb2d24e94af67c934e6ae05246ee7c885 (patch)
tree7784227501f1bc5f20a308cafcd6573450413cd5 /patch/cfacts.c
parent747512af21fabae327a1a4e7b01bfd00af8eeb15 (diff)
downloaddwm-flexipatch-e490af0eb2d24e94af67c934e6ae05246ee7c885.tar.gz
dwm-flexipatch-e490af0eb2d24e94af67c934e6ae05246ee7c885.zip
Adding cfacts, vanitygaps patches and bottomstack layouts
Diffstat (limited to 'patch/cfacts.c')
-rw-r--r--patch/cfacts.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/patch/cfacts.c b/patch/cfacts.c
new file mode 100644
index 0000000..085071f
--- /dev/null
+++ b/patch/cfacts.c
@@ -0,0 +1,17 @@
+void
+setcfact(const Arg *arg) {
+ float f;
+ Client *c;
+
+ c = selmon->sel;
+
+ if (!arg || !c || !selmon->lt[selmon->sellt]->arrange)
+ return;
+ f = arg->f + c->cfact;
+ if (arg->f == 0.0)
+ f = 1.0;
+ else if (f < 0.25 || f > 4.0)
+ return;
+ c->cfact = f;
+ arrange(selmon);
+} \ No newline at end of file