about summary refs log tree commit diff
path: root/conf.c
diff options
context:
space:
mode:
authorokan <okan>2013-04-30 21:12:20 +0000
committerokan <okan>2013-04-30 21:12:20 +0000
commit843f18aaee1550344b8521d95d952502e064c5f0 (patch)
treed5e021ff49f98521e97d996c12a4eda98e797492 /conf.c
parent6f185bb03c3ba0928ba6254485c710103379bd1a (diff)
parent5ab3b373d39c333de5774a9503c450fc9fccd814 (diff)
downloadcwm-843f18aaee1550344b8521d95d952502e064c5f0.tar.gz
cwm-843f18aaee1550344b8521d95d952502e064c5f0.tar.xz
cwm-843f18aaee1550344b8521d95d952502e064c5f0.zip
cvsimport
Diffstat (limited to 'conf.c')
-rw-r--r--conf.c34
1 files changed, 33 insertions, 1 deletions
diff --git a/conf.c b/conf.c
index 342fd6a..705c9e0 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)
@@ -53,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)
 {
 	sc->gap = c->gap;