Problem
On Windows, every focus check spawns a visible powershell.exe / pwsh.exe window that flashes on screen before closing.
Cause
src/focus.ts:101-106, getWindowsActiveWindowId() doesn't pass -WindowStyle Hidden:
let windowId = execFileWithTimeout("powershell", ["-NoProfile", "-NonInteractive", "-Command", script], 1000)
if (!windowId)
windowId = execFileWithTimeout("pwsh", ["-NoProfile", "-NonInteractive", "-Command", script], 1000)
This runs on every notifier event. The PowerShell Operational log shows it firing every 10-30 seconds during active sessions.
Fix
Add "-WindowStyle", "Hidden" to both calls:
let windowId = execFileWithTimeout("powershell", ["-NoProfile", "-NonInteractive", "-WindowStyle", "Hidden", "-Command", script], 1000)
if (!windowId)
windowId = execFileWithTimeout("pwsh", ["-NoProfile", "-NonInteractive", "-WindowStyle", "Hidden", "-Command", script], 1000)
Tested locally. Same return value, no visible window.
Problem
On Windows, every focus check spawns a visible
powershell.exe/pwsh.exewindow that flashes on screen before closing.Cause
src/focus.ts:101-106,getWindowsActiveWindowId()doesn't pass-WindowStyle Hidden:This runs on every notifier event. The PowerShell Operational log shows it firing every 10-30 seconds during active sessions.
Fix
Add
"-WindowStyle", "Hidden"to both calls:Tested locally. Same return value, no visible window.