aewl

changeset 745:08b89915c109

added jukka's viewnext code
author meillo@marmaro.de
date Sun, 11 Feb 2007 11:59:23 +0100
parents 628c5bac7f3b
children a28456200108
files dwm.h tag.c
diffstat 2 files changed, 12 insertions(+), 0 deletions(-) [+]
line diff
     1.1 --- a/dwm.h	Fri Feb 09 14:56:19 2007 +0100
     1.2 +++ b/dwm.h	Sun Feb 11 11:59:23 2007 +0100
     1.3 @@ -132,6 +132,7 @@
     1.4  extern void settags(Client *c, Client *trans);	/* sets tags of c */
     1.5  extern void tag(Arg *arg);			/* tags c with arg's index */
     1.6  extern void toggletag(Arg *arg);		/* toggles c tags with arg's index */
     1.7 +extern void viewnext(Arg *arg);    /* view next tag(s) [code by jukka] */
     1.8  
     1.9  /* util.c */
    1.10  extern void *emallocz(unsigned int size);	/* allocates zero-initialized memory, exits on error */
     2.1 --- a/tag.c	Fri Feb 09 14:56:19 2007 +0100
     2.2 +++ b/tag.c	Sun Feb 11 11:59:23 2007 +0100
     2.3 @@ -132,3 +132,14 @@
     2.4  		sel->tags[arg->i] = True;
     2.5  	arrange();
     2.6  }
     2.7 +
     2.8 +void
     2.9 +viewnext(Arg *arg) {
    2.10 +  unsigned int i;
    2.11 +  Bool last = seltag[ntags-1];
    2.12 +
    2.13 +  for (i=ntags-1; i>0; --i)
    2.14 +    seltag[i] = seltag[i-1];
    2.15 +  seltag[0] = last;
    2.16 +  arrange();
    2.17 +}