From b88afc785c35317cf8ae8b2bb356c862cb981e49 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Fri, 19 Jan 2018 10:54:35 +0100 Subject: [PATCH] Fix batttery status --- .scripts/wm/battery.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scripts/wm/battery.sh b/.scripts/wm/battery.sh index c648eb3..0b6b4eb 100755 --- a/.scripts/wm/battery.sh +++ b/.scripts/wm/battery.sh @@ -1,6 +1,6 @@ #!/bin/sh -BAT_NUMBER=${BLOCK_INSTANCE:-"0"} +BAT_NUMBER=${BLOCK_INSTANCE:-"$(acpi -b | grep ': [^Unknown]' | awk '{ print int($2) }')"} BAT_INFO="$(acpi -b | grep Battery\ $BAT_NUMBER:)" CAPACITY=$(echo $BAT_INFO | awk '{ print int($4) }')