Could someone please recommend a simple CLI timer program? That accepts a number of minutes, and plays a sound. Or perhaps the same someone could comment on why this script which works with other OS’es fails here.
#!/bin/bash
#Author: Rossana Motta - email: rossana.hell.no.127.0.0.1@gmail.com - http://ww2.cs.fsu.edu/~motta
#Version: 1
#Date: June 23rd 2007
VALUE=`kdialog --inputbox "How many minutes do you want to set?" 5`;
SNDFILE="$HOME/bin/timer.wav"
if [[ $VALUE == "" ]]
then
exit;
fi
VALUEMIN=$(echo "$VALUE*60" | bc)
sleep $VALUEMIN
if [ -s $SNDFILE ]
then
aplay $SNDFILE $SNDFILE $SNDFILE $SNDFILE
else
(kdialog --msgbox "Error: file $SNDFILE does not exist. Modify the source code setting a valid full path to a supported file (.wav or .au for example)" --title "Not existing file"; exit)
fi