Hide resolution by default on headless systems

This commit is contained in:
LukeHuckman 2021-04-16 16:32:00 +08:00
parent 422224d927
commit 5a511a1f9e

View file

@ -245,6 +245,7 @@ void print_info()
printf("\033[18C%s%sWAM %s%i MB/%i MB\n", printf("\033[18C%s%sWAM %s%i MB/%i MB\n",
NORMAL, BOLD, NORMAL, (ram_used), ram_total); NORMAL, BOLD, NORMAL, (ram_used), ram_total);
if (show_resolution) if (show_resolution)
if (screen_width != 0 || screen_height != 0)
printf("\033[18C%s%sRESOLUTION%s %dx%d\n", printf("\033[18C%s%sRESOLUTION%s %dx%d\n",
NORMAL, BOLD, NORMAL, screen_width, screen_height); NORMAL, BOLD, NORMAL, screen_width, screen_height);
if (show_shell) if (show_shell)
@ -254,7 +255,7 @@ void print_info()
printf("\033[18C%s%sPKGS %s%s%d %s\n", printf("\033[18C%s%sPKGS %s%s%d %s\n",
NORMAL, BOLD, NORMAL, NORMAL, pkgs, pkgman_name); NORMAL, BOLD, NORMAL, NORMAL, pkgs, pkgman_name);
if (show_uptime) if (show_uptime)
if(sys.uptime/3600 < 24) if (sys.uptime/3600 < 24)
printf("\033[18C%s%sUWUPTIME %s%lih, %lim\n", printf("\033[18C%s%sUWUPTIME %s%lih, %lim\n",
NORMAL, BOLD, NORMAL, sys.uptime/3600, sys.uptime/60%60); NORMAL, BOLD, NORMAL, sys.uptime/3600, sys.uptime/60%60);
else else