Watch For Lid Closed?

160 views
Skip to first unread message

bob.ziu...@gmail.com

unread,
May 30, 2015, 1:13:37 AM5/30/15
to hamme...@googlegroups.com
Hi,

I just discovered Hammerspoon and am already in love!  Thanks to the guick start guide and API docs, I'm well on my way to replacing ShiftIt and Caffeine.

Now I'm trying to solve something that has been driving me nuts -- locking my screen when I close the laptop lid.  I would very much like to bind hs.caffeinate.startScreensaver() to a lid closing event.  Is there any way to monitor for lid closing?

Thanks for the wonderful software!

Bob




Chris Jones

unread,
Jun 24, 2015, 5:02:20 AM6/24/15
to Bob Ziuchkovski, hamme...@googlegroups.com
Hi

At the moment we don't have an event for that and, unfortunately, as far as I can tell there is no system-level event generated when the lid is closed.

We do have an event for the machine going to sleep (typically what happens when you close the lid), but then you could just configure OSX directly to start the screensaver when it goes to sleep.

Cheers,
Chris

--
You received this message because you are subscribed to the Google Groups "Hammerspoon" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hammerspoon...@googlegroups.com.
To post to this group, send email to hamme...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/hammerspoon/d7d0eb4a-b752-4405-9519-5563a9764dd2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Cheers,

Chris
Reply all
Reply to author
Forward
0 new messages