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@
This commit is contained in:
okan 2010-07-30 12:28:19 +00:00
parent aaca5b7e45
commit 2440efad06
2 changed files with 8 additions and 7 deletions

10
cwmrc.5
View File

@ -14,7 +14,7 @@
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\" .\"
.Dd $Mdocdate: March 20 2010 $ .Dd $Mdocdate: July 23 2010 $
.Dt CWMRC 5 .Dt CWMRC 5
.Os .Os
.Sh NAME .Sh NAME
@ -27,8 +27,8 @@ configuration file.
The following options are accepted in the configuration file: The following options are accepted in the configuration file:
.Pp .Pp
.Bl -tag -width Ds -compact .Bl -tag -width Ds -compact
.It Ic autogroup Ar group windowclass .It Ic autogroup Ar group windowname
.It Ic autogroup Ar group windowclass,windowname .It Ic autogroup Ar group windowname,windowclass
Control automatic window grouping, based on the class and/or name Control automatic window grouping, based on the class and/or name
properties, where properties, where
.Ar group .Ar group
@ -206,8 +206,8 @@ command xmms xmms
command top "xterm -e top" command top "xterm -e top"
# Autogroup definitions # Autogroup definitions
autogroup 3 "XTerm,aterm" autogroup 3 "aterm,XTerm"
autogroup 3 "XTerm,xterm" autogroup 3 "xterm,XTerm"
# Ignore programs by that name by not drawing borders around them. # Ignore programs by that name by not drawing borders around them.
ignore XMMS ignore XMMS

View File

@ -188,11 +188,12 @@ group_make_autogroup(struct conf *conf, char *class, int no)
if ((p = strchr(class, ',')) == NULL) { if ((p = strchr(class, ',')) == NULL) {
aw->name = NULL; aw->name = NULL;
aw->class = xstrdup(class);
} else { } else {
*(p++) = '\0'; *(p++) = '\0';
aw->name = xstrdup(p); aw->name = xstrdup(class);
aw->class = xstrdup(p);
} }
aw->class = xstrdup(class);
aw->num = no; aw->num = no;
TAILQ_INSERT_TAIL(&conf->autogroupq, aw, entry); TAILQ_INSERT_TAIL(&conf->autogroupq, aw, entry);