Searching man systemd(1) for "is-system-running" we see these states:
initializing
starting
running
degraded
maintenance
stopping
offline
unknown
Let's differentiate some more: green (ok) if state is "running", red (error)
if the state is unknown to htop or "degraded", yellow (warning) for
everything else (incl. "initializing", "starting", "maintenance" &
"stopping").
Before this change, the systemd meter was broken on distros like NixOS,
which have systemctl in PATH, but not at /bin/systemctl. After the
change, it works on all my NixOS machines.
`RichString_appendnAscii()` avoids a `strlen(3)` call over
` RichString_appendAscii()`.
Use the former where the length is available from a previous checked
`snprintf(3)` call.
Keep `RichString_appendAscii()` when passing a string literal and
rely on compilers to optimize the `strlen(3)` call away.
RichString_writeFrom takes a top spot during performance analysis due to the
calls to mbstowcs() and iswprint().
Most of the time we know in advance that we are only going to print regular
ASCII characters.