OpenBSD is a pretty strange OS

This commit is contained in:
Tudor 2016-02-23 11:24:38 +02:00
parent 845a76504b
commit cfa2df540c
1 changed files with 11 additions and 9 deletions

6
fetch
View File

@ -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")