Necesito ayuda para crear un script que me notifique cuando mi batería está baja

Necesito ayuda para crear un script que me notifique cuando mi batería está baja

Tengo un script que me muestra el porcentaje de batería en dwmblocks, en el cual también he agregado la funcionalidad de notificarme cuando el porcentaje de batería está bajo. pero tal como lo escribí, sigue enviando una nueva notificación hasta que el cargo supera los 20. ¿Cómo puedo solucionarlo para que solo reciba la notificación una vez?

Tenga en cuenta que el script se llama cada 5 segundos.

if [ "$bat" -lt 20 ]; then
    echo "$redbg$tfg $ramp20 $bbg$bat%"
    if [ "$status" -e "Discharging" ]; then
        notify-send --urgency=critical "battery low" 
    fi
elif [ "$bat" -lt "40" ]; then
    echo "$ybg$tfg $ramp40 $bbg$bat%"
elif [ "$bat" -lt "60" ]; then
    echo "$ybg$tfg $ramp60 $bbg$bat%"
elif [ "$bat" -lt "70" ]; then
    echo "$ybg$tfg $ramp70 $bbg$bat%"
elif [ "$bat" -lt "90" ]; then
    echo "$gbg$tfg $ramp90 $bbg$bat%"
elif [ "$bat" -le "100" ]; then
    echo "$gbg$tfg $ramp100 $bbg$bat%"
    if [ "$status" -e "Charging" ]; then
        notify-send "battery sufficiently charged" 
    fi
fi

información relacionada