Finally, a usable calendar program

I have never managed to use my computer to manage my schedule. Most calendar programs are either too slow, too limited, too clunky, too ugly, or all of the above. Over the years, I have tried many (I mean many) calendar apps, but never found anything that I could continue to use consistently. The applications that came closest to what I liked were orage, which is a light calendar application for the Xfce desktop environment, and calcurse, which is a command-line based calendar application. Both had their strengths and weaknesses, but ultimately, did not fit into my work flow.

That is, until I tried remind+wyrd[1]. Remind+wyrd is similar to calcurse; both wyrd and calcurse are curses based calendar applications. The main difference is that wyrd is just a front-end. It leaves all the processing to remind, which provides a ton of features. And I mean a ton. This is best explained by an example, copied from the remind wiki (and slightly modified to be self contained).

The 4th of July is a holiday in the U.S. However, if it falls on a Saturday, the previous Friday is a holiday. If it falls on a Sunday, the next Monday is a holiday.

We can keep track of the independence day in US by adding the following code snippet to $HOME/.reminders.

REM 4 July SCANFROM [trigger(today()-7)] SATISFY 1

IF WKDAYNUM(TRIGDATE()) == 6
	REM [TRIGGER(TRIGDATE())] MSG Independence day (actual)
	OMIT [TRIGGER(TRIGDATE()-1)] MSG Independence day (observed)
ELSE
	IF WKDAYNUM(TRIGDATE()) == 0
		REM [TRIGGER(TRIGDATE())] MSG Independence day (actual)
		OMIT [TRIGGER(TRIGDATE()+1)] MSG Independence day (observed)
	ELSE
		OMIT [TRIGGER(TRIGDATE())] MSG Independence day
	ENDIF
ENDIF

Then, we get

$ rem -s2 july 5 2010 | grep 'Independence'
2010/07/04 * * * * Independence day (actual)
2010/07/05 * * * * Independence day (observed)

Now, can your calendar program do this!. If this does not impress you, how about calculating when a blue moon (two full moons in a month) occurs. Add this to your $HOME/.reminders

FSET isGood(date) \
           monnum(moondate(2, date)) == \
                monnum(moondate(2, moondate(2, date)+1))

REM 1 SATISFY isGood(trigdate())

set blue moondate(2, moondate(2, trigdate())+1)

MSG Next blue moon is [blue]

Then, we get

$rem | grep 'blue moon'
Next blue moon is 2012-08-31

I know. How often do you need to figure out the next blue moon. But the point is that remind is text based and programmable. I will not try to explain how remind works. Others have done a far better job than I could ever do.

For an overview of remind, see the article in the Linux Journal by David Skoll, the author of remind. Another excellent introductory article is by Mike Harris in 43 Folders. For a bit of a history of remind, see David Skoll’s presentation. There is also a wiki with some more information, especially, how to integrate remind so that you see a pop-up message for reminders. For me, just adding

rem -q

in my .zshrc is sufficient.


[1] I thought that the name wyrd was geek-speak for weird. I was close. Wyrd is the ancestor to weird. Google for more information on wyrd.