summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--NEWS3
-rw-r--r--doc/ratpoison.texi2
-rw-r--r--src/format.c9
3 files changed, 14 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 69cd7e7..bec1efe 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,9 @@ are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.
* Changes since 1.4.3
+** new format character %M
+This expands to Maxsize if the window is a maxsize window, nothing if not.
+
** ratpoison can use xft
If xft is found on your system ratpoison will use it unless explicitely told not to using --without-xft
diff --git a/doc/ratpoison.texi b/doc/ratpoison.texi
index 3a42419..a275c18 100644
--- a/doc/ratpoison.texi
+++ b/doc/ratpoison.texi
@@ -394,6 +394,8 @@ The window's screen
Window Name
@item %T
Whether the window is a transient or not.
+@item %M
+Whether the window is a maxsize window or not.
@item %w
The window's width
@item %W
diff --git a/src/format.c b/src/format.c
index a70d6fc..a5bbd64 100644
--- a/src/format.c
+++ b/src/format.c
@@ -43,6 +43,7 @@ RP_FMT(gravity);
RP_FMT(screen);
RP_FMT(xinescreen);
RP_FMT(transient);
+RP_FMT(maxsize);
struct fmt_item {
/* The format character */
@@ -66,6 +67,7 @@ struct fmt_item fmt_items[] = {
{ 'S', fmt_screen },
{ 't', fmt_name },
{ 'T', fmt_transient },
+ { 'M', fmt_maxsize },
{ 'w', fmt_width },
{ 'W', fmt_incwidth },
{ 'x', fmt_xinescreen },
@@ -289,3 +291,10 @@ fmt_transient (rp_window_elem *elem, struct sbuf *buf)
if (elem->win->transient)
sbuf_concat (buf, "Transient");
}
+
+static void
+fmt_maxsize (rp_window_elem *elem, struct sbuf *buf)
+{
+ if (elem->win->hints->flags & PMaxSize)
+ sbuf_concat (buf, "Maxsize");
+}