The best way to control Claude Code, Codex and more from any computer or phone

main
ts 15 lines 715 Bytes
Raw
1 import * as Electron from "electron";
2
3 const WINDOW_ANIMATIONS_DISABLED = "wm-window-animations-disabled";
4
5 /** Show capture feedback without Aura's extra 200 ms fade/scale on transparent windows. */
6 export function showWindowsCaptureOverlay(window: Electron.BaseWindow): void {
7 // Show() reads the switch synchronously; restore it before other windows or animations can be affected.
8 const alreadyDisabled = Electron.app.commandLine.hasSwitch(WINDOW_ANIMATIONS_DISABLED);
9 if (!alreadyDisabled) Electron.app.commandLine.appendSwitch(WINDOW_ANIMATIONS_DISABLED);
10 try {
11 window.showInactive();
12 } finally {
13 if (!alreadyDisabled) Electron.app.commandLine.removeSwitch(WINDOW_ANIMATIONS_DISABLED);
14 }
15 }