Remind use case 2

From Skoll.CA
Jump to navigation Jump to search
Main article: Remind

How I (Phil Snowberger) Use Remind

I use the ion3 window manager, and console / curses applications. One reason I enjoy using ion is its support for the URGENT window manager hint, which causes ion to try to grab your attention when an application sets the hint.

Wyrd is a great frontend for remind, but it does not warn you of upcoming timed events. I wanted this behavior, so I threw together the following setup. Here's a rendition of my process tree:

ion3                                                                                                                                                             
\- rxvt-unicode                                                                                                                                               
   \- screen -S wyrd                                                                                                                                             
      \- bash                                                                                                                                                    
         \- wyrd                                                                                                                                                 
      \- bash                                                                                                                                                    
         \- remind -f -z ~/.reminders | sed 's/^/^G/'

(rxvt-unicode is a relatively lightweight terminal emulator that can be patched to set the URGENT hint on terminal bells. Any terminal that sets URGENT on bells can be dropped in instead.)

In my ~/.screenrc I have

vbell on
bell_msg "^GBell in window %n"

(NB: the ^G in the ~/.screenrc and in the sed commandline above were both entered as literals with ^V^G in vim and bash, respectively.)

Then I start up a screen session, and start wyrd in window 0, and start remind -f -z ~/.reminders | sed 's/^/^G/' in window 1. I keep window 0 (wyrd's window) in the foreground. Whenever there's a timed event triggered:

  1. remind (in window 1) prints out the trigger's message
  2. sed prepends a bell character to the message
  3. screen notices the bell in the hidden window and (since vbell is on) prints out the bell_msg (to all windows)
  4. bell_msg contains a bell character that rxvt-unicode catches, and sets the URGENT hint
  5. ion notifies me, no matter what workspace or window I'm looking at at the time.
  6. I switch to wyrd's window and either hit <HOME> to see what the "current" reminder is, or alternately hit ^A^A to switch over to the remind window to see what the message was.

I can use wyrd just as I would ordinarily and since remind's daemon mode causes it to re-read ~/.reminders when it wakes up, I never have to babysit it.