Fix battery_percentage check in Atomic theme
Check for the return value "no", which is returned when no battery check funcationality is available in the OS. This is now consistent with how the Brainy theme does this.
This commit is contained in:
@@ -164,8 +164,10 @@ ___atomic_prompt_clock() {
|
||||
}
|
||||
|
||||
___atomic_prompt_battery() {
|
||||
chk=$(command_exists battery_percentage && echo yes || echo no)
|
||||
[ "$chk" != "yes" ] || [ "${THEME_SHOW_BATTERY}" != "true" ] && return
|
||||
! command_exists battery_percentage ||
|
||||
[ "${THEME_SHOW_BATTERY}" != "true" ] ||
|
||||
[ "$(battery_percentage)" = "no" ] && return
|
||||
|
||||
batp=$(battery_percentage)
|
||||
if [ "$batp" -eq 50 ] || [ "$batp" -gt 50 ]; then
|
||||
color=$bold_green
|
||||
|
||||
Reference in New Issue
Block a user