I wrote iCanSleep after I couldn’t find a tool that matched my requirements.

Both Caffeeine and InsomniaX rubbed me the wrong way – the former does not allow the display to sleep (WTF? Who would want that?) and the latter prevents sleeping altogether (WTF? I can set Energy Saver settings to “Never” myself, thank you).

To be fair: both tools have some merit, just not for me. Specifically InsomniaX has features for MacBook Pro users.

What I wanted was a tool with customizable “no sleep” duration, and not the 5-30 minutes, 1, 2 and 5 hour option of Caffeine, or none as with InsomniaX.

One that would actually show me for how much longer the Mac won’t sleep. One that would resume the normal sleep schedule after the “no sleep” duration expired. One that allows the display to sleep.

But most importantly: I needed a tool that could monitor disk activity in a given folder (and its subfolders) to prevent sleeping for a couple more minutes every time an activity (add/remove/write) is detected. Mainly for long running tasks like encoding, rendering, up/downloading, copying, backup’ing, etc. and specifically for Windows programs running in Parallels which would suffer consequences (corruption, crashes, or just getting interrupted) by the Mac going to sleep.

A short research later I realized it was rather straightforward to write a status bar app that prevents sleeping thanks to the code shared on stackoverflow.com. So I wrote my own, and polished it for release:

Learn more about iCanSleep and download it here.

The source code is available on github.

That is all for today. :)

This article was brought to you by ...

I very much enjoy the learning process, the pushing of boundaries (mine and yours and that of technology), having the freedom to pursue whatever is on my mind, to boldly program what no one has programmed before, and to write about what I've learned. Help me help you by browsing the products in the Learn Cocos2D Store.

Tagged with:  

Comments are closed.