From c33861a9b0a2fc7f94493d174c0fe9b84e81b3b9 Mon Sep 17 00:00:00 2001 From: Nils Winkler Date: Mon, 29 May 2017 17:36:55 +0200 Subject: [PATCH] Change dependency check for battery_char function --- themes/base.theme.bash | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/themes/base.theme.bash b/themes/base.theme.bash index 89c01e3b..58e2d288 100644 --- a/themes/base.theme.bash +++ b/themes/base.theme.bash @@ -482,7 +482,9 @@ if ! command_exists battery_charge ; then } fi -if ! command_exists battery_char ; then +# The battery_char function depends on the presence of the battery_percentage function. +# If battery_percentage is not defined, then define battery_char as a no-op. +if ! command_exists battery_percentage ; then function battery_char (){ # no op echo -n