It should be possible to implement this feature with systemd inhibitor locks: https://freedesktop.org/wiki/Software/systemd/inhibit/
It should be possible to implement this feature with systemd inhibitor locks: https:/ /freedesktop. org/wiki/ Software/ systemd/ inhibit/