Feature Proposal: Support for systemd's lock-session feature
cherti opened this issue · 2 comments
Currently, as far as I can tell, swayidle does support systemd-inhibitors to ensure the screen is locked before actually going to sleep. In addition to that, supporting the systemd-session-lock mechanism as used for example by loginctl lock-session[s]
or configurations in /etc/systemd/logind.conf
would allow swayidle to react to exactly this.
If lock session
is triggered, a Lock
-signal is emitted on the session objects on org.freedesktop.login1
, to which one can subscribe.
If XDG_SESSION_ID
is not set (i.e. swayidle runs outside a session, for example a systemd-user-unit), simply all sessions could be locked, making this feature also usable with systemd user units and its benefits.
An exemplary implementation of this in Python can be found here.
We already have a swayidle lock <command>
argument. Is this the same?
sometimes you double and triple check things and then you screw it up regardles...
Yes, that is exactly what I was proposing, nevermind, sorry for the noise and keep up the good work! :)