Remove /tagrules.

This commit is contained in:
Kris Maglione 2010-06-03 21:47:56 -04:00
parent 5f870abb2d
commit 217ce27a4b
6 changed files with 23 additions and 77 deletions

9
NEWS
View File

@ -1,6 +1,11 @@
3.1b1:
3.10b1:
* Xft is now loaded on demand
* colrules widths may now be specified in pixels
* /colrules widths may now be specified in pixels
* /tagrules has been replaced with the more general /rules
* Add witray system tray program
* Floating clients can be collapsed by clicking their layout boxes
* Dock windows act more like dock windows
* Fixed some managed move bugs
3.9b1:
* wmii9menu is now Xinerama aware.

View File

@ -205,32 +205,25 @@ apply_rules(Client *c) {
bool ret;
ret = false;
if(def.rules.string)
for(r=def.rules.rule; r; r=r->next)
if(regexec(r->regex, c->props, nil, 0)) {
for(rv=r->values; rv; rv=rv->next) {
if(!strcmp(rv->key, "default-tags")) {
utflcpy(c->tags, rv->value, sizeof c->tags);
ret = true;
}
else {
bufclear();
bufprint("%s %s", rv->key, rv->value);
m = ixp_message(buffer, sizeof buffer, MsgPack);
if(!waserror()) {
message_client(c, &m);
poperror();
}
for(r=def.rules.rule; r; r=r->next)
if(regexec(r->regex, c->props, nil, 0)) {
for(rv=r->values; rv; rv=rv->next) {
if(!strcmp(rv->key, "default-tags")) {
utflcpy(c->tags, rv->value, sizeof c->tags);
ret = true;
}else {
bufclear();
bufprint("%s %s", rv->key, rv->value);
m = ixp_message(buffer, sizeof buffer, MsgPack);
if(!waserror()) {
message_client(c, &m);
poperror();
}
}
return true;
}
if(def.tagrules.string)
for(r=def.tagrules.rule; r; r=r->next)
if(regexec(r->regex, c->props, nil, 0))
return client_applytags(c, r->value);
return false;
return ret;
}
return ret;
}
void

View File

@ -287,7 +287,6 @@ EXTERN struct {
char* keys;
uint keyssz;
Ruleset colrules;
Ruleset tagrules;
Ruleset rules;
char grabmod[5];
ulong mod;

View File

@ -44,7 +44,6 @@ enum { /* Dirs */
FsFKeys,
FsFRctl,
FsFRules,
FsFTagRules,
FsFTctl,
FsFTindex,
FsFprops,
@ -91,7 +90,6 @@ dirtab_root[]= {{".", QTDIR, FsRoot, 0500|DMDIR },
{"event", QTFILE, FsFEvent, 0600 },
{"keys", QTFILE, FsFKeys, 0600 },
{"rules", QTFILE, FsFRules, 0600 },
{"tagrules", QTFILE, FsFTagRules, 0600 },
{nil}},
dirtab_clients[]={{".", QTDIR, FsDClients, 0500|DMDIR },
{"", QTDIR, FsDClient, 0500|DMDIR },
@ -340,9 +338,6 @@ lookup_file(IxpFileId *parent, char *name)
case FsFRules:
file->p.rule = &def.rules;
break;
case FsFTagRules:
file->p.rule = &def.tagrules;
break;
}
if(name)
goto LastItem;
@ -384,7 +379,6 @@ fs_size(IxpFileId *f) {
return 0;
case FsFColRules:
case FsFRules:
case FsFTagRules:
return f->p.rule->size;
case FsFKeys:
return def.keyssz;
@ -453,7 +447,6 @@ fs_read(Ixp9Req *r) {
return;
case FsFColRules:
case FsFRules:
case FsFTagRules:
ixp_srv_readbuf(r, f->p.rule->string, f->p.rule->size);
respond(r, nil);
return;
@ -527,7 +520,6 @@ fs_write(Ixp9Req *r) {
switch(f->tab.type) {
case FsFColRules:
case FsFRules:
case FsFTagRules:
ixp_srv_writebuf(r, &f->p.rule->string, &f->p.rule->size, 0);
respond(r, nil);
break;
@ -696,17 +688,8 @@ fs_clunk(Ixp9Req *r) {
switch(f->tab.type) {
case FsFColRules:
case FsFRules:
case FsFTagRules:
update_rules(&f->p.rule->rule, f->p.rule->string);
break;
/*
case FsFTagRules:
update_rules(&f->p.rule->rule, f->p.rule->string);
for(c=client; c; c=c->next)
apply_rules(c);
view_update_all();
break;
*/
case FsFKeys:
update_keys();
break;

View File

@ -314,25 +314,6 @@ obtained from the client's group or from the
_WMII_TAGS window property. This key should be
preferred to the \fItags\fR key in most cases.
.RS -8
.TP
tagrules
The \fItagrules\fR file contains a list of
rules similar to the colrules. These rules specify
the tags a client is to be given when it is created.
Rules are specified as:
.nf
/\fI<regex>\fR/ -> \fI<tag>\fR\fI[+\fI<tag>\fR]\fR*
.fi
When a client's \fI<name>\fR:\fI<class>\fR:\fI<title>\fR matches
\fI<regex>\fR, it is given the tagstring \fI<tag>\fR. There are
two special tags. \fB!\fR, which is deprecated, and identical
to \fIsel\fR, represents the current tag. \fB~\fR
represents the floating layer.
.TP
keys
The \fIkeys\fR file contains a list of keys which

View File

@ -277,21 +277,6 @@ follows.
\_WMII_TAGS window property. This key should be
preferred to the _tags_ key in most cases.
<<
: tagrules
The _tagrules_ file contains a list of
rules similar to the colrules. These rules specify
the tags a client is to be given when it is created.
Rules are specified as:
``` /<regex>/ -> <tag>[+<tag>]*
When a client's <name>:<class>:<title> matches
<regex>, it is given the tagstring <tag>. There are
two special tags. **!**, which is deprecated, and identical
to _sel_, represents the current tag. **~**
represents the floating layer.
: keys
The _keys_ file contains a list of keys which
`wmii` will grab. Whenever these key combinations