diff options
author | Shawn <sabetts@juicebox> | 2008-06-20 13:57:18 -0700 |
---|---|---|
committer | Shawn <sabetts@juicebox> | 2008-06-20 13:57:18 -0700 |
commit | ea17008472c85c2c931336774335261b8394a691 (patch) | |
tree | 2e5b49021f28cee7ec28935ab65b52a1badb1403 | |
parent | 5df9409554d64c73736fb044d8baead78c9c938e (diff) | |
download | ratpoison-ea17008472c85c2c931336774335261b8394a691.zip |
add a maxsize formatter character to format_string
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | doc/ratpoison.texi | 2 | ||||
-rw-r--r-- | src/format.c | 9 |
3 files changed, 14 insertions, 0 deletions
@@ -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"); +} |