#!/bin/sh
##############################################################################
#
#  Copyright (c) 2008, Doremi Labs, Inc.
#    All rights reserved.
#
#  Redistribution in source or binary forms, with or without
#  modification, are NOT permitted.
#
#    Doremi Labs, Inc.
#    306 East Alameda Avenue
#    Burbank, CA 91502
#    Tel : (818) 562 1101
#    Fax : (818) 562 1109
#
#
##############################################################################

POPUP=/doremi/X11R6/bin/drmpopup.out
LANGCF=/doremi/etc/language

test -x ${POPUP} || exit 0

TITLE="Alert! Battery power exhausted!"
MESSAGE="Battery power is exhausted.<br><b>Initiating shutdown sequence!</b>"

# translations
if grep -qs fr-FR ${LANGCF}; then
TITLE="Alerte! Batterie vide"
MESSAGE="La batterie est bientt vide.<br><b>Arrt du systme imminent.</b>"
fi

${POPUP} "${TITLE}" "<b>`date +'%a %b %-d, %Y ; %H:%M'`</b><br><br>${MESSAGE}" --warning

exit 0
