summaryrefslogtreecommitdiff
path: root/src/list.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2001-10-10 05:35:00 +0000
committersabetts <sabetts>2001-10-10 05:35:00 +0000
commitb538ebeacf38e1605c7ad551ba4d54e140f27916 (patch)
treefaa3af74f318dbebce01d1d0e9136394ed10acc3 /src/list.c
parenta05ec662cb1e2dfd116e5b5b6d5d538b809d4f26 (diff)
downloadratpoison-b538ebeacf38e1605c7ad551ba4d54e140f27916.zip
(format_window_name): add formatting option '%l' to
grab the last_access field from the window.
Diffstat (limited to 'src/list.c')
-rw-r--r--src/list.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/list.c b/src/list.c
index 24ffd98..f8666ad 100644
--- a/src/list.c
+++ b/src/list.c
@@ -629,6 +629,7 @@ print_window_information (rp_window *win)
%a - application name
%c - resource class
%i - X11 Window ID
+ %l - last access number
*/
static void
@@ -681,6 +682,11 @@ format_window_name (char *fmt, rp_window *win, rp_window *other_win,
sbuf_concat (buffer, dbuf);
break;
+ case 'l':
+ snprintf (dbuf, 9, "%d", win->last_access);
+ sbuf_concat (buffer, dbuf);
+ break;
+
case '%':
dbuf[0] = '%';
dbuf[1] = 0;