update battwarning to show correct battery level on warning

This commit is contained in:
RafayAhmad7548 2025-08-13 07:30:57 +05:00
parent 9748bfa8fd
commit f50a72b03b

View file

@ -7,7 +7,7 @@ while true; do
currentPowerSetting=$(powerprofilesctl get) currentPowerSetting=$(powerprofilesctl get)
if [ "$batteryLevel" -le "25" ] && [ "$batteryStatus" == "Discharging" ]; then if [ "$batteryLevel" -le "25" ] && [ "$batteryStatus" == "Discharging" ]; then
notify-send -u critical -i ~/dotfiles/scripts/battery-alert.svg "Low Battery" "25% battery remaining" notify-send -u critical -i ~/dotfiles/scripts/battery-alert.svg "Low Battery" "$batteryLevel% battery remaining"
fi fi