added power status for single battery
This commit is contained in:
parent
acd725712b
commit
85a0e2cc80
1 changed files with 4 additions and 3 deletions
5
neofetch
5
neofetch
|
@ -1551,7 +1551,8 @@ getbattery () {
|
|||
|
||||
# Create an array of battery usage from each battery.
|
||||
batteries=($(cat /sys/class/power_supply/BAT${battery_num}/capacity))
|
||||
|
||||
# Get the power status
|
||||
power_status=($(cat /sys/class/power_supply/BAT${battery_num}/status))
|
||||
# Get the subtitle and reassign it so it doesn't change.
|
||||
title="$subtitle"
|
||||
|
||||
|
@ -1579,7 +1580,7 @@ getbattery () {
|
|||
return
|
||||
fi
|
||||
|
||||
battery="${batteries[0]}%"
|
||||
battery="${batteries[0]}% ${power_status}"
|
||||
fi
|
||||
else
|
||||
battery="None"
|
||||
|
|
Loading…
Reference in a new issue