[hackers] [wmii] Remove /tagrules. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Fri, 4 Jun 2010 01:48:13 +0000 (UTC)

changeset: 2700:c8cd91c26eeb
tag: tip
user: Kris Maglione <kris_AT_suckless.org>
date: Thu Jun 03 21:47:56 2010 -0400
files: NEWS cmd/wmii/client.c cmd/wmii/dat.h cmd/wmii/fs.c man/wmii.1 man/wmii.man1
description:
Remove /tagrules.

diff -r 376da7ebb9eb -r c8cd91c26eeb NEWS
--- a/NEWS Thu Jun 03 21:38:14 2010 -0400
+++ b/NEWS Thu Jun 03 21:47:56 2010 -0400
@@ -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.
diff -r 376da7ebb9eb -r c8cd91c26eeb cmd/wmii/client.c
--- a/cmd/wmii/client.c Thu Jun 03 21:38:14 2010 -0400
+++ b/cmd/wmii/client.c Thu Jun 03 21:47:56 2010 -0400
@@ -205,32 +205,25 @@
         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
diff -r 376da7ebb9eb -r c8cd91c26eeb cmd/wmii/dat.h
--- a/cmd/wmii/dat.h Thu Jun 03 21:38:14 2010 -0400
+++ b/cmd/wmii/dat.h Thu Jun 03 21:47:56 2010 -0400
@@ -287,7 +287,6 @@
         char* keys;
         uint keyssz;
         Ruleset colrules;
- Ruleset tagrules;
         Ruleset rules;
         char grabmod[5];
         ulong mod;
diff -r 376da7ebb9eb -r c8cd91c26eeb cmd/wmii/fs.c
--- a/cmd/wmii/fs.c Thu Jun 03 21:38:14 2010 -0400
+++ b/cmd/wmii/fs.c Thu Jun 03 21:47:56 2010 -0400
@@ -44,7 +44,6 @@
         FsFKeys,
         FsFRctl,
         FsFRules,
- FsFTagRules,
         FsFTctl,
         FsFTindex,
         FsFprops,
@@ -91,7 +90,6 @@
                   {"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 @@
                         case FsFRules:
                                 file->p.rule = &def.rules;
                                 break;
- case FsFTagRules:
- file->p.rule = &def.tagrules;
- break;
                         }
                         if(name)
                                 goto LastItem;
@@ -384,7 +379,6 @@
                 return 0;
         case FsFColRules:
         case FsFRules:
- case FsFTagRules:
                 return f->p.rule->size;
         case FsFKeys:
                 return def.keyssz;
@@ -453,7 +447,6 @@
                         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 @@
         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 @@
         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;
diff -r 376da7ebb9eb -r c8cd91c26eeb man/wmii.1
--- a/man/wmii.1 Thu Jun 03 21:38:14 2010 -0400
+++ b/man/wmii.1 Thu Jun 03 21:47:56 2010 -0400
@@ -314,25 +314,6 @@
 _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
diff -r 376da7ebb9eb -r c8cd91c26eeb man/wmii.man1
--- a/man/wmii.man1 Thu Jun 03 21:38:14 2010 -0400
+++ b/man/wmii.man1 Thu Jun 03 21:47:56 2010 -0400
@@ -277,21 +277,6 @@
                 \_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
Received on Fri Jun 04 2010 - 01:48:13 UTC

This archive was generated by hypermail 2.2.0 : Fri Jun 04 2010 - 02:00:09 UTC