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

From: Michael Albinus <[email-masked]>
Date: Fri, 07 Feb 2025 09:03:36 +0100

Andrew Cohen <[email-masked]> 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)

Side note: According to org.freedesktop.login1.Manager, you could get
this information also on D-Bus level, calling method ListInhibitors.

Another idea: There are the properties Docked, LidClosed and
OnExternalPower. Perhaps you could check them in your sleep-handler, and
start different actions depending on their value.

> Best,
> Andy

Best regards, Michael.