mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
don't enable battery segment if there is no battery
This commit is contained in:
parent
92757e5a8d
commit
d96fbde6c5
1 changed files with 2 additions and 1 deletions
|
@ -1251,7 +1251,8 @@ _p9k_prompt_battery_init() {
|
||||||
_p9k__async_segments_compute+=_p9k_prompt_battery_compute
|
_p9k__async_segments_compute+=_p9k_prompt_battery_compute
|
||||||
return
|
return
|
||||||
fi
|
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]"='${:-}'
|
typeset -g "_p9k__segment_cond_${_p9k__prompt_side}[_p9k__segment_index]"='${:-}'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue