Windows Desktop
Kotlin + Compose Multiplatform

Process killed.
Firewall rule added.

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.

View Project Source Code
How It Works

500ms polling. Instant kill. Real enforcement.

Every enforcement action fires in the same 500ms polling tick. There is no grace period, no warning dialog, no snooze.

Win32 Foreground Detection

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.

Process Kill via JVM + taskkill

ProcessHandle.destroyForcibly() fires first via JVM 9+. A taskkill /F /IM fallback via ProcessBuilder ensures termination even if the primary handle fails.

Live Firewall Rules via PowerShell

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.

SQLite Temptation Log

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.

Stack

Kotlin + Compose. Ships as a standalone EXE.

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.

Kotlin 1.9Compose Multiplatform 1.6JNA 5.14 Win32 APIProcessHandle (JVM 9+)netsh advfirewall PowerShellSQLitejpackage (EXE / MSI)SHA-256 PIN

Try FocusFlow JVM

Open source. Ships as a standalone Windows EXE. Check the repo for release builds and setup instructions.