A Raycast extension that provides seamless control over macOS Screen Mirroring directly from your command palette. Discover available displays and toggle screen mirroring on/off with ease.
- 🔍 Auto-Discovery: Automatically finds all available screen mirroring displays
- 🎯 One-Click Toggle: Start or stop mirroring to any display with a single action
- 🟢 Visual Status: Green indicators show which displays are currently mirroring
- 💾 Persistent Cache: Remembers discovered displays between sessions
- ⚡ Fast Access: Control screen mirroring without opening Control Center manually
⚠️ IMPORTANT: This extension requires Hammerspoon to be installed and running on your Mac. Without Hammerspoon, the extension will not function.
- Hammerspoon: Must be installed and running on your Mac
- Download from hammerspoon.org
- Launch Hammerspoon and ensure it's running in the background
- Accessibility Permissions: Required for interacting with Control Center
- Go to System Preferences → Security & Privacy → Privacy → Accessibility
- Add and enable Hammerspoon
- Install this extension through Raycast Store or manually
- Install Hammerspoon from hammerspoon.org
- Launch Hammerspoon and grant accessibility permissions
- Run the extension and click "Refresh Displays" to discover available screens
- Open the extension: Type "Screen Mirroring" in Raycast
- Refresh displays: Click "Refresh Displays" to scan for available screens
- Toggle mirroring:
- Click "Start Mirroring" on any available display to begin mirroring
- Click "Stop Mirroring" on active displays to stop mirroring
- Visual feedback:
- 🟢 Green circle = Currently mirroring
- 🖥️ Monitor icon = Available display
This extension uses a unique hybrid architecture:
- UI Layer: React components with Raycast API
- Bridge Layer: TypeScript utilities that generate and execute Lua scripts
- Automation Layer: Lua scripts interact with macOS via Hammerspoon
The flow: TypeScript → AppleScript → Hammerspoon → Lua → Control Center
# Install dependencies
npm install
# Start development mode
npm run dev
# Build for production
npm run build
# Lint code
npm run lint
Extension not working?
- Ensure Hammerspoon is running (check menu bar)
- Verify accessibility permissions are granted
- Try refreshing displays if none appear
No displays found?
- Check that AirPlay/screen mirroring capable devices are available
- Ensure your Mac supports screen mirroring
- Make sure target devices are on the same network