summary refs log tree commit diff
path: root/group.c
diff options
context:
space:
mode:
authorokan <okan>2019-03-01 14:32:01 +0000
committerokan <okan>2019-03-01 14:32:01 +0000
commit9d252184582d96dd916bc97675d6a35a18921140 (patch)
tree4fd49cdda69bfc79ad66c3d305b2a001e74b0efb /group.c
parentae231f67d0ac54fb6281831c10972cc2f1f37acf (diff)
downloadcwm-9d252184582d96dd916bc97675d6a35a18921140.tar.gz
cwm-9d252184582d96dd916bc97675d6a35a18921140.tar.xz
cwm-9d252184582d96dd916bc97675d6a35a18921140.zip
Tie group number and name together during config.
Diffstat (limited to 'group.c')
-rw-r--r--group.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/group.c b/group.c
index 0dc54ff..eee916f 100644
--- a/group.c
+++ b/group.c
@@ -37,11 +37,6 @@ static struct group_ctx	*group_prev(struct group_ctx *);
 static void		 group_restack(struct group_ctx *);
 static void		 group_setactive(struct group_ctx *);
 
-const char *num_to_name[] = {
-	"nogroup", "one", "two", "three", "four", "five", "six",
-	"seven", "eight", "nine"
-};
-
 void
 group_assign(struct group_ctx *gc, struct client_ctx *cc)
 {
@@ -124,13 +119,13 @@ group_restack(struct group_ctx *gc)
 }
 
 void
-group_init(struct screen_ctx *sc, int num)
+group_init(struct screen_ctx *sc, int num, const char *name)
 {
 	struct group_ctx	*gc;
 
 	gc = xmalloc(sizeof(*gc));
 	gc->sc = sc;
-	gc->name = xstrdup(num_to_name[num]);
+	gc->name = xstrdup(name);
 	gc->num = num;
 	TAILQ_INIT(&gc->clientq);