Skip to content

Instantly share code, notes, and snippets.

@w568w
Last active December 24, 2025 16:51
Show Gist options
  • Select an option

  • Save w568w/0999f61e9a646feac3f5a46aaa17e1d1 to your computer and use it in GitHub Desktop.

Select an option

Save w568w/0999f61e9a646feac3f5a46aaa17e1d1 to your computer and use it in GitHub Desktop.
Antigravity workaround
#!/bin/bash
UNIT_NAME="antigravity-$(date +%s)"
APP_BIN="/usr/bin/antigravity --verbose"
TRIGGER="Extension host with pid"
echo "[*] Start as: $UNIT_NAME"
systemd-run --user \
--scope \
--unit="$UNIT_NAME" \
--property=KillMode=control-group \
/bin/bash -c "exec prlimit --core=0 $APP_BIN 2>&1 | systemd-cat --identifier=$UNIT_NAME" &
journalctl --user --identifier="$UNIT_NAME" --follow | \
grep --line-buffered --max-count=1 "$TRIGGER" && \
systemctl --user kill --signal=SIGKILL "$UNIT_NAME.scope"
echo "[*] Remaining processes are killed."
@0blivi0nis
Copy link

Thank you! This is perfect and fixes the high cpu and leftover process issue. Modified the exec for the app to point to the script and it works perfectly

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment