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

@@ -117,7 +117,7 @@ ${D_BRANCH_COLOR}%b %r ${D_CHANGES_COLOR}%m%u ${D_DEFAULT_COLOR}"
# checks if the plugin is installed before calling battery_charge
safe_battery_charge() {
if [ -e "${BASH_IT}/plugins/enabled/battery.plugin.bash" ];
if command_exists battery_charge ;
then
battery_charge
fi