Update switchsession to lock

This commit is contained in:
Salt 2025-01-16 02:00:42 -06:00
parent b62098c5b1
commit 406aeb2d8f

View File

@ -6,3 +6,5 @@ which busctl > /dev/null 2>&1
SEAT=$(busctl get-property org.freedesktop.login1 /org/freedesktop/login1/session/auto org.freedesktop.login1.Session Seat | awk '{print $2}' | tr -d '"' | sed 's/^./\U&/')
# Call out to switch the current session
busctl call org.freedesktop.DisplayManager "/org/freedesktop/DisplayManager/${SEAT}" org.freedesktop.DisplayManager.Seat SwitchToGreeter
# Lock
loginctl lock-session