Skip to content

omar00050/AntigravityContextMenu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Antigravity Context Menu Installer

A clean, production-ready solution for adding "Open with Antigravity" to the Windows context menu for programming and code files.

This is the second version of the idea, the first being from Ahmed Fawzy >> fawzy0z 🀍.

Features

  • βœ… Code Files Only: Adds context menu entry exclusively for programming file types (no clutter on all files)
  • βœ… Folder Support: Works on folders and folder backgrounds
  • βœ… Windows 10 & 11 Compatible: Automatically adapts to your Windows version
  • βœ… Both Context Menus: Appears in both the main menu and "Show more options" (Windows 11)
  • βœ… Safe to Run Multiple Times: Can be reinstalled without issues
  • βœ… Clean Uninstaller: Completely removes all registry entries

Supported File Types

The context menu entry appears for the following programming and code file extensions:

.js .ts .jsx .tsx          # JavaScript/TypeScript
.py .php                   # Python/PHP
.html .css                 # Web
.json .xml                 # Data formats
.yml .yaml                 # YAML
.java                      # Java
.c .cpp .h                 # C/C++
.cs                        # C#
.go                        # Go
.rs                        # Rust
.sh                        # Shell scripts
.bat                       # Batch files
.ps1                       # PowerShell
.sql                       # SQL
.md                        # Markdown

Requirements

  • Windows 10 or Windows 11
  • Administrator privileges (required for registry modifications)
  • Antigravity installed at: %LOCALAPPDATA%\Programs\Antigravity\Antigravity.exe

Installation

  1. Download both .bat files:

    • install_antigravity_context_menu.bat
    • uninstall_antigravity_context_menu.bat
  2. Right-click on install_antigravity_context_menu.bat

  3. Select "Run as administrator"

  4. Wait for the installation to complete

  5. Windows Explorer will automatically restart to apply changes

If the entry doesn't appear immediately:

  1. Close all File Explorer windows
  2. Open Task Manager (Ctrl+Shift+Esc)
  3. End all "Windows Explorer" processes
  4. Restart your computer (recommended for Windows 11)

Usage

After installation, you can access "Open with Antigravity" by:

1. On Code Files

Right-click any supported code file β†’ "Open with Antigravity"

2. On Folders

Right-click any folder β†’ "Open with Antigravity"

3. Inside Folders

Right-click empty space inside any folder β†’ "Open with Antigravity"

Windows 11 Note: The entry appears in both:

  • The modern context menu (directly visible)
  • The classic menu (under "Show more options")

Uninstallation

  1. Right-click on uninstall_antigravity_context_menu.bat

  2. Select "Run as administrator"

  3. Wait for the uninstallation to complete

  4. Windows Explorer will automatically restart

The uninstaller removes:

  • All file extension entries
  • All folder entries
  • All folder background entries
  • Any legacy entries from previous installations

Technical Details

Registry Locations

The installer modifies the following registry keys:

For Code Files:

HKEY_CLASSES_ROOT\SystemFileAssociations\[extension]\shell\Antigravity

For Folders:

HKEY_CLASSES_ROOT\Directory\shell\Antigravity

For Folder Backgrounds:

HKEY_CLASSES_ROOT\Directory\Background\shell\Antigravity

What Gets Created

For each location, the installer creates:

  • Menu entry with display text "Open with Antigravity"
  • Icon reference to Antigravity.exe
  • Command to execute: Antigravity.exe with the selected file/folder path

Windows 11 Behavior

  • No "Extended" flag: Entry appears in both main and extended menus
  • With "Extended" flag: Entry appears only in "Show more options"

This installer uses no Extended flag for maximum accessibility.

Troubleshooting

"Error: This script requires Administrator privileges"

Solution: Right-click the .bat file and select "Run as administrator"

"Error: Antigravity.exe not found"

Solution: Verify Antigravity is installed at:

C:\Users\[YourUsername]\AppData\Local\Programs\Antigravity\Antigravity.exe

If installed elsewhere, edit the .bat file and change the EXE_PATH variable.

Context menu entry doesn't appear

Solution:

  1. Run the uninstaller
  2. Restart your computer
  3. Run the installer again
  4. Restart your computer again (especially important for Windows 11)

Entry appears in wrong menu (Windows 11)

Solution: This installer shows the entry in both menus. If you want it only in "Show more options", you'll need to manually add the Extended registry value.

Multiple entries appearing

Solution:

  1. Run the uninstaller
  2. Manually check for and remove any old entries via Registry Editor
  3. Run the installer again

Customization

Change the Display Text

Edit this line in the installer:

reg add "...\shell\Antigravity" /ve /t REG_SZ /d "Open with Antigravity" /f

Change "Open with Antigravity" to your preferred text.

Add More File Extensions

Add extensions to this line:

set "EXTENSIONS=.js .ts .jsx .tsx ..."

Change the Installation Path

Edit this line:

set "EXE_PATH=%LOCALAPPDATA%\Programs\Antigravity\Antigravity.exe"

Safety & Best Practices

βœ… Safe to run multiple times - Won't create duplicates βœ… Clean uninstaller - Removes only Antigravity entries βœ… No system files modified - Only registry entries βœ… Automatic Explorer restart - Changes apply immediately βœ… Administrator check - Prevents partial installations

Version History

Version 1.0

  • Initial release
  • Support for 25+ file extensions
  • Windows 10 & 11 compatibility
  • Folder and folder background support
  • Automatic Explorer restart
  • Clean uninstaller

License

This script is provided as-is for use with Antigravity. Modify as needed for your requirements.

Support

If you encounter issues:

  1. Check the Troubleshooting section
  2. Verify you're running as Administrator
  3. Ensure Antigravity is installed in the correct location
  4. Try restarting your computer

Credits

Created for use with Antigravity code editor.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors