diff options
Diffstat (limited to '')
| -rw-r--r-- | dwm.c | 21 |
1 files changed, 21 insertions, 0 deletions
| @@ -178,6 +178,7 @@ void scan(void); | |||
| 178 | void setclientstate(Client *c, long state); | 178 | void setclientstate(Client *c, long state); |
| 179 | void setgeom(const char *arg); | 179 | void setgeom(const char *arg); |
| 180 | void setlayout(const char *arg); | 180 | void setlayout(const char *arg); |
| 181 | void setmfact(const char *arg); | ||
| 181 | void setup(void); | 182 | void setup(void); |
| 182 | void spawn(const char *arg); | 183 | void spawn(const char *arg); |
| 183 | void tag(const char *arg); | 184 | void tag(const char *arg); |
| @@ -1463,6 +1464,26 @@ setlayout(const char *arg) { | |||
| 1463 | } | 1464 | } |
| 1464 | 1465 | ||
| 1465 | void | 1466 | void |
| 1467 | setmfact(const char *arg) { | ||
| 1468 | double delta; | ||
| 1469 | |||
| 1470 | if(!arg) | ||
| 1471 | return; | ||
| 1472 | delta = strtod(arg, NULL); | ||
| 1473 | if(arg[0] == '-' || arg[0] == '+') { | ||
| 1474 | if(mfact + delta < 0.1 || mfact + delta > 0.9) | ||
| 1475 | return; | ||
| 1476 | mfact += delta; | ||
| 1477 | } | ||
| 1478 | else { | ||
| 1479 | if(delta < 0.1 || delta > 0.9) | ||
| 1480 | return; | ||
| 1481 | mfact = delta; | ||
| 1482 | } | ||
| 1483 | arrange(); | ||
| 1484 | } | ||
| 1485 | |||
| 1486 | void | ||
| 1466 | setup(void) { | 1487 | setup(void) { |
| 1467 | unsigned int i, w; | 1488 | unsigned int i, w; |
| 1468 | XSetWindowAttributes wa; | 1489 | XSetWindowAttributes wa; |
