diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-09-09 15:48:32 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-09-09 15:48:32 +0300 |
commit | fd96e92df678da67fc35038c612fbdf95a0e9010 (patch) | |
tree | 3735efc029bd3e9faa4863bcb6549213162ae108 /internal | |
parent | daedc56b3df578808d33a5f349b0d9b7756d68e3 (diff) |
show battery as CHARGED on macos if it is at 100% and connected to power supply
Diffstat (limited to 'internal')
-rwxr-xr-x | internal/p10k.zsh | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index e409c36c..96bee0bf 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -922,7 +922,12 @@ prompt_battery() { case "${${(s:; :)raw_data}[2]}" in 'charging'|'finishing charge'|'AC attached') - state=CHARGING + if (( bat_percent == 100 )); then + state=CHARGED + remain='' + else + state=CHARGING + fi ;; 'discharging') (( bat_percent < _POWERLEVEL9K_BATTERY_LOW_THRESHOLD )) && state=LOW || state=DISCONNECTED |