# works as long as the last component isn't a symlink
THISDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
-BEEP="aplay $THISDIR/pop.wav"
-#BEEP="play $THISDIR/pop.wav gain -10"
+#BEEP="aplay $THISDIR/pop.wav"
+BEEP="play $THISDIR/pop.wav gain -10"
# the delay time between playing the sound and showing the window
function sampleTask {
DATE=$(date +"%F %R")
DATE3339=$(date +"%FT%R%:z")
- ACTIVITY=$(zenity --entry \
- --title="Task sample" \
- --text="Current activity: $DATE" \
- --entry-text="$(lastActivity)")
+ #ACTIVITY=$(zenity --entry \
+ #--title="Task sample" \
+ #--text="Current activity: $DATE" \
+ #--entry-text="$(lastActivity)")
+ ACTIVITY=$(kdialog --title="Task sample" --inputbox \
+ "Current activity: $DATE" "$(lastActivity)")
# ACTIVITY=`gxmessage -entry \
# -center \
# -buttons "GTK_STOCK_OK:0" \
# away, last number is a fudge factor to ensure we wakeup early enough
sleeptime=$(($MINUTES*60 - 5))
# using bg + wait allows us to catch signals while waiting
+ echo "sleeping for: $sleeptime"
sleep $sleeptime &
wait $!
# New way: stop, then send myself a (future) continue at an exact MINUTES
# boundary
+ echo "kill -CONT $thispid | at now + $(nexttime) minutes "
echo "kill -CONT $thispid" | at now + $(nexttime) minutes > /dev/null 2>&1
#stop myself, will resume when above "at" command fires