Add format flags for start and end window.

pull/1644/head
nicm 2019-03-14 21:41:30 +00:00
parent 38064e7593
commit 4206bcc10e
2 changed files with 7 additions and 0 deletions

View File

@ -1797,6 +1797,11 @@ format_defaults_winlink(struct format_tree *ft, struct winlink *wl)
format_add(ft, "window_flags", "%s", window_printable_flags(wl));
format_add(ft, "window_active", "%d", wl == s->curw);
format_add(ft, "window_start_flag", "%d",
!!(wl == RB_MIN(winlinks, &s->windows)));
format_add(ft, "window_end_flag", "%d",
!!(wl == RB_MAX(winlinks, &s->windows)));
format_add(ft, "window_bell_flag", "%d",
!!(wl->flags & WINLINK_BELL));
format_add(ft, "window_activity_flag", "%d",

2
tmux.1
View File

@ -3875,6 +3875,7 @@ The following variables are available, where appropriate:
.It Li "window_activity_flag" Ta "" Ta "1 if window has activity"
.It Li "window_active" Ta "" Ta "1 if window active"
.It Li "window_bell_flag" Ta "" Ta "1 if window has bell"
.It Li "window_end_flag" Ta "" Ta "1 if window has the highest index"
.It Li "window_flags" Ta "#F" Ta "Window flags"
.It Li "window_format" Ta "" Ta "1 if format is for a window (not assuming the current)"
.It Li "window_height" Ta "" Ta "Height of window"
@ -3887,6 +3888,7 @@ The following variables are available, where appropriate:
.It Li "window_panes" Ta "" Ta "Number of panes in window"
.It Li "window_silence_flag" Ta "" Ta "1 if window has silence alert"
.It Li "window_stack_index" Ta "" Ta "Index in session most recent stack"
.It Li "window_start_flag" Ta "" Ta "1 if window has the lowest index"
.It Li "window_visible_layout" Ta "" Ta "Window layout description, respecting zoomed window panes"
.It Li "window_width" Ta "" Ta "Width of window"
.It Li "window_zoomed_flag" Ta "" Ta "1 if window is zoomed"