summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2014-09-08 14:29:06 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2014-09-08 14:29:06 +0000
commit61c1a96f801d8483312f0db6653dcc0cc4ca7734 (patch)
tree3b51e8507e8d9658bbbd7ab2a32cd12e1987ab97 /usr.bin
parent5c0fe9aaa0bd34548652e77ce55f97c1a6d54171 (diff)
Add window_last_flag and window_zoomed_flag. From John Morrissey.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/tmux/format.c7
-rw-r--r--usr.bin/tmux/tmux.16
2 files changed, 9 insertions, 4 deletions
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index 3b1c12c131d..7a23f7403c6 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.48 2014/08/09 07:33:37 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.49 2014/09/08 14:29:05 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -494,7 +494,10 @@ format_winlink(struct format_tree *ft, struct session *s, struct winlink *wl)
!!(wl->flags & WINLINK_ACTIVITY));
format_add(ft, "window_silence_flag", "%u",
!!(wl->flags & WINLINK_SILENCE));
-
+ format_add(ft, "window_last_flag", "%u",
+ !!(wl == TAILQ_FIRST(&s->lastw)));
+ format_add(ft, "window_zoomed_flag", "%u",
+ !!(wl->flags & WINDOW_ZOOMED));
free(flags);
}
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index 120f9893a88..e453ae54aed 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.399 2014/09/01 22:00:42 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.400 2014/09/08 14:29:05 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: September 1 2014 $
+.Dd $Mdocdate: September 8 2014 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -3132,11 +3132,13 @@ The following variables are available, where appropriate:
.It Li "window_height" Ta "" Ta "Height of window"
.It Li "window_id" Ta "" Ta "Unique window ID"
.It Li "window_index" Ta "#I" Ta "Index of window"
+.It Li "window_last_flag" Ta "" Ta "1 if window is the last used"
.It Li "window_layout" Ta "" Ta "Window layout description"
.It Li "window_name" Ta "#W" Ta "Name of window"
.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_width" Ta "" Ta "Width of window"
+.It Li "window_zoomed_flag" Ta "" Ta "1 if window is zoomed"
.It Li "wrap_flag" Ta "" Ta "Pane wrap flag"
.El
.Sh NAMES AND TITLES