From 376614b9181ec08ad3221c6e10bfe0075fa7f15b Mon Sep 17 00:00:00 2001 From: Dylan Date: Fri, 26 Feb 2016 19:09:22 +1100 Subject: [PATCH] Fix the battery check --- fetch | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fetch b/fetch index 172ab449..e880eefd 100755 --- a/fetch +++ b/fetch @@ -1346,7 +1346,7 @@ getdisk () { getbattery () { case "$os" in "Linux") - if [ -d "/sys/class/power_supply" ]; then + if [ "$(ls /sys/class/power_supply/)" ]; then # Set the index to the battery number. case "$battery_num" in "all") battery_num="*" index=0 ;;