mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-25 13:30:07 +00:00
show battery as CHARGED on macos if it is at 100% and connected to power supply
This commit is contained in:
parent
daedc56b3d
commit
fd96e92df6
1 changed files with 6 additions and 1 deletions
|
@ -922,7 +922,12 @@ prompt_battery() {
|
||||||
|
|
||||||
case "${${(s:; :)raw_data}[2]}" in
|
case "${${(s:; :)raw_data}[2]}" in
|
||||||
'charging'|'finishing charge'|'AC attached')
|
'charging'|'finishing charge'|'AC attached')
|
||||||
state=CHARGING
|
if (( bat_percent == 100 )); then
|
||||||
|
state=CHARGED
|
||||||
|
remain=''
|
||||||
|
else
|
||||||
|
state=CHARGING
|
||||||
|
fi
|
||||||
;;
|
;;
|
||||||
'discharging')
|
'discharging')
|
||||||
(( bat_percent < _POWERLEVEL9K_BATTERY_LOW_THRESHOLD )) && state=LOW || state=DISCONNECTED
|
(( bat_percent < _POWERLEVEL9K_BATTERY_LOW_THRESHOLD )) && state=LOW || state=DISCONNECTED
|
||||||
|
|
Loading…
Reference in a new issue