Subject: Re: bug#63620: 30.0.50; [Feature Request] run hooks on sleep/wake

From: Ship Mints <[email-masked]>
Date: Wed, 5 Feb 2025 21:26:17 -0500

I didn't read the code yet so I'm glad this approach doesn't depend on
dbus.

I will happily work on the NS event generation. I can prototype any time
we're ready.

On Wed, Feb 5, 2025 at 21:20 Andrew Cohen <[email-masked]> wrote:

> >>>>> "SM" == Ship Mints <[email-masked]> writes:
>
>     SM> If someone builds without dbus, say on macOS, does this approach
>     SM> work without dbus?
>
> This assumes that detection of sleep/wake state changes will be added to
> the C source (as you offered to implement for NS :)). The idea is that
> you add code to detect the change at the OS level, and then create an
> event of type sleep-event with an argument of t for sleep and nil for
> wake.  The lisp package detects the sleep-event and runs the appropriate
> code.
>
> It won't work quite yet (this was just showing the concept) since the C
> code has to be written, and the handler function needs to accept either
> an event (a cons) or a boolean. But if everyone thinks this is a valid
> approach we can take care of this.
>
> Best,
> Andy
> --
> Andrew Cohen
>