From 0871c362ef784efd59213bf79649476108f89da5 Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Sat, 29 Oct 2016 11:47:00 +1100 Subject: [PATCH] Windows 10 (bash): Fix battery 2 --- neofetch | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/neofetch b/neofetch index d2693408..0a1c6847 100755 --- a/neofetch +++ b/neofetch @@ -1595,13 +1595,14 @@ getbattery() { for bat in "/sys/class/power_supply/BAT"*; do capacity="$(< ${bat}/capacity)" status="$(< ${bat}/status)" - battery="${capacity}% [${status}]" # Fix for bash on Windows 10 which includes /proc files # for battery usage despite there not being a battery # installed. [ -z "$capacity" ] && return + battery="${capacity}% [${status}]" + case "$battery_display" in "bar") battery="$(bar "$capacity" 100)" ;; "infobar") battery+=" $(bar "$capacity" 100)" ;;