summaryrefslogtreecommitdiffstats
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
parentimplement multi-tag selection through button3 click on the specific tag (diff)
downloaddwm-292ccc4c43d9529cb6db0973fcab6e24c73607a5.tar.gz
dwm-292ccc4c43d9529cb6db0973fcab6e24c73607a5.zip
implemented viewextend and added M-S-C-n shortcuts for extending the current view... updated man page (works great!) nice feature
Diffstat (limited to '')
-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)
181 unsigned int i; 181 unsigned int i;
182 182
183 for(i = 0; i < ntags; i++) 183 for(i = 0; i < ntags; i++)
184 if(c->tags[i] && tsel[i]) 184 if(c->tags[i] && seltag[i])
185 return True; 185 return True;
186 return False; 186 return False;
187} 187}
@@ -229,7 +229,7 @@ settags(Client *c)
229 } 229 }
230 if(!matched) 230 if(!matched)
231 for(i = 0; i < ntags; i++) 231 for(i = 0; i < ntags; i++)
232 c->tags[i] = tsel[i]; 232 c->tags[i] = seltag[i];
233} 233}
234 234
235void 235void
@@ -245,8 +245,21 @@ view(Arg *arg)
245 unsigned int i; 245 unsigned int i;
246 246
247 for(i = 0; i < ntags; i++) 247 for(i = 0; i < ntags; i++)
248 tsel[i] = False; 248 seltag[i] = False;
249 tsel[arg->i] = True; 249 seltag[arg->i] = True;
250 arrange(NULL);
251 drawall();
252}
253
254void
255viewextend(Arg *arg)
256{
257 unsigned int i;
258
259 seltag[arg->i] = !seltag[arg->i];
260 for(i = 0; !seltag[i] && i < ntags; i++);
261 if(i == ntags)
262 seltag[arg->i] = True; /* cannot toggle last view */
250 arrange(NULL); 263 arrange(NULL);
251 drawall(); 264 drawall();
252} 265}
@@ -256,7 +269,7 @@ viewnext(Arg *arg)
256{ 269{
257 unsigned int i; 270 unsigned int i;
258 271
259 for(i = 0; !tsel[i]; i++); 272 for(i = 0; !seltag[i]; i++);
260 arg->i = (i < ntags-1) ? i+1 : 0; 273 arg->i = (i < ntags-1) ? i+1 : 0;
261 view(arg); 274 view(arg);
262} 275}
@@ -266,7 +279,7 @@ viewprev(Arg *arg)
266{ 279{
267 unsigned int i; 280 unsigned int i;
268 281
269 for(i = 0; !tsel[i]; i++); 282 for(i = 0; !seltag[i]; i++);
270 arg->i = (i > 0) ? i-1 : ntags-1; 283 arg->i = (i > 0) ? i-1 : ntags-1;
271 view(arg); 284 view(arg);
272} 285}