Only run systemd-inhibit for local X11 sessions
This commit is contained in:
parent
001550d5fe
commit
e62e15b2f9
@ -44,8 +44,10 @@ let
|
|||||||
# since presumably the desktop environment will handle these.
|
# since presumably the desktop environment will handle these.
|
||||||
if [ -z "$_INHIBITION_LOCK_TAKEN" ]; then
|
if [ -z "$_INHIBITION_LOCK_TAKEN" ]; then
|
||||||
export _INHIBITION_LOCK_TAKEN=1
|
export _INHIBITION_LOCK_TAKEN=1
|
||||||
|
if ! ${config.systemd.package}/bin/loginctl show-session $XDG_SESSION_ID | grep -q '^RemoteHost='; then
|
||||||
exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key "$0" "$sessionType"
|
exec ${config.systemd.package}/bin/systemd-inhibit --what=handle-lid-switch:handle-power-key "$0" "$sessionType"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user