diff options
author | 2019-03-14 21:41:30 +0000 | |
---|---|---|
committer | 2019-03-14 21:41:30 +0000 | |
commit | 209b6808fd8c9b29e64587b72fca5f993082307b (patch) | |
tree | 7c5aa141447162c30c53b0aa64e67e4097d705b5 | |
parent | Add T format modifier like E but also do strftime(3). (diff) | |
download | wireguard-openbsd-209b6808fd8c9b29e64587b72fca5f993082307b.tar.xz wireguard-openbsd-209b6808fd8c9b29e64587b72fca5f993082307b.zip |
Add format flags for start and end window.
-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" |