OpenBSD is a pretty strange OS
This commit is contained in:
6
fetch
6
fetch
@@ -1397,11 +1397,14 @@ getbattery () {
|
||||
fi
|
||||
;;
|
||||
|
||||
*"BSD")
|
||||
"BSD")
|
||||
case "$distro" in
|
||||
"FreeBSD"*)
|
||||
battery=$(acpiconf -i 0 | awk -F ':\t' '/Remaining capacity/ {print $2}')
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"OpenBSD")
|
||||
battery0full=$(sysctl -n hw.sensors.acpibat0.watthour0)
|
||||
battery0full=${battery0full/ Wh*}
|
||||
@@ -1410,7 +1413,6 @@ getbattery () {
|
||||
battery0now="${battery0now/ Wh*}"
|
||||
|
||||
battery="$(( 100 * $battery0now / $battery0full ))%"
|
||||
esac
|
||||
;;
|
||||
|
||||
"Mac OS X")
|
||||
|
||||
Reference in New Issue
Block a user