add `EWW_BATTERY` support in (free|open|net)bsd
Description
This should add battery info support for 3/4 of the *BSDs supported as rust compile targets. I have only tested on FreeBSD, but based on the man pages of the others it should work there as well.
Usage
unchanged
Showcase
$ target/release/eww get EWW_BATTERY
{"BAT0": { "status": "high", "capacity": 61 }, "total_avg": 61}
$ uname -o
FreeBSD
Additional Notes
I was not able to add support for dragonflyBSD, as it's version of the apm command is aliased to acpiconf -i 0, which has different output and only lists the first battery. The htop source code seems to implement this for dragonfly using something to the effect of sysctl -n hw.acpi.battery.life, but I could not find documentation for that sysctl variable anywhere, and don't have a dragonfly install to test on.
Checklist
Please make sure you can check all the boxes that apply to this PR.
- [x] I added my changes to CHANGELOG.md, if appropriate.
- [X] I used
cargo fmtto automatically format all code before committing
Could you rebase this onto latest master? I would do it, and according to github I should be able to, but it seems as though currently I can't push to your branch ^^' Looking good though, thanks!
done!