Add safeguard for no battery percentage available
parent
b55c0251ed
commit
e13c75c433
|
|
@ -153,7 +153,9 @@ ___brainy_prompt_clock() {
|
|||
|
||||
___brainy_prompt_battery() {
|
||||
! command_exists battery_percentage ||
|
||||
[ "${THEME_SHOW_BATTERY}" != "true" ] && return
|
||||
[ "${THEME_SHOW_BATTERY}" != "true" ] ||
|
||||
[ "$(battery_percentage)" = "no" ] && return
|
||||
|
||||
info=$(battery_percentage)
|
||||
color=$bold_green
|
||||
if [ "$info" -lt 50 ]; then
|
||||
|
|
|
|||
Loading…
Reference in New Issue