From 356f5e66fa5a8945aa2a36a5b92dc79610a48d81 Mon Sep 17 00:00:00 2001 From: nick black Date: Wed, 17 Jun 2020 20:01:37 -0400 Subject: [PATCH] ncneofetch: place info plane at bottom center --- src/fetch/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/fetch/main.c b/src/fetch/main.c index 96d381df8..cdcb94fe0 100644 --- a/src/fetch/main.c +++ b/src/fetch/main.c @@ -132,7 +132,12 @@ freebsd_ncneofetch(void){ static int infoplane(struct notcurses* nc){ - struct ncplane* infop = ncplane_new(nc, 8, 60, 0, 0, NULL); + const int dimy = ncplane_dim_y(notcurses_stdplane(nc)); + const int planeheight = 8; + struct ncplane* infop = ncplane_aligned(notcurses_stdplane(nc), + planeheight, 60, + dimy - (planeheight + 1), + NCALIGN_CENTER, NULL); if(infop == NULL){ return -1; } @@ -176,7 +181,8 @@ int main(void){ fprintf(stderr, "Warning: couldn't set locale based off LANG\n"); } struct notcurses_options nopts = { - .flags = NCOPTION_INHIBIT_SETLOCALE | NCOPTION_NO_ALTERNATE_SCREEN, + .flags = NCOPTION_INHIBIT_SETLOCALE | NCOPTION_NO_ALTERNATE_SCREEN | + NCOPTION_SUPPRESS_BANNERS, }; struct notcurses* nc = notcurses_init(&nopts, NULL); if(nc == NULL){