From 2a5e1791d47ad603d135f8d472135cb6a2aadfb0 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 28 Jun 2010 12:29:04 +0000 Subject: fix window name and class to match cwmrc(5); from Holger Mikolon - thanks! ok oga@ --- group.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/group.c b/group.c index d88484b..0624098 100644 --- a/group.c +++ b/group.c @@ -188,12 +188,11 @@ group_make_autogroup(struct conf *conf, char *class, int no) if ((p = strchr(class, ',')) == NULL) { aw->name = NULL; - aw->class = xstrdup(class); } else { *(p++) = '\0'; - aw->name = xstrdup(class); - aw->class = xstrdup(p); + aw->name = xstrdup(p); } + aw->class = xstrdup(class); aw->num = no; TAILQ_INSERT_TAIL(&conf->autogroupq, aw, entry); -- cgit 1.4.1 From aaca5b7e45d4d4bdbd3e1001d80cccca4c14d77c Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 23 Jul 2010 15:13:00 +0000 Subject: fix backwards example (after r1.45 of group.c); noticed by phessler@ ok oga@ phessler@ --- cwmrc.5 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cwmrc.5 b/cwmrc.5 index 4121274..1fd978a 100644 --- a/cwmrc.5 +++ b/cwmrc.5 @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: August 24 2009 $ +.Dd $Mdocdate: March 20 2010 $ .Dt CWMRC 5 .Os .Sh NAME @@ -206,8 +206,8 @@ command xmms xmms command top "xterm -e top" # Autogroup definitions -autogroup 3 "aterm,XTerm" -autogroup 3 "xterm,XTerm" +autogroup 3 "XTerm,aterm" +autogroup 3 "XTerm,xterm" # Ignore programs by that name by not drawing borders around them. ignore XMMS -- cgit 1.4.1 From 2440efad06f6c6d13d5d46c498d29ccee4d58c42 Mon Sep 17 00:00:00 2001 From: okan Date: Fri, 30 Jul 2010 12:28:19 +0000 Subject: revert -r1.45 of group.c (log was: fix window name and class to match cwmrc(5)). instead, fix cwmrc(5) to match the old behavior which also happens to match the example config, of which many have based their configs; this also nicely matches the output of xprop(1). clean-up of variable names as a separate commit. suggested by sthen (and something we should have done initially). discussed with and ok oga@ --- cwmrc.5 | 10 +++++----- group.c | 5 +++-- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/cwmrc.5 b/cwmrc.5 index 1fd978a..46bc897 100644 --- a/cwmrc.5 +++ b/cwmrc.5 @@ -14,7 +14,7 @@ .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" -.Dd $Mdocdate: March 20 2010 $ +.Dd $Mdocdate: July 23 2010 $ .Dt CWMRC 5 .Os .Sh NAME @@ -27,8 +27,8 @@ configuration file. The following options are accepted in the configuration file: .Pp .Bl -tag -width Ds -compact -.It Ic autogroup Ar group windowclass -.It Ic autogroup Ar group windowclass,windowname +.It Ic autogroup Ar group windowname +.It Ic autogroup Ar group windowname,windowclass Control automatic window grouping, based on the class and/or name properties, where .Ar group @@ -206,8 +206,8 @@ command xmms xmms command top "xterm -e top" # Autogroup definitions -autogroup 3 "XTerm,aterm" -autogroup 3 "XTerm,xterm" +autogroup 3 "aterm,XTerm" +autogroup 3 "xterm,XTerm" # Ignore programs by that name by not drawing borders around them. ignore XMMS diff --git a/group.c b/group.c index 0624098..d88484b 100644 --- a/group.c +++ b/group.c @@ -188,11 +188,12 @@ group_make_autogroup(struct conf *conf, char *class, int no) if ((p = strchr(class, ',')) == NULL) { aw->name = NULL; + aw->class = xstrdup(class); } else { *(p++) = '\0'; - aw->name = xstrdup(p); + aw->name = xstrdup(class); + aw->class = xstrdup(p); } - aw->class = xstrdup(class); aw->num = no; TAILQ_INSERT_TAIL(&conf->autogroupq, aw, entry); -- cgit 1.4.1