Sorry for the late reply, but I finally remembered to look at this while at work. I've got
x11/i3lock installed, which is what I use to lock the screen when I'm AFK. I then wrote two scripts to work with it, depending on what I want to do. If I just want to lock, I run the wrapper script:
Code:
cat `which i3wrap`
#!/bin/sh
revert() {
xset dpms 0 0 0
}
trap revert HUP INT TERM
xset +dpms dpms 5 5 5
i3lock -nc 670000
revert
Alternatively, if I want to lock the machine and have it sleep, I run this:
Code:
cat `which i3sleep`
#!/bin/sh
i3lock -c 670000
sudo zzz
...which needs
security/sudo installed and permissions configured to run
zzz
as root without a password. I put both of these scripts into
/usr/local/bin/ (don't forget to chmod +x) and set them to keybinds so I can quickly lock/sleep with just a keypress combination.
Edit: Now that I look closer, the "FreeBSD red" is actually
#ad221d (and not #670000), so you might want to change the color in the scripts if you're a super-nerd like me.