diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2020-02-27 17:09:18 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2020-02-27 17:09:18 +0300 |
commit | d96fbde6c5d183b8a220291accf14582be20c316 (patch) | |
tree | 618a9815d34b5dceb60dd5db31f45b5cda82d658 /internal/p10k.zsh | |
parent | 92757e5a8d0a232a44cd295bb8541f31492b5ccc (diff) |
don't enable battery segment if there is no battery
Diffstat (limited to 'internal/p10k.zsh')
-rw-r--r-- | internal/p10k.zsh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 7d62c02a..650e382d 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1251,7 +1251,8 @@ _p9k_prompt_battery_init() { _p9k__async_segments_compute+=_p9k_prompt_battery_compute return fi - if [[ $_p9k_os != (Linux|Android) || -z /sys/class/power_supply/(BAT*|battery)/(#qFN) ]]; then + if [[ $_p9k_os != (Linux|Android) || + -z /sys/class/power_supply/(BAT*|battery)/(energy_full|charge_full|charge_counter)(#qL+0N) ]]; then typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${:-}' fi } |