diff options
Diffstat (limited to 'i3blocks')
-rwxr-xr-x | i3blocks/i3battery.sh | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/i3blocks/i3battery.sh b/i3blocks/i3battery.sh index 1be8142..256b199 100755 --- a/i3blocks/i3battery.sh +++ b/i3blocks/i3battery.sh @@ -12,6 +12,7 @@ case $BLOCK_BUTTON in esac battery="$CONFIG_BATTERY" +[ -n "$battery" ] || exit 0 status=$(cat /sys/class/power_supply/"$battery"/status) capacity=$(cat /sys/class/power_supply/"$battery"/capacity) || exit 0 [ -f "/bin/acpi" ] && remaining="$(acpi | cut -d' ' -f5 | cut -d':' -f-2)" || remaining="missing acpi" |