about summary refs log tree commit diff stats
path: root/dwm.c
diff options
context:
space:
mode:
authorAnselm R Garbe <garbeam@gmail.com>2008-05-15 10:47:26 +0100
committerAnselm R Garbe <garbeam@gmail.com>2008-05-15 10:47:26 +0100
commit71681c21a594260604779b96f46d51c82af11a03 (patch)
treea99a7ab8ce228e871232ae30c6f25e8563896177 /dwm.c
parent704781875cde5412bcb8859f3c5961664f62ced8 (diff)
downloaddwm-71681c21a594260604779b96f46d51c82af11a03.tar.gz
added wild-card handling for tags
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/dwm.c b/dwm.c
index 02c30d4..b86ba94 100644
--- a/dwm.c
+++ b/dwm.c
@@ -240,7 +240,7 @@ Window root, barwin;
 
 void
 applyrules(Client *c) {
-	unsigned int i;
+	unsigned int i, j;
 	Bool matched = False;
 	Rule *r;
 	XClassHint ch = { 0 };
@@ -254,7 +254,11 @@ applyrules(Client *c) {
 		&& (!r->instance || (ch.res_name && strstr(ch.res_name, r->instance)))) {
 			c->isfloating = r->isfloating;
 			if(r->tag) {
-				c->tags[idxoftag(r->tag)] = True;
+				if(r->tag[0] == '*' && r->tag[1] == 0)
+					for(j = 0; j < LENGTH(tags); i++)
+						c->tags[j] = True;
+				else
+					c->tags[idxoftag(r->tag)] = True;
 				matched = True;
 			}
 		}