#!/bin/sh

# This currently contains a useful example of the use of this 
# script file which you can modify to satisfy your requirements.
# You need to install two programs for this script to run:
#    
#    Zenity which is a program that will display GTK+ dialogs, 
#    and returns (either in the return code, or on standard output)
#    the users input. This allows you to present information, and ask
#    for information from shell scripts. You can set timers if required.
#    An example of using Zenity can be seen in suspendScript
#
#    Sox allows you to play an audio file as a warning -
#    you may need an extra library if you use mp3.
#
# Zenity and Sox can installed by
#    sudo apt-get install sox libsox-fmt-mp3 zenity
#
# This script is likely to be overwritten by updates so back it up 
# or use it to transfer control to a script in your home folder
#
# Another  useful program is notify-send which enables you to 
# send notifications. This should be installed
#
# In all cases typing man programname in a terminal will give 
# full information on how to use programname.

# The following is an example which sends a normal notification
# which will end up in the tray after a few seconds, 
# puts up a warning using zenity which needs to be acknowledged
# and plays an audio file. 
# Note the use of & at the end of the lines to run as a separate process in parallel 

notify-send "Current Network Usage Limit Exceeded" "You need to change the limit \n\n or stop using the network" --urgency=normal &

zenity --warning --title="WARNING_DATA_USAGE_EXCEEDED" --text="The data usage limit set has been exceeded \n\n Reset the limit or turn off the network" &

play "/usr/share/sounds/freedesktop/stereo/alarm-clock-elapsed.oga"

# Last modified 07-08-2013
