Added status to the output in the batteryzu script. fixed the shabang. Fixed formatting.
This commit is contained in:
parent
722a028c8f
commit
33e9a0668e
@ -1,7 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
#check for acpi
|
||||
if command -v acpi &> /dev/null; then
|
||||
bat=$(acpi -b)
|
||||
bat="$(acpi -b)"
|
||||
spd-say -P important -Cw "$bat"
|
||||
else
|
||||
find /sys/class/power_supply -type l -exec bash -c '
|
||||
@ -9,7 +10,7 @@ else
|
||||
if [[ -e "$i/capacity" ]]; then
|
||||
bat="${i##*/}"
|
||||
bat="${bat//BAT/Battery }"
|
||||
bat="${bat}: $(cat "${i}/capacity") percent"
|
||||
bat="${bat}: $( { cat "${i}/status";echo -n ", "; cat "${i}/capacity"; } | tr -d \\n) percent."
|
||||
spd-say -P important -Cw "$bat"
|
||||
fi
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user