summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--config.arg.h2
-rw-r--r--config.default.h6
-rw-r--r--tag.c8
3 files changed, 8 insertions, 8 deletions
diff --git a/config.arg.h b/config.arg.h
index d346856..70c245f 100644
--- a/config.arg.h
+++ b/config.arg.h
@@ -46,7 +46,7 @@ static Key key[] = { \
46 46
47#define RULES \ 47#define RULES \
48static Rule rule[] = { \ 48static Rule rule[] = { \
49 /* class:instance regex tags regex isfloat */ \ 49 /* class:instance:title regex tags regex isfloat */ \
50 { "Firefox.*", "net", False }, \ 50 { "Firefox.*", "net", False }, \
51 { "Gimp.*", NULL, True}, \ 51 { "Gimp.*", NULL, True}, \
52 { "MPlayer.*", NULL, True}, \ 52 { "MPlayer.*", NULL, True}, \
diff --git a/config.default.h b/config.default.h
index 453da71..c0102b0 100644
--- a/config.default.h
+++ b/config.default.h
@@ -47,11 +47,11 @@ static Key key[] = { \
47 { MODKEY|ShiftMask, XK_q, quit, { 0 } }, \ 47 { MODKEY|ShiftMask, XK_q, quit, { 0 } }, \
48}; 48};
49 49
50/* Query class:instance for regex matching info with following command: 50/* Query class:instance:title for regex matching info with following command:
51 * xprop | awk -F'"' '/^WM_CLASS/ { printf "%s:%s\n", $4, $2 }'*/ 51 * xprop | awk -F '"' '/^WM_CLASS/ { printf("%s:%s:",$4,$2) }; /^WM_NAME/{ printf("%s\n",$2) }' */
52#define RULES \ 52#define RULES \
53static Rule rule[] = { \ 53static Rule rule[] = { \
54 /* class:instance regex tags regex isfloat */ \ 54 /* class:instance:title regex tags regex isfloat */ \
55 { "Firefox.*", "2", False }, \ 55 { "Firefox.*", "2", False }, \
56 { "Gimp.*", NULL, True}, \ 56 { "Gimp.*", NULL, True}, \
57}; 57};
diff --git a/tag.c b/tag.c
index bc36f08..512f355 100644
--- a/tag.c
+++ b/tag.c
@@ -78,18 +78,18 @@ initrregs()
78void 78void
79settags(Client *c) 79settags(Client *c)
80{ 80{
81 char classinst[256]; 81 char prop[512];
82 unsigned int i, j; 82 unsigned int i, j;
83 regmatch_t tmp; 83 regmatch_t tmp;
84 Bool matched = False; 84 Bool matched = False;
85 XClassHint ch; 85 XClassHint ch;
86 86
87 if(XGetClassHint(dpy, c->win, &ch)) { 87 if(XGetClassHint(dpy, c->win, &ch)) {
88 snprintf(classinst, sizeof(classinst), "%s:%s", 88 snprintf(prop, sizeof(prop), "%s:%s:%s",
89 ch.res_class ? ch.res_class : "", 89 ch.res_class ? ch.res_class : "",
90 ch.res_name ? ch.res_name : ""); 90 ch.res_name ? ch.res_name : "", c->name);
91 for(i = 0; !matched && i < len; i++) 91 for(i = 0; !matched && i < len; i++)
92 if(rreg[i].clregex && !regexec(rreg[i].clregex, classinst, 1, &tmp, 0)) { 92 if(rreg[i].clregex && !regexec(rreg[i].clregex, prop, 1, &tmp, 0)) {
93 c->isfloat = rule[i].isfloat; 93 c->isfloat = rule[i].isfloat;
94 for(j = 0; rreg[i].tregex && j < ntags; j++) { 94 for(j = 0; rreg[i].tregex && j < ntags; j++) {
95 if(!regexec(rreg[i].tregex, tags[j], 1, &tmp, 0)) { 95 if(!regexec(rreg[i].tregex, tags[j], 1, &tmp, 0)) {