From ffd5b79a7806302429e4ccb8ca24981f5edd258a Mon Sep 17 00:00:00 2001
From: Neal Fultz <nfultz@gmail.com>
Date: Tue, 2 May 2017 23:35:27 -0700
Subject: [PATCH 1/1] Adding status escape for window group

---
 src/winmsg.c | 13 +++++++++++++
 src/winmsg.h |  1 +
 2 files changed, 14 insertions(+)

diff --git a/src/winmsg.c b/src/winmsg.c
index 8cc7c32..0d18b01 100644
--- a/src/winmsg.c
+++ b/src/winmsg.c
@@ -444,6 +444,16 @@ winmsg_esc_ex(WinTitle, Window *win)
 		wmc_set(cond);
 }
 
+winmsg_esc_ex(WinGroup, Window *win)
+{
+	if (!win || !win->w_group)
+		return;
+
+	if (*wmbc_strcpy(wmbc, win->w_group->w_title))
+		wmc_set(cond);
+
+}
+
 winmsg_esc_ex(Cond, int *condrend)
 {
 	if (wmc_is_active(cond)) {
@@ -599,6 +609,9 @@ char *MakeWinMsgEv(WinMsgBuf *winmsg, char *str, Window *win,
 		case WINESC_WIN_TITLE:
 			WinMsgDoEscEx(WinTitle, win);
 			break;
+		case WINESC_WIN_GROUP:
+			WinMsgDoEscEx(WinGroup, win);
+			break;
 		case WINESC_REND_START:
 			WinMsgDoEsc(Rend);
 			break;
diff --git a/src/winmsg.h b/src/winmsg.h
index 2910b10..f29c99e 100644
--- a/src/winmsg.h
+++ b/src/winmsg.h
@@ -58,6 +58,7 @@ typedef enum {
 	WINESC_WIN_SIZE        = 's',
 	WINESC_SESS_NAME       = 'S',
 	WINESC_WIN_TITLE       = 't',
+	WINESC_WIN_GROUP       = 'g',
 	WINESC_WIN_NAMES       = 'w',
 	WINESC_WIN_NAMES_NOCUR = 'W',
 	WINESC_CMD_ARGS        = 'x',
-- 
2.7.4

