renamed MASTER into MWFACT, master into mwfact, and incmaster into addtomwfact f6e41b0b
Anselm R. Garbe · 2007-08-12 12:46 5 file(s) · +15 −16
config.arg.h +3 −3
32 32
	{ "[]=",		tile }, /* first entry is default */ \
33 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 36
#define SNAP			32	/* snap pixel */
37 37
38 38
/* key definitions */
49 49
	{ MODKEY,			XK_b,		togglebar,	NULL }, \
50 50
	{ MODKEY,			XK_j,		focusclient,	"1" }, \
51 51
	{ MODKEY,			XK_k,		focusclient,	"-1" }, \
52 -
	{ MODKEY,			XK_h,		incmaster,	"-0.05" }, \
53 -
	{ MODKEY,			XK_l,		incmaster,	"0.05" }, \
52 +
	{ MODKEY,			XK_h,		addtomwfact,	"-0.05" }, \
53 +
	{ MODKEY,			XK_l,		addtomwfact,	"0.05" }, \
54 54
	{ MODKEY,			XK_m,		togglemax,	NULL }, \
55 55
	{ MODKEY,			XK_Return,	zoom,		NULL }, \
56 56
	{ MODKEY|ShiftMask,		XK_space,	togglefloating,	NULL }, \
config.default.h +3 −3
33 33
	{ "[]=",		tile }, /* first entry is default */ \
34 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 37
#define SNAP			32	/* snap pixel */
38 38
39 39
/* key definitions */
47 47
	{ MODKEY,			XK_b,		togglebar,	NULL }, \
48 48
	{ MODKEY,			XK_j,		focusclient,	"1" }, \
49 49
	{ MODKEY,			XK_k,		focusclient,	"-1" }, \
50 -
	{ MODKEY,			XK_h,		incmaster,	"-0.05" }, \
51 -
	{ MODKEY,			XK_l,		incmaster,	"0.05" }, \
50 +
	{ MODKEY,			XK_h,		addtomwfact,	"-0.05" }, \
51 +
	{ MODKEY,			XK_l,		addtomwfact,	"0.05" }, \
52 52
	{ MODKEY,			XK_m,		togglemax,	NULL }, \
53 53
	{ MODKEY,			XK_Return,	zoom,		NULL }, \
54 54
	{ MODKEY|ShiftMask,		XK_space,	togglefloating,	NULL }, \
config.mk +2 −2
20 20
# flags
21 21
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
22 22
LDFLAGS = -s ${LIBS}
23 -
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
24 -
#LDFLAGS = -g ${LIBS}
23 +
CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
24 +
LDFLAGS = -g ${LIBS}
25 25
26 26
# Solaris
27 27
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
tile.c +6 −7
4 4
5 5
/* static */
6 6
7 -
static double master = MASTER;
7 +
static double mwfact = MWFACT;
8 8
9 9
/* extern */
10 10
11 11
void
12 -
incmaster(const char *arg) {
12 +
addtomwfact(const char *arg) {
13 13
	double delta;
14 14
15 15
	if(lt->arrange != tile)
16 16
		return;
17 17
18 -
	/* arg handling, manipulate master */
18 +
	/* arg handling, manipulate mwfact */
19 19
	if(arg && (1 == sscanf(arg, "%lf", &delta))) {
20 -
		if(delta + master > 0.1 && delta + master < 0.9)
21 -
			master += delta;
20 +
		if(delta + mwfact > 0.1 && delta + mwfact < 0.9)
21 +
			mwfact += delta;
22 22
	}
23 -
24 23
	lt->arrange();
25 24
}
26 25
33 32
		n++;
34 33
35 34
	/* window geoms */
36 -
	mw = (n == 1) ? waw : master * waw;
35 +
	mw = (n == 1) ? waw : mwfact * waw;
37 36
	th = (n > 1) ? wah / (n - 1) : 0;
38 37
	if(n > 1 && th < bh)
39 38
		th = wah;
tile.h +1 −1
1 1
/* See LICENSE file for copyright and license details. */
2 2
3 3
/* tile.c */
4 -
void incmaster(const char *arg);	/* inc/decreases the master width */
4 +
void addtomwfact(const char *arg);	/* adds arg value [0.1 .. 0.9] to master width factor */
5 5
void tile(void);			/* arranges all windows tiled */
6 6
void zoom(const char *arg);		/* zooms the focused client to master area, arg is ignored */