[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: software for (reminder) recommendation



On 2013-11-13 lina wrote:

> I checked most, seems none has "pop up" action before the events.

I use the following little script that I borrowed from somewhere: It uses
"gmessage" (you can change to xmessage) and "at", and will pop up the
message that you typed in originally. If you call the script "reminder",
then make it executable: "chmod +x reminder" and put it in your path. You
can test it by calling the script and type in a little message. Finish
your message with a dot "." by itself on the last line and then hit
enter, i.e.
  
   Here is the message
   I would like to remind
   me of some event
   .

Then you are prompted to enter the time that you would like to get the
reminder. Type e.g. "now + 1 minute". The message will pop up in 1
minute. There are some examples of specifying times in the script. "man
atq" gives you more.

  Morten

                      -----------------------------

  #!/bin/sh
  
  mkdir -p $HOME/tmp/atd
  
  echo "Enter your reminder message.
  When finished, enter a period (.) at
  the beginning of a line and press enter.
   (Or press Ctrl-C or DEL to exit.)"                                    
  
  while :
  do
          read MESSAGE
          if [ "$MESSAGE" = "." ]
          then
               break
          else
               echo $MESSAGE >> $HOME/tmp/atd/message.$$
          fi
  done
  
  cat << !!
  
  Enter time and day you want to receive
  the message, for example:
  
          0815 jan 24
          08:15 tomorrow
          now + 1 day
          now + 15 minutes
          1700 Friday
  
  Then press Enter.
  
  !!
  
  read TIME
  at $TIME << !!
  /usr/bin/gmessage -center -display :0.0 -file $HOME/tmp/atd/message.$$
  
  !!
  
  at -l
  exit 0


Reply to: