renamed MASTER into MWFACT, master into mwfact, and incmaster into addtomwfact
This commit is contained in:
		
							parent
							
								
									2c6087e3d2
								
							
						
					
					
						commit
						f6e41b0bc3
					
				| 
						 | 
					@ -32,7 +32,7 @@ static Layout layout[] = { \
 | 
				
			||||||
	{ "[]=",		tile }, /* first entry is default */ \
 | 
						{ "[]=",		tile }, /* first entry is default */ \
 | 
				
			||||||
	{ "><>",		floating }, \
 | 
						{ "><>",		floating }, \
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
#define MASTER			0.6	/* 0.1 .. 0.9 */
 | 
					#define MWFACT			0.6	/* master width factor [0.1 .. 0.9] */
 | 
				
			||||||
#define SNAP			32	/* snap pixel */
 | 
					#define SNAP			32	/* snap pixel */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* key definitions */
 | 
					/* key definitions */
 | 
				
			||||||
| 
						 | 
					@ -49,8 +49,8 @@ static Key key[] = { \
 | 
				
			||||||
	{ MODKEY,			XK_b,		togglebar,	NULL }, \
 | 
						{ MODKEY,			XK_b,		togglebar,	NULL }, \
 | 
				
			||||||
	{ MODKEY,			XK_j,		focusclient,	"1" }, \
 | 
						{ MODKEY,			XK_j,		focusclient,	"1" }, \
 | 
				
			||||||
	{ MODKEY,			XK_k,		focusclient,	"-1" }, \
 | 
						{ MODKEY,			XK_k,		focusclient,	"-1" }, \
 | 
				
			||||||
	{ MODKEY,			XK_h,		incmaster,	"-0.05" }, \
 | 
						{ MODKEY,			XK_h,		addtomwfact,	"-0.05" }, \
 | 
				
			||||||
	{ MODKEY,			XK_l,		incmaster,	"0.05" }, \
 | 
						{ MODKEY,			XK_l,		addtomwfact,	"0.05" }, \
 | 
				
			||||||
	{ MODKEY,			XK_m,		togglemax,	NULL }, \
 | 
						{ MODKEY,			XK_m,		togglemax,	NULL }, \
 | 
				
			||||||
	{ MODKEY,			XK_Return,	zoom,		NULL }, \
 | 
						{ MODKEY,			XK_Return,	zoom,		NULL }, \
 | 
				
			||||||
	{ MODKEY|ShiftMask,		XK_space,	togglefloating,	NULL }, \
 | 
						{ MODKEY|ShiftMask,		XK_space,	togglefloating,	NULL }, \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,7 +33,7 @@ static Layout layout[] = { \
 | 
				
			||||||
	{ "[]=",		tile }, /* first entry is default */ \
 | 
						{ "[]=",		tile }, /* first entry is default */ \
 | 
				
			||||||
	{ "><>",		floating }, \
 | 
						{ "><>",		floating }, \
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
#define MASTER			0.6	/* 0.1 .. 0.9 */
 | 
					#define MWFACT			0.6	/* master width factor [0.1 .. 0.9] */
 | 
				
			||||||
#define SNAP			32	/* snap pixel */
 | 
					#define SNAP			32	/* snap pixel */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* key definitions */
 | 
					/* key definitions */
 | 
				
			||||||
| 
						 | 
					@ -47,8 +47,8 @@ static Key key[] = { \
 | 
				
			||||||
	{ MODKEY,			XK_b,		togglebar,	NULL }, \
 | 
						{ MODKEY,			XK_b,		togglebar,	NULL }, \
 | 
				
			||||||
	{ MODKEY,			XK_j,		focusclient,	"1" }, \
 | 
						{ MODKEY,			XK_j,		focusclient,	"1" }, \
 | 
				
			||||||
	{ MODKEY,			XK_k,		focusclient,	"-1" }, \
 | 
						{ MODKEY,			XK_k,		focusclient,	"-1" }, \
 | 
				
			||||||
	{ MODKEY,			XK_h,		incmaster,	"-0.05" }, \
 | 
						{ MODKEY,			XK_h,		addtomwfact,	"-0.05" }, \
 | 
				
			||||||
	{ MODKEY,			XK_l,		incmaster,	"0.05" }, \
 | 
						{ MODKEY,			XK_l,		addtomwfact,	"0.05" }, \
 | 
				
			||||||
	{ MODKEY,			XK_m,		togglemax,	NULL }, \
 | 
						{ MODKEY,			XK_m,		togglemax,	NULL }, \
 | 
				
			||||||
	{ MODKEY,			XK_Return,	zoom,		NULL }, \
 | 
						{ MODKEY,			XK_Return,	zoom,		NULL }, \
 | 
				
			||||||
	{ MODKEY|ShiftMask,		XK_space,	togglefloating,	NULL }, \
 | 
						{ MODKEY|ShiftMask,		XK_space,	togglefloating,	NULL }, \
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,8 +20,8 @@ LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
 | 
				
			||||||
# flags
 | 
					# flags
 | 
				
			||||||
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
 | 
					CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
 | 
				
			||||||
LDFLAGS = -s ${LIBS}
 | 
					LDFLAGS = -s ${LIBS}
 | 
				
			||||||
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
 | 
					CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
 | 
				
			||||||
#LDFLAGS = -g ${LIBS}
 | 
					LDFLAGS = -g ${LIBS}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Solaris
 | 
					# Solaris
 | 
				
			||||||
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
 | 
					#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										13
									
								
								tile.c
								
								
								
								
							
							
						
						
									
										13
									
								
								tile.c
								
								
								
								
							| 
						 | 
					@ -4,23 +4,22 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* static */
 | 
					/* static */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static double master = MASTER;
 | 
					static double mwfact = MWFACT;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* extern */
 | 
					/* extern */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void
 | 
					void
 | 
				
			||||||
incmaster(const char *arg) {
 | 
					addtomwfact(const char *arg) {
 | 
				
			||||||
	double delta;
 | 
						double delta;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if(lt->arrange != tile)
 | 
						if(lt->arrange != tile)
 | 
				
			||||||
		return;
 | 
							return;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* arg handling, manipulate master */
 | 
						/* arg handling, manipulate mwfact */
 | 
				
			||||||
	if(arg && (1 == sscanf(arg, "%lf", &delta))) {
 | 
						if(arg && (1 == sscanf(arg, "%lf", &delta))) {
 | 
				
			||||||
		if(delta + master > 0.1 && delta + master < 0.9)
 | 
							if(delta + mwfact > 0.1 && delta + mwfact < 0.9)
 | 
				
			||||||
			master += delta;
 | 
								mwfact += delta;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					 | 
				
			||||||
	lt->arrange();
 | 
						lt->arrange();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -33,7 +32,7 @@ tile(void) {
 | 
				
			||||||
		n++;
 | 
							n++;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* window geoms */
 | 
						/* window geoms */
 | 
				
			||||||
	mw = (n == 1) ? waw : master * waw;
 | 
						mw = (n == 1) ? waw : mwfact * waw;
 | 
				
			||||||
	th = (n > 1) ? wah / (n - 1) : 0;
 | 
						th = (n > 1) ? wah / (n - 1) : 0;
 | 
				
			||||||
	if(n > 1 && th < bh)
 | 
						if(n > 1 && th < bh)
 | 
				
			||||||
		th = wah;
 | 
							th = wah;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								tile.h
								
								
								
								
							
							
						
						
									
										2
									
								
								tile.h
								
								
								
								
							| 
						 | 
					@ -1,6 +1,6 @@
 | 
				
			||||||
/* See LICENSE file for copyright and license details. */
 | 
					/* See LICENSE file for copyright and license details. */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* tile.c */
 | 
					/* tile.c */
 | 
				
			||||||
void incmaster(const char *arg);	/* inc/decreases the master width */
 | 
					void addtomwfact(const char *arg);	/* adds arg value [0.1 .. 0.9] to master width factor */
 | 
				
			||||||
void tile(void);			/* arranges all windows tiled */
 | 
					void tile(void);			/* arranges all windows tiled */
 | 
				
			||||||
void zoom(const char *arg);		/* zooms the focused client to master area, arg is ignored */
 | 
					void zoom(const char *arg);		/* zooms the focused client to master area, arg is ignored */
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue