aboutsummaryrefslogtreecommitdiffstats
path: root/tag.c
diff options
context:
space:
mode:
authorAnselm R.Garbe <arg@10ksloc.org>2006-08-11 19:26:12 +0200
committerAnselm R.Garbe <arg@10ksloc.org>2006-08-11 19:26:12 +0200
commit292ccc4c43d9529cb6db0973fcab6e24c73607a5 (patch)
tree55e0deb6352d8f2c967b38105d13ca1e3454fe95 /tag.c
parentd7413ffd2d9a84fc3140b28b26f8cb6bb80164e4 (diff)
downloaddwm-292ccc4c43d9529cb6db0973fcab6e24c73607a5.tar.gz
implemented viewextend and added M-S-C-n shortcuts for extending the current view... updated man page (works great!) nice feature
Diffstat (limited to 'tag.c')
-rw-r--r--tag.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/tag.c b/tag.c
index 3e89569..51dda03 100644
--- a/tag.c
+++ b/tag.c
@@ -181,7 +181,7 @@ isvisible(Client *c)
unsigned int i;
for(i = 0; i < ntags; i++)
- if(c->tags[i] && tsel[i])
+ if(c->tags[i] && seltag[i])
return True;
return False;
}
@@ -229,7 +229,7 @@ settags(Client *c)
}
if(!matched)
for(i = 0; i < ntags; i++)
- c->tags[i] = tsel[i];
+ c->tags[i] = seltag[i];
}
void
@@ -245,8 +245,21 @@ view(Arg *arg)
unsigned int i;
for(i = 0; i < ntags; i++)
- tsel[i] = False;
- tsel[arg->i] = True;
+ seltag[i] = False;
+ seltag[arg->i] = True;
+ arrange(NULL);
+ drawall();
+}
+
+void
+viewextend(Arg *arg)
+{
+ unsigned int i;
+
+ seltag[arg->i] = !seltag[arg->i];
+ for(i = 0; !seltag[i] && i < ntags; i++);
+ if(i == ntags)
+ seltag[arg->i] = True; /* cannot toggle last view */
arrange(NULL);
drawall();
}
@@ -256,7 +269,7 @@ viewnext(Arg *arg)
{
unsigned int i;
- for(i = 0; !tsel[i]; i++);
+ for(i = 0; !seltag[i]; i++);
arg->i = (i < ntags-1) ? i+1 : 0;
view(arg);
}
@@ -266,7 +279,7 @@ viewprev(Arg *arg)
{
unsigned int i;
- for(i = 0; !tsel[i]; i++);
+ for(i = 0; !seltag[i]; i++);
arg->i = (i > 0) ? i-1 : ntags-1;
view(arg);
}