Downloads the most recent XKCD strip into a specified or the current directory.
Even though I wrote this mostly as an exercise in Haskell, it does have a practical use. You can use GeekTool on OS X to show the current strip on your desktop. How to do that?
###How to show xkcd on your desktop on OS X
-
Download GeekTool from App Store
-
cabal install xkcd
-
Put a shell widget on your desktop and set the xkcd executable as command. Put a directory into which it can download image as the argument. It should look like this:
xkcd ~/comics/newXkcd.jpg
Set refresh every to 8640 so that it will try to download new strip every 24 hours. -
Now put an image widget on your desktop. Using set local path choose the image. Set refresh every to 4320 (I'm not sure in what order GeekTool refreshes the widgets and we wouldn't like seeing the comic 24 hours after it was published, right?)
-
Enjoy xkcd on your desktop!