summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnselm R. Garbe <garbeam@gmail.com>2007-08-12 12:46:08 +0200
committerAnselm R. Garbe <garbeam@gmail.com>2007-08-12 12:46:08 +0200
commitf6e41b0bc3a00a2c48a996e2da4ad84be9a719f7 (patch)
tree70f814444afc641cf00d0c56032b154e2b0f480e
parentfixed a comment (diff)
downloaddwm-f6e41b0bc3a00a2c48a996e2da4ad84be9a719f7.tar.gz
dwm-f6e41b0bc3a00a2c48a996e2da4ad84be9a719f7.zip
renamed MASTER into MWFACT, master into mwfact, and incmaster into addtomwfact
Diffstat (limited to '')
-rw-r--r--config.arg.h6
-rw-r--r--config.default.h6
-rw-r--r--config.mk4
-rw-r--r--tile.c13
-rw-r--r--tile.h2
5 files changed, 15 insertions, 16 deletions
diff --git a/config.arg.h b/config.arg.h
index 6fd4218..9a5bdc6 100644
--- a/config.arg.h
+++ b/config.arg.h
@@ -32,7 +32,7 @@ static Layout layout[] = { \
32 { "[]=", tile }, /* first entry is default */ \ 32 { "[]=", tile }, /* first entry is default */ \
33 { "><>", floating }, \ 33 { "><>", floating }, \
34}; 34};
35#define MASTER 0.6 /* 0.1 .. 0.9 */ 35#define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */
36#define SNAP 32 /* snap pixel */ 36#define SNAP 32 /* snap pixel */
37 37
38/* key definitions */ 38/* key definitions */
@@ -49,8 +49,8 @@ static Key key[] = { \
49 { MODKEY, XK_b, togglebar, NULL }, \ 49 { MODKEY, XK_b, togglebar, NULL }, \
50 { MODKEY, XK_j, focusclient, "1" }, \ 50 { MODKEY, XK_j, focusclient, "1" }, \
51 { MODKEY, XK_k, focusclient, "-1" }, \ 51 { MODKEY, XK_k, focusclient, "-1" }, \
52 { MODKEY, XK_h, incmaster, "-0.05" }, \ 52 { MODKEY, XK_h, addtomwfact, "-0.05" }, \
53 { MODKEY, XK_l, incmaster, "0.05" }, \ 53 { MODKEY, XK_l, addtomwfact, "0.05" }, \
54 { MODKEY, XK_m, togglemax, NULL }, \ 54 { MODKEY, XK_m, togglemax, NULL }, \
55 { MODKEY, XK_Return, zoom, NULL }, \ 55 { MODKEY, XK_Return, zoom, NULL }, \
56 { MODKEY|ShiftMask, XK_space, togglefloating, NULL }, \ 56 { MODKEY|ShiftMask, XK_space, togglefloating, NULL }, \
diff --git a/config.default.h b/config.default.h
index 1f0fe8c..83d244d 100644
--- a/config.default.h
+++ b/config.default.h
@@ -33,7 +33,7 @@ static Layout layout[] = { \
33 { "[]=", tile }, /* first entry is default */ \ 33 { "[]=", tile }, /* first entry is default */ \
34 { "><>", floating }, \ 34 { "><>", floating }, \
35}; 35};
36#define MASTER 0.6 /* 0.1 .. 0.9 */ 36#define MWFACT 0.6 /* master width factor [0.1 .. 0.9] */
37#define SNAP 32 /* snap pixel */ 37#define SNAP 32 /* snap pixel */
38 38
39/* key definitions */ 39/* key definitions */
@@ -47,8 +47,8 @@ static Key key[] = { \
47 { MODKEY, XK_b, togglebar, NULL }, \ 47 { MODKEY, XK_b, togglebar, NULL }, \
48 { MODKEY, XK_j, focusclient, "1" }, \ 48 { MODKEY, XK_j, focusclient, "1" }, \
49 { MODKEY, XK_k, focusclient, "-1" }, \ 49 { MODKEY, XK_k, focusclient, "-1" }, \
50 { MODKEY, XK_h, incmaster, "-0.05" }, \ 50 { MODKEY, XK_h, addtomwfact, "-0.05" }, \
51 { MODKEY, XK_l, incmaster, "0.05" }, \ 51 { MODKEY, XK_l, addtomwfact, "0.05" }, \
52 { MODKEY, XK_m, togglemax, NULL }, \ 52 { MODKEY, XK_m, togglemax, NULL }, \
53 { MODKEY, XK_Return, zoom, NULL }, \ 53 { MODKEY, XK_Return, zoom, NULL }, \
54 { MODKEY|ShiftMask, XK_space, togglefloating, NULL }, \ 54 { MODKEY|ShiftMask, XK_space, togglefloating, NULL }, \
diff --git a/config.mk b/config.mk
index a0fad48..6d8f1e8 100644
--- a/config.mk
+++ b/config.mk
@@ -20,8 +20,8 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
20# flags 20# flags
21CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\" 21CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
22LDFLAGS = -s ${LIBS} 22LDFLAGS = -s ${LIBS}
23#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\" 23CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
24#LDFLAGS = -g ${LIBS} 24LDFLAGS = -g ${LIBS}
25 25
26# Solaris 26# Solaris
27#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\" 27#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
diff --git a/tile.c b/tile.c
index 40e40e2..2481eb3 100644
--- a/tile.c
+++ b/tile.c
@@ -4,23 +4,22 @@
4 4
5/* static */ 5/* static */
6 6
7static double master = MASTER; 7static double mwfact = MWFACT;
8 8
9/* extern */ 9/* extern */
10 10
11void 11void
12incmaster(const char *arg) { 12addtomwfact(const char *arg) {
13 double delta; 13 double delta;
14 14
15 if(lt->arrange != tile) 15 if(lt->arrange != tile)
16 return; 16 return;
17 17
18 /* arg handling, manipulate master */ 18 /* arg handling, manipulate mwfact */
19 if(arg && (1 == sscanf(arg, "%lf", &delta))) { 19 if(arg && (1 == sscanf(arg, "%lf", &delta))) {
20 if(delta + master > 0.1 && delta + master < 0.9) 20 if(delta + mwfact > 0.1 && delta + mwfact < 0.9)
21 master += delta; 21 mwfact += delta;
22 } 22 }
23
24 lt->arrange(); 23 lt->arrange();
25} 24}
26 25
@@ -33,7 +32,7 @@ tile(void) {
33 n++; 32 n++;
34 33
35 /* window geoms */ 34 /* window geoms */
36 mw = (n == 1) ? waw : master * waw; 35 mw = (n == 1) ? waw : mwfact * waw;
37 th = (n > 1) ? wah / (n - 1) : 0; 36 th = (n > 1) ? wah / (n - 1) : 0;
38 if(n > 1 && th < bh) 37 if(n > 1 && th < bh)
39 th = wah; 38 th = wah;
diff --git a/tile.h b/tile.h
index 67483c8..cd4e394 100644
--- a/tile.h
+++ b/tile.h
@@ -1,6 +1,6 @@
1/* See LICENSE file for copyright and license details. */ 1/* See LICENSE file for copyright and license details. */
2 2
3/* tile.c */ 3/* tile.c */
4void incmaster(const char *arg); /* inc/decreases the master width */ 4void addtomwfact(const char *arg); /* adds arg value [0.1 .. 0.9] to master width factor */
5void tile(void); /* arranges all windows tiled */ 5void tile(void); /* arranges all windows tiled */
6void zoom(const char *arg); /* zooms the focused client to master area, arg is ignored */ 6void zoom(const char *arg); /* zooms the focused client to master area, arg is ignored */