fixed battery_status to show only charging status + added battery_status to FreeBSD
This commit is contained in:
parent
85a0e2cc80
commit
5bcaa342a8
1 changed files with 12 additions and 3 deletions
11
neofetch
11
neofetch
|
@ -1579,8 +1579,11 @@ getbattery () {
|
|||
done
|
||||
return
|
||||
fi
|
||||
|
||||
if [ $power_status = "Charging" ]; then
|
||||
battery="${batteries[0]}% ${power_status}"
|
||||
else
|
||||
battery="${batteries[0]}%"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
battery="None"
|
||||
|
@ -1590,7 +1593,13 @@ getbattery () {
|
|||
"BSD")
|
||||
case "$distro" in
|
||||
"FreeBSD"*)
|
||||
power_status=$(acpiconf -i 0 | awk -F ':\t\t\t' '/State/ {print $2}')
|
||||
|
||||
if [ $power_status = "charging" ]; then
|
||||
battery="$(acpiconf -i 0 | awk -F ':\t' '/Remaining capacity/ {print $2}') $power_status"
|
||||
else
|
||||
battery=$(acpiconf -i 0 | awk -F ':\t' '/Remaining capacity/ {print $2}')
|
||||
fi
|
||||
;;
|
||||
|
||||
"NetBSD"*)
|
||||
|
|
Loading…
Reference in a new issue