Updated battery status script to check for acpi and use if present
This commit is contained in:
parent
ccac3e4367
commit
9d664036a1
@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/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 '
|
find /sys/class/power_supply -type l -exec bash -c '
|
||||||
for i ; do
|
for i ; do
|
||||||
if [[ -e "$i/capacity" ]]; then
|
if [[ -e "$i/capacity" ]]; then
|
||||||
@ -10,4 +14,4 @@ find /sys/class/power_supply -type l -exec bash -c '
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
' _ {} \;
|
' _ {} \;
|
||||||
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user