From a899d267fe78dbbb923c8626528973f8e6b65bae Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 17 Apr 2013 13:30:38 +0000 Subject: add conf_ignore and move group_make_autogroup to conf_autogroup to match. --- conf.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'conf.c') diff --git a/conf.c b/conf.c index 67f58a6..7303768 100644 --- a/conf.c +++ b/conf.c @@ -52,6 +52,39 @@ conf_cmd_add(struct conf *c, char *image, char *label) } } +void +conf_autogroup(struct conf *c, int no, char *val) +{ + struct autogroupwin *aw; + char *p; + + aw = xcalloc(1, sizeof(*aw)); + + if ((p = strchr(val, ',')) == NULL) { + aw->name = NULL; + aw->class = xstrdup(val); + } else { + *(p++) = '\0'; + aw->name = xstrdup(val); + aw->class = xstrdup(p); + } + aw->num = no; + + TAILQ_INSERT_TAIL(&c->autogroupq, aw, entry); +} + +void +conf_ignore(struct conf *c, char *val) +{ + struct winmatch *wm; + + wm = xcalloc(1, sizeof(*wm)); + + (void)strlcpy(wm->title, val, sizeof(wm->title)); + + TAILQ_INSERT_TAIL(&c->ignoreq, wm, entry); +} + void conf_gap(struct conf *c, struct screen_ctx *sc) { -- cgit 1.4.1 From 1dbcc394aed6f7e4161ab065516128fa94bd0149 Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 17 Apr 2013 13:31:47 +0000 Subject: zap extra space --- conf.c | 1 - 1 file changed, 1 deletion(-) (limited to 'conf.c') diff --git a/conf.c b/conf.c index 7303768..06d4e1c 100644 --- a/conf.c +++ b/conf.c @@ -39,7 +39,6 @@ void conf_cmd_add(struct conf *c, char *image, char *label) { /* "term" and "lock" have special meanings. */ - if (strcmp(label, "term") == 0) (void)strlcpy(c->termpath, image, sizeof(c->termpath)); else if (strcmp(label, "lock") == 0) -- cgit 1.4.1