Closed d1rewolf closed 2 years ago
Hey @d1rewolf! No way currently, these are the supported events https://github.com/kasper/phoenix/blob/2.6.7/docs/API.md#2-events. I haven’t tested, but I wonder if the app activation events could work as a stopgap?
Thanks for the response. For the time, I've switched back to Hammerspoon, but still hope to revisit Phoenix in the future. I'll research that approach and post back here if I reach a conclusion.
Sure! I’ll reopen this one still, so I can keep it as an improvement idea.
Added support for deviceWillSleep
and deviceDidWake
. Read more at https://kasper.github.io/phoenix/api/events/#device.
I'd like to be able to do certain actions when my system goes to sleep. In Hammerspoon, they have https://www.hammerspoon.org/docs/hs.caffeinate.watcher.html which works very well. I'm trying to find the equivalent in Phoenix. The closest I've found screensDidChange, but this doesn't seem to fire on system sleep.
Is there a way to do this currently?
Thanks!