Fix batttery status

This commit is contained in:
Riyyi
2018-01-19 10:54:35 +01:00
parent 1ffefb6364
commit b88afc785c
+1 -1
View File
@@ -1,6 +1,6 @@
#!/bin/sh #!/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:)" BAT_INFO="$(acpi -b | grep Battery\ $BAT_NUMBER:)"
CAPACITY=$(echo $BAT_INFO | awk '{ print int($4) }') CAPACITY=$(echo $BAT_INFO | awk '{ print int($4) }')