about summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authorokan <okan>2013-04-17 13:30:38 +0000
committerokan <okan>2013-04-17 13:30:38 +0000
commita899d267fe78dbbb923c8626528973f8e6b65bae (patch)
treec9c175c57a3b85240576fcdb08e3e00bc6c9d75e /conf.c
parent16ed8bf8e4f561049b732b326f3d0ee475fe13f6 (diff)
downloadcwm-a899d267fe78dbbb923c8626528973f8e6b65bae.tar.gz
cwm-a899d267fe78dbbb923c8626528973f8e6b65bae.tar.xz
cwm-a899d267fe78dbbb923c8626528973f8e6b65bae.zip
add conf_ignore and move group_make_autogroup to conf_autogroup to match.
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/conf.c b/conf.c
index 67f58a6..7303768 100644
--- a/conf.c
+++ b/conf.c
@@ -53,6 +53,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)
 {
 	sc->gap = c->gap;