summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config.def.h5
-rw-r--r--dwm.16
-rw-r--r--dwm.c21
3 files changed, 31 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h
index 9c15313..ddecedd 100644
--- a/config.def.h
+++ b/config.def.h
@@ -20,7 +20,8 @@ Rule rules[] = {
20 20
21/* geometries, s{x,y,w,h} and bh are already initualized here */ 21/* geometries, s{x,y,w,h} and bh are already initualized here */
22/* func name bx by bw wx wy ww wh mx my mw mh tx ty tw th mox moy mow moh */ 22/* func name bx by bw wx wy ww wh mx my mw mh tx ty tw th mox moy mow moh */
23DEFGEOM(single, 0, 0, sw, 0, bh, sw, sh-bh, wx, wy, 0.55*sw, wh, mx+mw, wy, ww-mw, wh, wx, wy, ww, wh) 23double mfact = 0.55;
24DEFGEOM(single, 0, 0, sw, 0, bh, sw, sh-bh, wx, wy, mfact*sw, wh, mx+mw, wy, ww-mw, wh, wx, wy, ww, wh)
24DEFGEOM(dual, 0, 0,1280, 0, bh, ww, wh-bh, wx, wy, 1280,800-bh, 1280, 0, ww-mw, sh, mx, my, mw, mh) 25DEFGEOM(dual, 0, 0,1280, 0, bh, ww, wh-bh, wx, wy, 1280,800-bh, 1280, 0, ww-mw, sh, mx, my, mw, mh)
25 26
26Geom geoms[] = { 27Geom geoms[] = {
@@ -51,6 +52,8 @@ Key keys[] = {
51 { MODKEY, XK_j, focusnext, NULL }, 52 { MODKEY, XK_j, focusnext, NULL },
52 { MODKEY, XK_k, focusprev, NULL }, 53 { MODKEY, XK_k, focusprev, NULL },
53 { MODKEY, XK_r, reapply, NULL }, 54 { MODKEY, XK_r, reapply, NULL },
55 { MODKEY, XK_h, setmfact, "-0.05" },
56 { MODKEY, XK_l, setmfact, "+0.05" },
54 { MODKEY, XK_Return, zoom, NULL }, 57 { MODKEY, XK_Return, zoom, NULL },
55 { MODKEY, XK_Tab, viewprevtag, NULL }, 58 { MODKEY, XK_Tab, viewprevtag, NULL },
56 { MODKEY|ShiftMask, XK_c, killclient, NULL }, 59 { MODKEY|ShiftMask, XK_c, killclient, NULL },
diff --git a/dwm.1 b/dwm.1
index 56cd2ab..a9f8cee 100644
--- a/dwm.1
+++ b/dwm.1
@@ -69,6 +69,12 @@ Focus next window.
69.B Mod1\-k 69.B Mod1\-k
70Focus previous window. 70Focus previous window.
71.TP 71.TP
72.B Mod1\-h
73Decrease master area size.
74.TP
75.B Mod1\-l
76Increase master area size.
77.TP
72.B Mod1\-Return 78.B Mod1\-Return
73Zooms/cycles focused window to/from master area (tiled layouts only). 79Zooms/cycles focused window to/from master area (tiled layouts only).
74.TP 80.TP
diff --git a/dwm.c b/dwm.c
index e1c8c20..d264e48 100644
--- a/dwm.c
+++ b/dwm.c
@@ -178,6 +178,7 @@ void scan(void);
178void setclientstate(Client *c, long state); 178void setclientstate(Client *c, long state);
179void setgeom(const char *arg); 179void setgeom(const char *arg);
180void setlayout(const char *arg); 180void setlayout(const char *arg);
181void setmfact(const char *arg);
181void setup(void); 182void setup(void);
182void spawn(const char *arg); 183void spawn(const char *arg);
183void tag(const char *arg); 184void tag(const char *arg);
@@ -1463,6 +1464,26 @@ setlayout(const char *arg) {
1463} 1464}
1464 1465
1465void 1466void
1467setmfact(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
1486void
1466setup(void) { 1487setup(void) {
1467 unsigned int i, w; 1488 unsigned int i, w;
1468 XSetWindowAttributes wa; 1489 XSetWindowAttributes wa;