Updated battery status script to check for acpi and use if present

This commit is contained in:
Aaron Hewitt 2022-12-01 19:12:07 +00:00
parent ccac3e4367
commit 9d664036a1

View File

@ -1,5 +1,9 @@
#!/usr/bin/env bash
#check for acpi
if command -v acpi &> /dev/null; then
spd-say -P important -Cw "$bat"
else
find /sys/class/power_supply -type l -exec bash -c '
for i ; do
if [[ -e "$i/capacity" ]]; then
@ -10,4 +14,4 @@ find /sys/class/power_supply -type l -exec bash -c '
fi
done
' _ {} \;
fi