xidlehook is a general-purpose replacement for xautolock, written in Rust, with a few extra features. It executes a command when the computer has been idle for a specified amount of time.
xidlehook
xautolock