mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Add window_activity format, from Thomas Adam based on a diff originally
from propos6 at gmail dot com.
This commit is contained in:
5
format.c
5
format.c
@ -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);
|
||||
|
Reference in New Issue
Block a user