summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShawn <sabetts@juicebox>2008-06-20 13:57:18 -0700
committerShawn <sabetts@juicebox>2008-06-20 13:57:18 -0700
commitea17008472c85c2c931336774335261b8394a691 (patch)
tree2e5b49021f28cee7ec28935ab65b52a1badb1403 /src
parent5df9409554d64c73736fb044d8baead78c9c938e (diff)
downloadratpoison-ea17008472c85c2c931336774335261b8394a691.zip
add a maxsize formatter character to format_string
Diffstat (limited to 'src')
-rw-r--r--src/format.c9
1 files changed, 9 insertions, 0 deletions
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");
+}