Xtea is a program that executes a given command or program after a given time if no X11 keybord or mouse input happend in the given time.
git clone https://git.xw3.org/hanez/Xtea.git
cd Xtea
make
sudo make install
Xtea is installed to /usr/bin/.
sudo make uninstall
Xtea -h
Usage: Xtea [-d] [-v] [-h] <seconds> <program> [arguments...]
Options:
  -d             Run in daemon mode. Restart the program after inactivity.
  -v             Show the program version and exit.
  -h             Show this help message and exit.
Arguments:
  <seconds>      Time (in seconds) to wait after inactivity before running the program.
  <program>      Program to execute after the specified delay.
  [arguments...] Optional arguments to pass to the program.
Examples:
  Xtea 5 ls -ls    Execute 'ls -l' after 5 seconds of inactivity.
  Xtea -d 10 echo 'Hello'    Run 'echo Hello' in daemon mode after 10 seconds of inactivity.