Add window_activity format, from Thomas Adam based on a diff originally

from propos6 at gmail dot com.
This commit is contained in:
nicm
2015-06-15 10:58:01 +00:00
parent 29c29e7717
commit d96ab34019
5 changed files with 15 additions and 0 deletions

View File

@ -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);