Mercurial > hg > index.fcgi > dwm > dwm-3.6.1-10pba
diff tag.c @ 1:ba504f41828f
add prev/next control to view_tags() and setlayouts()
author | paulo@localhost |
---|---|
date | Mon, 23 Mar 2009 00:14:48 -0700 |
parents | 7024076fa948 |
children |
line diff
1.1 --- a/tag.c Sun Mar 22 23:26:35 2009 -0700 1.2 +++ b/tag.c Mon Mar 23 00:14:48 2009 -0700 1.3 @@ -164,3 +164,21 @@ 1.4 a.i = lastview; 1.5 view(&a); 1.6 } 1.7 + 1.8 +void 1.9 +next_view(Arg *arg) { 1.10 + int i; 1.11 + Arg a; 1.12 + 1.13 + a.i = 0; 1.14 + setlayout(&a); /* back to default layout */ 1.15 + 1.16 + for(i = 0; i < ntags; i++) { 1.17 + if (seltag[i] == True) { 1.18 + seltag[i] = False; 1.19 + seltag[(i + arg->i) >= 0 ? (i + arg->i) % ntags : ntags - 1] = True; 1.20 + break; 1.21 + } 1.22 + } 1.23 + lt->arrange(); 1.24 +}