]> git.sur5r.net Git - i3/i3status/commit
Properly detect the battery charging status under FreeBSD. 70/head
authorJohn Baldwin <jhb@FreeBSD.org>
Thu, 8 Oct 2015 20:15:38 +0000 (13:15 -0700)
committerJohn Baldwin <jhb@FreeBSD.org>
Thu, 8 Oct 2015 20:15:38 +0000 (13:15 -0700)
commit5e33d9fe748efc8df49c123fe01d486b04c20f57
tree7c2522eb3ac8a690a47b8b97fdedcc26b66ce70a
parent974f95702efbf1ae15882777d191c7fde99bfb9b
Properly detect the battery charging status under FreeBSD.

The hw.acpi.battery.state sysctl returns a bitmask of flags as
defined in <dev/acpica/acpiio.h>.  Use constants from this header
to examine the state and check for the charging flag to determine
if the battery is charging.
src/print_battery_info.c