Notification when the system is idle or not on OS X

Viewed 4383

I know that there is some way to get the system idle time with the IOKit framework on OS X, but I want to know if there's notifications available.

I can create a timer to check if the idle time is more than x, and that's fine. It doesn't matter if I detect the idle mode a few seconds later.

The problem is to detect when the Mac is not idle anymore. I want my app to show a notification as soon as possible, not a few seconds later.

Is there a way to have a notification for that? (iChat seems to have one)

2 Answers
Related