In gnome or KDE it's easily configurable if not default behaviour for my laptop (lenovo x61) to suspend to ram upon the lid being closed. I'm now switching my laptop to xmonad after using and enjoying it on my desktop for quite some time now, but it doesn't suspend/resume with the lid actions anymore. Is there a way to add such a hook to xmonad such that I can get that behavior back again?

Also, I'm using xmonad straight up, I'm not using it as the window manager for the gnome desktop environment.