Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if [ -z "$1" ] ; then
- echo "Usage: $0 <time in minutes>";
- exit
- fi
- BASEPATH="/usr/bin"
- if [ ! -x "$BASEPATH/xmessage" ] ; then
- echo "Please install xorg/xmessage to run this script.";
- exit;
- fi;
- sleep "$1m";
- SOUND='/usr/share/sounds/phone.wav';
- aplay $SOUND &> /dev/null;
- RET=`xmessage -buttons OK:0,'30sec more':1 'Tea is Ready!' -center -print`;
- while [ "$RET" != "OK" -a -n "$RET" ] ; do
- sleep 30s;
- aplay "$SOUND" &> /dev/null ;
- RET=`xmessage -buttons OK:0,'30sec more':1 'Tea is Ready!' -center -print`;
- done;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement