From a355782a7795c8c26a05e8bda1505ff46d5d0289 Mon Sep 17 00:00:00 2001 From: Anselm R Garbe Date: Mon, 24 Mar 2008 14:23:28 +0000 Subject: revival of mfact and setmfact --- dwm.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'dwm.c') 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); @@ -1462,6 +1463,26 @@ setlayout(const char *arg) { drawbar(); } +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; -- cgit v1.2.3