You can install xautolock which runs an arbitrary command as a screen locker. For instance, mine looks like this:
DISPLAY=:0 xev -geometry 1900x1200 | stdbuf -o0 grep Motion >&-
tvservice -e "CEA 4"
The first line shuts down HDMI signal, making the TV go to sleep. The second line starts the "X event" tool in a window which is bigger ...