FocusFlow JVM monitors the foreground window every 500ms via Win32. When a blocked app is detected, it kills the process, overlays the screen, logs the attempt to SQLite, and optionally adds a live firewall rule — all in the same tick.
Every enforcement action fires in the same 500ms polling tick. There is no grace period, no warning dialog, no snooze.
Every 500ms, GetForegroundWindow() is called via JNA. If the active window belongs to a blocked app, enforcement triggers immediately — no polling delay perceived by the user.
ProcessHandle.destroyForcibly() fires first via JVM 9+. A taskkill /F /IM fallback via ProcessBuilder ensures termination even if the primary handle fails.
When network blocking is enabled, netsh advfirewall and New-NetFirewallRule add a live outbound block rule for the process — enforced at the Windows firewall layer, not just the app layer.
Every blocked attempt is written to a local SQLite database with timestamp, process name, and duration. The Temptation Log panel gives a full history of what was tried and when.
Built with Kotlin 1.9 and Compose Multiplatform Desktop 1.6. Packaged via jpackage as a standalone EXE or MSI — no JVM installation required on the target machine.
Open source. Ships as a standalone Windows EXE. Check the repo for release builds and setup instructions.