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

@@ -474,13 +474,15 @@ function battery_char {
fi
}
if [ ! -e "$BASH_IT"/plugins/enabled/battery.plugin.bash ]; then
if ! command_exists battery_charge ; then
# if user has installed battery plugin, skip this...
function battery_charge (){
# no op
echo -n
}
fi
if ! command_exists battery_char ; then
function battery_char (){
# no op
echo -n