
Antigravity-IDE-WindowSize – Persist Google Antigravity Window Size
Cross-platform utility to persist and restore Google Antigravity window geometry across launches.
以下正文同步自 Hacker News 最新,版权归原站所有,已转换为易读排版。
Cross-platform utility to persist and restore Google Antigravity window geometry across launches.
Overview • How It Works • Features • Quick Start • CLI Reference • Restoration • Author
By default, Google Antigravity resets its window to 1400×900 on launch. This utility modifies dist/utils.js inside app.asar to automatically persist:
Runs standalone via Python 3 with zero external dependencies.
flowchart LR A["🔍 Detect App"] --> B["💾 Backup app.asar"] --> C["⚡ Inject Persistence"] --> D["🔨 Rebuild & Sign"] --> E["🚀 Auto-Restore"]
Loading
Auto-detects Antigravity on macOS, Windows, or Linux.
Backs up original app.asar (app.asar.orig).
Injects debounced window geometry handlers into dist/utils.js.
Restores your exact window layout on every launch.
✨ Features
🖥️ Multi-Monitor Safe: If a display is disconnected, the window shifts safely to an active screen.
⏱️ Debounced Saving: Geometry writes to native app_storage.json without lag (250ms debounce).
🛡️ Reversible: Master backup created automatically before patching. Revert anytime with --restore.
🔏 Platform Compliant: Handles macOS codesign/ElectronAsarIntegrity, Windows paths, and Linux permissions.
🚀 Quick Start
Run from your terminal (use python on Windows, python3 on macOS/Linux):
Check current status
python3 patch_antigravity_window.py --status
Apply the patch (prompts if Antigravity is running)
python3 patch_antigravity_window.py
Or apply and close Antigravity automatically:
python3 patch_antigravity_window.py --kill
Tip
Option Argument Description
(none) — Applies the persistence patch to the detected installation.
--status — Checks if the patch is active on app.asar.
--restore, --undo — Restores the stock factory app.asar from backup.
--kill — Terminates Antigravity if currently running before patching.
--app <path> Custom path to Antigravity folder, executable, or app.asar.
🔄 Restoring Factory State
To revert Antigravity back to stock factory condition at any time:
python3 patch_antigravity_window.py --restore
(On Windows, run python patch_antigravity_window.py --restore or .\run.bat --restore)
When Google updates Antigravity, the updater overwrites app.asar. Simply re-run this script to reapply persistence.
正文由 探How 从来源站点 RSS 同步,内容未经改写;遇到排版缺失或需要图片、视频时请以原文为准。