aewl

changeset 144:e61447a7f249

applied Jukkas prev/next patch with XK_{h,l}
author arg@10ksloc.org
date Tue, 01 Aug 2006 12:39:14 +0200
parents 36cabfe408cd
children 774754477c35
files dwm.h event.c tag.c
diffstat 3 files changed, 18 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/dwm.h	Tue Aug 01 12:32:33 2006 +0200
     1.2 +++ b/dwm.h	Tue Aug 01 12:39:14 2006 +0200
     1.3 @@ -143,6 +143,8 @@
     1.4  extern void settags(Client *c);
     1.5  extern void togglemode(Arg *arg);
     1.6  extern void view(Arg *arg);
     1.7 +extern void viewnext(Arg *arg);
     1.8 +extern void viewprev(Arg *arg);
     1.9  
    1.10  /* util.c */
    1.11  extern void *emallocz(unsigned int size);
     2.1 --- a/event.c	Tue Aug 01 12:32:33 2006 +0200
     2.2 +++ b/event.c	Tue Aug 01 12:39:14 2006 +0200
     2.3 @@ -32,8 +32,10 @@
     2.4  	{ MODKEY,		XK_2,		view,		{ .i = Tnet } }, 
     2.5  	{ MODKEY,		XK_3,		view,		{ .i = Twork } }, 
     2.6  	{ MODKEY,		XK_4,		view,		{ .i = Tmisc} }, 
     2.7 +	{ MODKEY,		XK_h,		viewprev,	{ 0 } },
     2.8  	{ MODKEY,		XK_j,		focusnext,	{ 0 } }, 
     2.9  	{ MODKEY,		XK_k,		focusprev,	{ 0 } },
    2.10 +	{ MODKEY,		XK_l,		viewnext,	{ 0 } },
    2.11  	{ MODKEY,		XK_m,		togglemax,	{ 0 } }, 
    2.12  	{ MODKEY,		XK_space,	togglemode,	{ 0 } }, 
    2.13  	{ MODKEY,		XK_Return,	zoom,		{ 0 } },
     3.1 --- a/tag.c	Tue Aug 01 12:32:33 2006 +0200
     3.2 +++ b/tag.c	Tue Aug 01 12:39:14 2006 +0200
     3.3 @@ -216,3 +216,17 @@
     3.4  	arrange(NULL);
     3.5  	drawall();
     3.6  }
     3.7 +
     3.8 +void
     3.9 +viewnext(Arg *arg)
    3.10 +{
    3.11 +	arg->i = (tsel < TLast-1) ? tsel+1 : 0;
    3.12 +	view(arg);
    3.13 +}
    3.14 +
    3.15 +void
    3.16 +viewprev(Arg *arg)
    3.17 +{
    3.18 +	arg->i = (tsel > 0) ? tsel-1 : TLast-1;
    3.19 +	view(arg);
    3.20 +}