From 579afe49d863e8a91655b6ab8a2c42a380c7129e 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 | 35 ++++++++++++++++++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) (limited to 'conf.c') diff --git a/conf.c b/conf.c index 24d7623..ece45e5 100644 --- a/conf.c +++ b/conf.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: conf.c,v 1.121 2013/01/08 15:16:05 okan Exp $ + * $OpenBSD: conf.c,v 1.122 2013/04/17 13:30:38 okan Exp $ */ #include @@ -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 v1.2.3-2-gb3c3