Code: Select all
#alarm <description> <minutes>
#example: alarm "Check potatoes" 20
function alarm() {
echo "alarm set for: $1 in $2 minutes"
#Use some trickery to suppress output written by jobs control and return shell to interactivity
( { sleep $2m; notify-send -t 0 -i gtk-dialog-info alarm "$1"; mpg123 -q /usr/share/audio/login.mp3; } & ) > /dev/null 2>&1
}