diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-03-14 21:41:31 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2019-03-14 21:41:31 +0000 |
commit | ce8af9e41e9fb51fc6306fa9be2dff716cf566de (patch) | |
tree | 769cdeb2bdffbc7ee7877b200ea435ecc7879fe8 /usr.bin | |
parent | 9c3dc4cb4c4b5ab09503f1b71fa829a415daa492 (diff) |
Add format flags for start and end window.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/format.c | 7 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.1 | 4 |
2 files changed, 9 insertions, 2 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c index 575bf30c6e9..aa483c25e8c 100644 --- a/usr.bin/tmux/format.c +++ b/usr.bin/tmux/format.c @@ -1,4 +1,4 @@ -/* $OpenBSD: format.c,v 1.175 2019/03/14 21:31:43 nicm Exp $ */ +/* $OpenBSD: format.c,v 1.176 2019/03/14 21:41:30 nicm Exp $ */ /* * Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com> @@ -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", diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1 index 29856e1073d..27725cd7b3e 100644 --- a/usr.bin/tmux/tmux.1 +++ b/usr.bin/tmux/tmux.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: tmux.1,v 1.620 2019/03/14 21:31:43 nicm Exp $ +.\" $OpenBSD: tmux.1,v 1.621 2019/03/14 21:41:30 nicm Exp $ .\" .\" Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com> .\" @@ -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" |