aewl

changeset 415:ad2b6ce6e95b

I really need column growing, now pushing upstream
author Anselm R. Garbe <arg@10kloc.org>
date Tue, 05 Sep 2006 09:02:37 +0200
parents c6ffcc201229
children e689e540607a
files config.arg.h config.default.h dwm.1 dwm.h view.c
diffstat 5 files changed, 27 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/config.arg.h	Tue Sep 05 08:37:34 2006 +0200
     1.2 +++ b/config.arg.h	Tue Sep 05 09:02:37 2006 +0200
     1.3 @@ -34,6 +34,7 @@
     1.4  	{ MODKEY,			XK_k,		focusprev,	{ 0 } }, \
     1.5  	{ MODKEY,			XK_Return,	zoom,		{ 0 } }, \
     1.6  	{ MODKEY,			XK_m,		togglemax,	{ 0 } }, \
     1.7 +	{ MODKEY,			XK_g,		growcol,	{ .i = 20 } }, \
     1.8  	{ MODKEY|ShiftMask,		XK_1,		tag,		{ .i = 0 } }, \
     1.9  	{ MODKEY|ShiftMask,		XK_2,		tag,		{ .i = 1 } }, \
    1.10  	{ MODKEY|ShiftMask,		XK_3,		tag,		{ .i = 2 } }, \
     2.1 --- a/config.default.h	Tue Sep 05 08:37:34 2006 +0200
     2.2 +++ b/config.default.h	Tue Sep 05 09:02:37 2006 +0200
     2.3 @@ -29,6 +29,7 @@
     2.4  	{ MODKEY|ShiftMask,		XK_Tab,		focusprev,	{ 0 } }, \
     2.5  	{ MODKEY,			XK_Return,	zoom,		{ 0 } }, \
     2.6  	{ MODKEY,			XK_m,		togglemax,	{ 0 } }, \
     2.7 +	{ MODKEY,			XK_g,		growcol,	{ .i = 20 } }, \
     2.8  	{ MODKEY|ShiftMask,		XK_1,		tag,		{ .i = 0 } }, \
     2.9  	{ MODKEY|ShiftMask,		XK_2,		tag,		{ .i = 1 } }, \
    2.10  	{ MODKEY|ShiftMask,		XK_3,		tag,		{ .i = 2 } }, \
     3.1 --- a/dwm.1	Tue Sep 05 08:37:34 2006 +0200
     3.2 +++ b/dwm.1	Tue Sep 05 09:02:37 2006 +0200
     3.3 @@ -90,6 +90,12 @@
     3.4  Maximize current
     3.5  .BR window .
     3.6  .TP
     3.7 +.B Mod1-g
     3.8 +Grow current
     3.9 +.BR column
    3.10 +.RB ( tiling
    3.11 +mode only).
    3.12 +.TP
    3.13  .B Mod1-Shift-[1..n]
    3.14  Apply
    3.15  .B nth tag
     4.1 --- a/dwm.h	Tue Sep 05 08:37:34 2006 +0200
     4.2 +++ b/dwm.h	Tue Sep 05 09:02:37 2006 +0200
     4.3 @@ -131,6 +131,7 @@
     4.4  extern void dotile(Arg *arg);
     4.5  extern void focusnext(Arg *arg);
     4.6  extern void focusprev(Arg *arg);
     4.7 +extern void growcol(Arg *arg);
     4.8  extern Bool isvisible(Client *c);
     4.9  extern void restack();
    4.10  extern void togglemode(Arg *arg);
     5.1 --- a/view.c	Tue Sep 05 08:37:34 2006 +0200
     5.2 +++ b/view.c	Tue Sep 05 09:02:37 2006 +0200
     5.3 @@ -169,6 +169,24 @@
     5.4  	}
     5.5  }
     5.6  
     5.7 +void
     5.8 +growcol(Arg *arg)
     5.9 +{
    5.10 +	if(!sel || (arrange != dotile))
    5.11 +		return;
    5.12 +	if(sel == getnext(clients)) {
    5.13 +		if(mw + arg->i > sw - 100)
    5.14 +			return;
    5.15 +		mw += arg->i;
    5.16 +	}
    5.17 +	else {
    5.18 +		if(mw - arg->i < 100)
    5.19 +			return;
    5.20 +		mw -= arg->i;
    5.21 +	}
    5.22 +	arrange(NULL);
    5.23 +}
    5.24 +
    5.25  Bool
    5.26  isvisible(Client *c)
    5.27  {