Default Lockscreen Passcode

I really missed having Slim's lockscreen feature where you can shake to lock... I don't want to have a passcode on at all times but longer periods of time without my phone, i'd rather have a passcode automatically set.

I'm using PA and I was wondering is there a way to get this feature through something like xposed? if so, what's the module called?