From 4a96d6dfb62a58267d3ce34851e37e97aa3338ca Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 29 Jan 2012 09:37:03 +0000 Subject: Add an option to move the status line to the top of the screen, requested by many. --- usr.bin/tmux/status.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'usr.bin/tmux/status.c') diff --git a/usr.bin/tmux/status.c b/usr.bin/tmux/status.c index 8c5355edd40..22b6686499c 100644 --- a/usr.bin/tmux/status.c +++ b/usr.bin/tmux/status.c @@ -1,4 +1,4 @@ -/* $OpenBSD: status.c,v 1.86 2012/01/26 09:05:54 nicm Exp $ */ +/* $OpenBSD: status.c,v 1.87 2012/01/29 09:37:02 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott @@ -60,6 +60,20 @@ status_out_cmp(struct status_out *so1, struct status_out *so2) return (strcmp(so1->cmd, so2->cmd)); } +/* Get screen line of status line. -1 means off. */ +int +status_at_line(struct client *c) +{ + struct session *s = c->session; + + if (!options_get_number(&s->options, "status")) + return (-1); + + if (options_get_number(&s->options, "status-position") == 0) + return (0); + return (c->tty.sy - 1); +} + /* Retrieve options for left string. */ char * status_redraw_get_left(struct client *c, -- cgit v1.2.3