I would like to log the amount of time I spend in front of the computer - so not uptime for the PC, but the amount of time where I'm actively using input (mouse/keyboard).
The worktimer workrave does something like that - you can set an interval and after that, it will display a break-timer. But if you don't use the mouse/keyboard for perhaps 30 secs, the timer is suspended. So it can be done.
The best I could find was procinfo, but does not seem like it. From the man page:
user: The amount of time spent running jobs in user space.
nice: The amount of time spent running niced jobs in user space.
system: The amount of time spent running in kernel space. Note: the
time spent servicing interrupts is not counted by the kernel (and
noth‐ ing that procinfo can do about it).
idle: The amount of time spent doing nothing.
uptime: The time that the system has been up. The above four should
more or less add up to this one.
So "idle time" might be it, but it seems to be idle-time in terms of cpu-usage and not idle in the terms I need it.
I'm on a Lubuntu 20.04 machine.