Fair Play & Tuning
Idle Detection
Idle Detection is an optional accuracy feature that I strongly recommend. It only asks your operating system for one thing: how many milliseconds have passed since your last interaction with the device. This helps LevelUp validate activity states much more accurately, reward your work accordingly, and improve automatic time tracking as well. Nothing else is accessed or tracked.
Quick overview
Idle Detection lets LevelUp tell that you are working when no VS Code event proves it. The three activities below only earn points while it is on.
| What you are doing | Idle Detection on | Idle Detection off |
|---|---|---|
| Working in the terminal | Working in terminal state, +2 per tick | Reads as Idle, earns nothing |
| Using VS Code without typing or scrolling, like menus or the command palette | Working in VS Code state, +1 per tick | Reads as Idle, earns nothing |
| Working outside VS Code | Working outside state, earns points until the outside-work battery runs out after 10 minutes | Reads as Idle, earns nothing |
What LevelUp asks (and what not)
If the feature is active, LevelUp asks your operating system exactly one question, every 5 seconds:
The answer is a single number, for example 4200. That is all. LevelUp never sees what you type or click, only how long ago it was.
| System | Source of the idle value |
|---|---|
| Windows | Windows idle timer (GetLastInputInfo) |
| macOS | System idle counter (HIDIdleTime) |
| Linux | Idle APIs of the desktop environment (GNOME/X11, where supported) |
Deliberately opt-in
The feature is off by default and asks you during the first onboarding, or with a dialog, whether you want to enable it.
Check the status
Via the command palette, LevelUp: Idle Detection Status shows the current state at any time, including the reason if the feature is not verified as running right now.