I've been playing with this autoslock.service file:
[Unit] Description=Lock the screen on suspend +Before=sleep.target [Service] User=garrett Environment=DISPLAY=:0 ExecStart=/usr/local/bin/slock [Install] WantedBy=sleep.target It almost works. The problem is that there's a brief period when the screen wakes up where it's contents are visible before slock is triggered. What do I need to do to fix it? I would think there'd be a way for slock to be invoked immediately prior to sleep instead of after waking up, but I haven't been able to crack it.