#!/bin/sh

# Lock before suspend integration with elogind

username=follie
export XAUTHORITY="/run/user/1000/Xauthority"
export DISPLAY=":0"
case $1/$2 in
    pre/*)
        su "$username" -c "/usr/bin/i3lock" &
        sleep 1s
        ;;
    post/*)
        ;;
esac
