ncneofetch: place info plane at bottom center

pull/730/head
nick black 4 years ago
parent 7ca5a7e82c
commit 356f5e66fa
No known key found for this signature in database
GPG Key ID: 5F43400C21CBFACC

@ -132,7 +132,12 @@ freebsd_ncneofetch(void){
static int static int
infoplane(struct notcurses* nc){ 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){ if(infop == NULL){
return -1; return -1;
} }
@ -176,7 +181,8 @@ int main(void){
fprintf(stderr, "Warning: couldn't set locale based off LANG\n"); fprintf(stderr, "Warning: couldn't set locale based off LANG\n");
} }
struct notcurses_options nopts = { 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); struct notcurses* nc = notcurses_init(&nopts, NULL);
if(nc == NULL){ if(nc == NULL){

Loading…
Cancel
Save