On some systems, a battery's charging regulator may not charge a battery
even though it is not full. This might be the case because it was
configured to stop charging at a capacity threshold, or e.g. because
environmental conditions do not allow for charging the battery.
This commit adds this status (called 'idle') and adds support for
detecting the status on Linux.
New matrix for 5 jobs in total.
Updates our checks to bionic & xenial. Trusty could also be
included but it is a bit outdated at this point.
I use bionic to pull a more recent clang-format and use a dedicated job
just to check formatting. An alternative would be to conditionally run
the formatting script only on bionic.
I don't think that there is a better way to expand a `dist` x `compiler`
matrix (except using docker).
Previously the format placeholders were auto-converted to the maximum possible
unit, e.g. /proc/meminfo reports MemTotal of 16307104kB which will get
converted to 15.6GiB. It is now possible to specifiy the target unit, e.g. Mi,
which will be used for the conversion - in the example it would lead to
15924.9MiB.
The resulting number can now be further formatted via the decimal option. It
allows to specify the number of decimals to use, e.g. 15.6GiB vs. 15GiB or
15924.9MiB vs. 15925MiB.
For my thoughts about optional dependencies, see
https://michael.stapelberg.ch/posts/2019-05-23-optional-dependencies/
This commit follows the best practices outlined in that article:
1. The travis config was modified to verify both code paths build and link/don’t
link against pulseaudio.
2. If pulseaudio is missing, the build fails until packagers explicitly pass a
--disable flag. In practice, I think the only situation when this flag should
be set is in source-based linux distributions where users can express
package-level compilation preferences (e.g. Gentoo USE flags).
3. The --version output now reflects the status of the optional dependency.
fixes#359
Added a function to print file contents to status bar without newlines.
Added tests for print file contents function
Added manpage entry for file contents
This change addresses the issue #199 asking for multiple CPU support. It
takes an arbitrary CPU number and outputs its usage using the same
arithmetics as for CPU aggregation. It currently doesn't support
FreeBSD.