diff --git a/lib/systemd/system-sleep/gemian-lock b/lib/systemd/system-sleep/gemian-lock new file mode 100755 index 0000000..e033b68 --- /dev/null +++ b/lib/systemd/system-sleep/gemian-lock @@ -0,0 +1,5 @@ +#!/bin/bash +if [ "${1}" == "pre" ]; then + USER=`loginctl list-sessions | grep seat0 | awk '{print $3}'` + /bin/su - ${USER:-gemini} -c "DISPLAY=:0 gemian-lock" +fi