diff --git a/battery-monitor.sh b/battery-monitor.sh index 0016570..b89c21c 100755 --- a/battery-monitor.sh +++ b/battery-monitor.sh @@ -10,11 +10,11 @@ while true; do if [[ "$status" =~ "Charging" ]]; then was_notified=0 fi - if [[ "$status" =~ "Discharging" && "$capacity" -lt 25 && "$was_notified" = 0 ]]; then + if [[ "$status" =~ "Discharging" && "$capacity" -lt 15 && "$was_notified" = 0 ]]; then xmessage -nearmouse "$acpi_data"& was_notified=1 fi - if [[ "$status" =~ "Discharging" && "$capacity" -lt 15 ]]; then + if [[ "$status" =~ "Discharging" && "$capacity" -lt 10 ]]; then bash -c 'echo "Battery critical, suspending"; acpi -b' | xmessage -nearmouse -file -& sleep 5 systemctl suspend