You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following electron API could be used to determine whether the user is even active. If not, write "Idle" in "activity" and "title" of the last entry.
The following electron API could be used to determine whether the user is even active. If not, write "Idle" in "activity" and "title" of the last entry.
Note that a challenge with the above-mentioned approach is that the tracker is just TypeScript and currently has no ties to Electron. Since the powermonitor API is from Electron, it would lose that independence. (so far, our apps were always also using Electron, so it might not be a bad problem, especially, if we don't find a better solution)
Like using a background thread that provides the number of seconds since the last activity from mouse or keyboard?
see, e.g., this simple code snippet or this Github project
Also, Chrome et al. might already support this natively through the Idle Detection API
The following electron API could be used to determine whether the user is even active. If not, write "Idle" in "activity" and "title" of the last entry.
https://www.electronjs.org/de/docs/latest/api/power-monitor#powermonitorgetsystemidlestateidlethreshold
For the Windows implementation, see here.
The text was updated successfully, but these errors were encountered: