Fix checks for battery plugin

These now check for the presence of the required function instead of
checking for the battery file in the enabled directory.
This commit is contained in:
Nils Winkler
2017-05-29 17:29:06 +02:00
parent c598487303
commit 3fac1c7ea5
4 changed files with 10 additions and 9 deletions

View File

@@ -152,7 +152,7 @@ ___brainy_prompt_clock() {
}
___brainy_prompt_battery() {
[ ! -e $BASH_IT/plugins/enabled/battery.plugin.bash ] ||
! command_exists battery_percentage ||
[ "${THEME_SHOW_BATTERY}" != "true" ] && return
info=$(battery_percentage)
color=$bold_green