Last active
July 8, 2026 10:37
-
-
Save w568w/0999f61e9a646feac3f5a46aaa17e1d1 to your computer and use it in GitHub Desktop.
Antigravity workaround
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| readonly UNIT_NAME="antigravity-$(date +%s)" | |
| readonly APP_BIN="/usr/bin/antigravity --verbose" | |
| readonly TRIGGER="Lifecycle#onWillShutdown - end 'antigravityAnalytics'" | |
| 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." |
A version of fish shell and alias
codetoantigravity:function code --wraps=antigravity --description 'alias code=antigravity' set -l UNIT_NAME "antigravity-"(date +%s) set -l APP_BIN "/usr/bin/antigravity --verbose" set -l TRIGGER "Lifecycle#onWillShutdown - end 'antigravityAnalytics'" set -l ARGV $argv begin systemd-run --user --scope --unit="$UNIT_NAME" --property=KillMode=control-group \ /bin/bash -c "exec prlimit --core=0 $APP_BIN $argv 2>&1 | systemd-cat --identifier=$UNIT_NAME" & disown fish -c " journalctl --user --identifier=$UNIT_NAME --follow | \ grep --line-buffered --max-count=1 $TRIGGER >/dev/null 2>&1; and \ systemctl --user kill --signal=SIGKILL $UNIT_NAME.scope " & disown end >/dev/null 2>&1 end
works perfectly! Thanks!
Is this a fix for the problem which antigravity fills the disk space ?
if yes how can i use it ?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@topmask here you go zsh version of the original Antigravity workaround