Install xprintidle by entering the following commands in the terminal:
sudo apt update sudo apt install xprintidle
Description:
Small utility that prints user's idle time in X
xprintidle is a utility that queries the X server for the user's idle time and prints it to stdout (in milliseconds).
Version: 0.2-10build1
Section: universe/x11