Binary package “xidle” in ubuntu mantic

run program after inactivity or edge sensitive

 xidle runs a specific program after a certain amount of
 inactivity time, or when the mouse cursor is moved to an
 edge of the screen for a certain time, all of which is
 configurable. It is commonly used to run xlock.