Add a vertical (side) status line, GitHub issue 5468 from John DeWyze.

This commit is contained in:
nicm
2026-10-16 07:59:06 +00:00
committed by Nicholas Marriott
parent 647e15b038
commit a7e8801089
20 changed files with 1258 additions and 264 deletions

View File

@@ -1,4 +1,4 @@
/* $OpenBSD: resize.c,v 1.61 2026/10/15 22:28:41 nicm Exp $ */
/* $OpenBSD: resize.c,v 1.62 2026/10/16 07:59:06 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -196,7 +196,7 @@ clients_calculate_size(int type, int current, struct client *c,
if (w == NULL ||
!control_get_window_size(loop, w->id, &cx, &cy) ||
cx == 0 || cy == 0) {
cx = loop->tty.sx;
cx = loop->tty.sx - status_side_size(loop);
cy = loop->tty.sy - status_line_size(loop);
}
@@ -301,7 +301,7 @@ default_window_size(struct client *c, struct session *s, struct window *w,
* client and no window, use the default size as for manual type.
*/
if (type == WINDOW_SIZE_LATEST && c != NULL && !ignore_client_size(c)) {
*sx = c->tty.sx;
*sx = c->tty.sx - status_side_size(c);
*sy = c->tty.sy - status_line_size(c);
*xpixel = c->tty.xpixel;
*ypixel = c->tty.ypixel;
@@ -478,6 +478,10 @@ recalculate_sizes_now(int now)
c->flags |= CLIENT_STATUSOFF;
else
c->flags &= ~CLIENT_STATUSOFF;
if (s->sidestatusat != -1 && c->tty.sx <= s->sidestatuswidth)
c->flags |= CLIENT_SIDESTATUSOFF;
else
c->flags &= ~CLIENT_SIDESTATUSOFF;
}
/* Walk each window and adjust the size. */