diff options
author | nicm <nicm> | 2015-06-15 10:58:01 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-06-15 10:58:01 +0000 |
commit | d96ab3401960ab4a7c9434dfda1ebdc5204873e0 (patch) | |
tree | ee534bc80a5dcb78c94945cda02823f934203c27 /format.c | |
parent | 29c29e771767b037f2929b889bb0de2b0b6ee138 (diff) |
Add window_activity format, from Thomas Adam based on a diff originally
from propos6 at gmail dot com.
Diffstat (limited to 'format.c')
-rw-r--r-- | format.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -749,6 +749,7 @@ void format_defaults_window(struct format_tree *ft, struct window *w) { char *layout; + time_t t; ft->w = w; @@ -757,6 +758,10 @@ format_defaults_window(struct format_tree *ft, struct window *w) else layout = layout_dump(w->layout_root); + t = w->activity_time.tv_sec; + format_add(ft, "window_activity", "%lld", (long long) t); + format_add(ft, "window_activity_string", "%s", format_time_string(t)); + format_add(ft, "window_id", "@%u", w->id); format_add(ft, "window_name", "%s", w->name); format_add(ft, "window_width", "%u", w->sx); |