Fix bugs with OpenBSD
This commit is contained in:
2
neofetch
2
neofetch
@@ -1486,6 +1486,7 @@ getdisk () {
|
|||||||
*"BSD")
|
*"BSD")
|
||||||
case "$distro" in
|
case "$distro" in
|
||||||
"FreeBSD"*) df_flags="-h -c -l" ;;
|
"FreeBSD"*) df_flags="-h -c -l" ;;
|
||||||
|
*) return ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
@@ -1589,6 +1590,7 @@ getbattery () {
|
|||||||
battery0now=$(sysctl -n hw.sensors.acpibat0.watthour3)
|
battery0now=$(sysctl -n hw.sensors.acpibat0.watthour3)
|
||||||
battery0now="${battery0now/ Wh*}"
|
battery0now="${battery0now/ Wh*}"
|
||||||
|
|
||||||
|
[ ! -z "$battery0full" ] && \
|
||||||
battery="$(printf "%s\n" "100 * $battery0now / $battery0full" | bc)%"
|
battery="$(printf "%s\n" "100 * $battery0now / $battery0full" | bc)%"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user