News for hackers. Stuff that matters.
Re:Getting a push message on your phone when your laptop bat... by dewey on Sunday June 07, 2015 @07:19AM (#9674183)
Is there an equivalent of udev on Mac OS so I don't have to run a cronjob to check the battery percentage all the time? I know how to get the percentage from ioreg but i'd be nice to be able to just listen for that api call like udev does.
Re:Getting a push message on your phone when your laptop bat... by bluerobotcat on Sunday June 07, 2015 @10:38AM (#9674773)
I/O Kit can be used for this. [1]

[1] https://developer.apple.com/library/mac/documentation/Device... (I'm a bit surprised that the docs assume that the reader is implementing a driver. I have used I/O Kit in an app that was available on the App Store.)