Fix bugs with OpenBSD
This commit is contained in:
parent
19b3c22b37
commit
0805fb5e3a
1 changed files with 3 additions and 1 deletions
4
neofetch
4
neofetch
|
@ -1486,6 +1486,7 @@ getdisk () {
|
|||
*"BSD")
|
||||
case "$distro" in
|
||||
"FreeBSD"*) df_flags="-h -c -l" ;;
|
||||
*) return ;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
@ -1589,7 +1590,8 @@ getbattery () {
|
|||
battery0now=$(sysctl -n hw.sensors.acpibat0.watthour3)
|
||||
battery0now="${battery0now/ Wh*}"
|
||||
|
||||
battery="$(printf "%s\n" "100 * $battery0now / $battery0full" | bc)%"
|
||||
[ ! -z "$battery0full" ] && \
|
||||
battery="$(printf "%s\n" "100 * $battery0now / $battery0full" | bc)%"
|
||||
;;
|
||||
|
||||
"Mac OS X")
|
||||
|
|
Loading…
Reference in a new issue