GNU bug report logs -
#63620
30.0.50; [Feature Request] run hooks on sleep/wake
Previous Next
Full log
Message #184 received at 63620 <at> debbugs.gnu.org (full text, mbox):
>>>>> "MA" == Michael Albinus <michael.albinus <at> gmx.de> writes:
MA> Andrew Cohen <acohen <at> ust.hk> writes: Hi Andrew,
>> (systemd allows me to list all of the applications holding
>> blocks. My gnome desktop typically shows 7 or 8 applications
>> holding blocks for sleep, including the Network Manager, Power
>> Manager, etc)
MA> Side note: According to org.freedesktop.login1.Manager, you
MA> could get this information also on D-Bus level, calling method
MA> ListInhibitors.
Yes, thanks. I was just using this for testing to see if I was
understanding the logic.
MA> Another idea: There are the properties Docked, LidClosed and
MA> OnExternalPower. Perhaps you could check them in your
MA> sleep-handler, and start different actions depending on their
MA> value.
That is a good idea. We could generalize the mode to handle a variety of
things other than sleep. Maybe we should use a new event category
(<system-event> or something) rather than sleep-event. This general
event can contain actions for sleep, docked, lidclosed, etc. And we
provide a mode for system-event, with sleep just one of the actions. For
D-Bus, this becomes pretty trivial---we just inject all the events we
are interested into system-event and have an appropriate handler.
I must say, I hadn't fully appreciated all that can be done with
D-Bus.
Best,
Andy
--
Andrew Cohen
This bug report was last modified 130 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.