From 230d0fbc9e273a171e811f58b540163fe871df5e Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Sun, 29 Jan 2012 09:37:02 +0000 Subject: Add an option to move the status line to the top of the screen, requested by many. --- status.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'status.c') diff --git a/status.c b/status.c index ae05853f..fee9f2d6 100644 --- a/status.c +++ b/status.c @@ -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