while [ true ]; do if [ -e "$BATTERY_PATH" ]; then BATTERY_ON=$(cat $BATTERY_PATH/status) CURRENT_BATTERY=$(cat $BATTERY_PATH/capacity)
if [ "$BATTERY_ON" == "Discharging" ]; then
if [ "$CURRENT_BATTERY" -lt "$CRITICAL_BATTERY" ]; then $($PLAY) notify-send -i "$CRITBAT_ICON" "Battery is Critical - $CURRENT_BATTERY%. Shutting down in 60 sec." sleep 60 $($ACTION)
elif [ "$CURRENT_BATTERY" -lt "$LOW_BATTERY" ]; then $($PLAY) notify-send -i "$LOWBAT_ICON" "Battery is Low - $CURRENT_BATTERY%." fi
elif [ "$BATTERY_ON" == "Full" ]; then $($PLAY) notify-send -i "$FULLBAT_ICON" "Battery is Full - 100%." fi fi sleep $SLEEP done