aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornicm <nicm>2019-03-14 21:41:30 +0000
committernicm <nicm>2019-03-14 21:41:30 +0000
commit4206bcc10ef936a34eabb32f94a58a6cdd4ec907 (patch)
treebfca0c96be8bcf383de2ce47d372a803bc4c7527
parent38064e759342b38fbeea48ea716b7d29679271b1 (diff)
downloadrtmux-4206bcc10ef936a34eabb32f94a58a6cdd4ec907.tar.gz
rtmux-4206bcc10ef936a34eabb32f94a58a6cdd4ec907.tar.bz2
rtmux-4206bcc10ef936a34eabb32f94a58a6cdd4ec907.zip
Add format flags for start and end window.
-rw-r--r--format.c5
-rw-r--r--tmux.12
2 files changed, 7 insertions, 0 deletions
diff --git a/format.c b/format.c
index 530e2403..17e54996 100644
--- a/format.c
+++ b/format.c
@@ -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/tmux.1 b/tmux.1
index 12da91ec..91c60f8e 100644
--- a/tmux.1
+++ b/tmux.1
@@ -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"