Prior to this commit, remote (or other text-based) users would have
seen this error message at (or near) the start of the output:
"Error: unable to open display "
If the host doesn't have xbaseXX.tgz, users would have seen this:
"glxinfo: command not found"
According to vmstat.c [0], when vmstat(8) is run with no arguments,
the third line starts with the following printf(3) format, where the
number that comes from the %6u specification is what we're after:
" %u %u %u %6u" [...]
cut(1) with -d ' ' doesn't ignore empty fields, so this output...
" 1 0 0 123456" [...]
...is handled correctly...
"<> <1> <0> <0> <123456>" [...]
...but this output...
" 1 0 0 93328" [...]
...is not...
"<> <1> <0> <0> <> <93328>" [...]
This results in an error:
./screenfetch-dev: line 1357: / 1024: syntax error:
>>>>>>> operand expected (error token is "/ 1024")
The issue is fixed by replacing cut(1) with awk(1).
[0] src/usr.bin/vmstat/vmstat.c, revision 1.139, lines 361 through 367
uname may be used to reliably detect most *BSD OSes (namely FreeBSD,
NetBSD, OpenBSD, DragonFly), so use it. Otherwise it falls back to
/var/run/dmesg.boot, which is not always available (e.g. jails) and
is not as reliable anyway.
If number of lines in logo is less than the number of stats to display, display all of the stats instead of truncating the list and leaving of the last few stats
Updated all logos so every line in each logo is the same length, each line starts with ${c1} or ${c2} etc. , each line ends with %s, ${c1} in the middle of lines are not quoted, always use ${c1} instead of $c1, each logo now has if [ -n "${my_lcolor}" ] statement, also removed any redundant ${c1} inside logos.
TL;DR; all the logos look exactly the same but they all follow the same style now.