summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-03-24 14:23:28 +0000
committerAnselm R Garbe <garbeam@gmail.com>2008-03-24 14:23:28 +0000
commita355782a7795c8c26a05e8bda1505ff46d5d0289 (patch)
tree466aa459fb7e0bd8b641e85596b8df59237f983c /dwm.c
parent20cd3360876f551c0f3b4c9c5a827a64b829e6ef (diff)
revival of mfact and setmfact
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index e1c8c200..d264e48b 100644
--- a/dwm.c
+++ b/dwm.c
@@ -178,6 +178,7 @@ void scan(void);
void setclientstate(Client *c, long state);
void setgeom(const char *arg);
void setlayout(const char *arg);
+void setmfact(const char *arg);
void setup(void);
void spawn(const char *arg);
void tag(const char *arg);
@@ -1463,6 +1464,26 @@ setlayout(const char *arg) {
}
void
+setmfact(const char *arg) {
+ double delta;
+
+ if(!arg)
+ return;
+ delta = strtod(arg, NULL);
+ if(arg[0] == '-' || arg[0] == '+') {
+ if(mfact + delta < 0.1 || mfact + delta > 0.9)
+ return;
+ mfact += delta;
+ }
+ else {
+ if(delta < 0.1 || delta > 0.9)
+ return;
+ mfact = delta;
+ }
+ arrange();
+}
+
+void
setup(void) {
unsigned int i, w;
XSetWindowAttributes wa;