Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Bring Cursor to FrontNew to Visual Studio Code? Get it now.
Bring Cursor to Front

Bring Cursor to Front

William Tsao

|
2 installs
| (0) | Free
Automatically brings Cursor to the front when AI finishes responding
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Bring Cursor to Front

Platform Support License

Automatically brings Cursor to the front when AI finishes responding.

Never miss when Cursor's AI completes a task! This extension uses Cursor Agent Hooks to detect when the AI agent stops, then brings the window to the foreground.

Features

  • 🔔 Auto-Focus: Cursor automatically comes to front when AI finishes responding
  • ⚡ One-Click Toggle: Enable or disable from the status bar or command palette
  • 🖥️ Cross-Platform: Works on macOS, Windows, and Linux
  • 🔧 Zero Configuration: Works out of the box

Usage

Toggle via Status Bar

Click the status bar item at the bottom right to toggle the feature on/off:

  • $(bell) Bring to Front: ON - Feature is enabled
  • $(bell-slash) Bring to Front: OFF - Feature is disabled

Toggle via Command Palette

Open the Command Palette (Cmd+Shift+P / Ctrl+Shift+P) and run:

  • Bring Cursor to Front: Toggle - Toggle on/off
  • Bring Cursor to Front: Enable - Enable the feature
  • Bring Cursor to Front: Disable - Disable the feature

After Toggling

Restart Cursor for changes to take effect. The extension modifies Cursor's hooks configuration, which requires a restart to be recognized.

Platform Support

Platform Status Method
macOS ✅ Ready AppleScript
Windows ✅ Ready PowerShell + Win32 API
Linux ✅ Ready wmctrl or xdotool

Linux Requirements

Install wmctrl or xdotool:

# Ubuntu/Debian
sudo apt install wmctrl

# Fedora
sudo dnf install wmctrl

# Arch
sudo pacman -S wmctrl

How It Works

This extension manages Cursor's Agent Hooks feature, which allows running custom scripts at specific points in the agent's lifecycle.

When enabled, the extension:

  1. Installs a platform-specific script to ~/.cursor/scripts/
  2. Adds a stop hook to ~/.cursor/hooks.json that runs the script when the AI finishes

When disabled, it removes the hook and script files.

Extension Settings

Setting Type Default Description
bringCursorToFront.enabled boolean true Enable/disable the feature

Troubleshooting

Nothing happens when AI finishes

  1. Make sure you've restarted Cursor after enabling the extension
  2. Check that ~/.cursor/hooks.json exists and contains the hook
  3. On Linux, ensure wmctrl or xdotool is installed

Linux: Window doesn't come to front

Some Linux desktop environments require additional configuration. Try installing both tools:

sudo apt install wmctrl xdotool

Windows: Script errors

If you see PowerShell execution policy errors, the extension uses -ExecutionPolicy Bypass to handle this. If issues persist, run:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Manual cleanup

If you need to manually remove the hooks:

  1. Delete ~/.cursor/scripts/bring_cursor_to_front.*
  2. Edit ~/.cursor/hooks.json and remove the bring_cursor_to_front entry
  3. Restart Cursor

Contributing

Issues and pull requests are welcome on GitHub.

License

MIT License - see LICENSE for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft