eww osd and battery warning

This commit is contained in:
2024-12-29 21:17:59 +01:00
parent f17dac3339
commit b54468d17a
15 changed files with 406 additions and 19 deletions

View File

@@ -0,0 +1,11 @@
prevbattery=$(cat /sys/class/power_supply/BAT*/capacity)
while [[ true ]]; do
battery=$(cat /sys/class/power_supply/BAT*/capacity)
if (($battery <= 20 && $prevbattery > 20)); then
eww open batteryLow
elif (($battery <= 10 && $prevbattery > 10)); then
eww open batteryCritical
fi
prevbattery=$battery
sleep 60
done