A lightweight macOS menu bar app that automatically turns off WiFi and Bluetooth when your Mac goes to sleep, then reconnects to your favorite devices when it wakes up.
Minimize battery drain when your MacBook lid is closed.
- 🔋 Auto-disable radios on sleep - WiFi and Bluetooth turn off when lid closes
- 🔌 Smart reconnection - Auto-reconnect to favorite devices or most recent connections on wake
- ⭐ Favorite devices - Mark your preferred Bluetooth devices for auto-reconnection
- 📡 WiFi management - Automatically reconnect to your last WiFi network
- 🚀 Launch at login - One-click toggle in the menu to start automatically at login
- 🔄 Auto-updates - Automatic update checking with one-click downloads
- 🪶 Lightweight - Pure Python, minimal resource usage (~20MB RAM)
- 🎯 Menu bar interface - Simple, clean UI with status indicators
By default, macOS keeps WiFi and Bluetooth partially active even when sleeping, causing significant battery drain. This app ensures true deep sleep by completely disabling radios when your lid closes.
Typical battery savings: 1-2% overnight vs 10-20% without it.
⚡️ SleepWatch
├─ Status: WiFi: On | BT: On | MyNetwork
├─ ────────────────────────
├─ WiFi Control
│ ├─ ✓ Disable WiFi on Sleep
│ └─ ✓ Auto-reconnect WiFi
├─ Bluetooth Control
│ ├─ ✓ Disable Bluetooth on Sleep
│ └─ ✓ Auto-reconnect Bluetooth
├─ Favorite Devices
│ ├─ ★ AirPods Pro
│ ├─ ☆ Magic Mouse
│ └─ ★ Keyboard
├─ Reconnect Mode
│ ├─ ✓ Favorites Only
│ └─ Most Recent
├─ ✓ Launch at Login
├─ Hide Menu Bar Icon
├─ ──────────────────────
├─ Version 1.0.0
├─ Check for Updates...
├─ Refresh
└─ Quit SleepWatch
- Download the latest release: SleepWatch.zip
- Unzip the downloaded file
- Move
SleepWatch.appto your/Applicationsfolder - Launch SleepWatch from Applications
- Grant permissions when macOS prompts for Accessibility access
That's it! The app will appear in your menu bar as a black lightning bolt icon
Before installing, you need blueutil for Bluetooth control:
# Install via Homebrew
brew install blueutilMethod 1: Built-in Toggle (Easiest)
Once the app is in /Applications:
- Launch SleepWatch
- Click the lightning bolt icon in menu bar
- Click "Launch at Login" to enable
- Done! ✓ The checkmark shows it's enabled
To disable, just click it again.
Method 2: Automated Installer
# Download the repo, then run:
./install-app.shThis will:
- Copy the app to
/Applications - Add to login items automatically
- Install dependencies (blueutil)
- Launch the app
Method 3: Manual via System Settings
- Move
SleepWatch.appto/Applications - Go to System Settings → General → Login Items
- Click the + button under "Open at Login"
- Select SleepWatch from Applications folder
If you prefer to run from source:
# Clone the repository
git clone https://github.com/metacometdave/SleepWatch.git
cd SleepWatch
# Install dependencies
brew install blueutil
# Create virtual environment and install Python packages
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# Run the app
python sleepwatch.py- Launch the app - Click the lightning bolt icon in your menu bar
- Enable controls - Check "Disable WiFi on Sleep" and "Disable Bluetooth on Sleep"
- Pick favorites - Click on device names to toggle ★ (favorite) status
- Choose mode:
- Favorites Only - Reconnect only to starred devices
- Most Recent - Reconnect to whatever was connected before sleep
| Option | Description |
|---|---|
| Disable WiFi on Sleep | Turn off WiFi when lid closes |
| Auto-reconnect WiFi | Reconnect to last network on wake |
| Disable Bluetooth on Sleep | Turn off Bluetooth when lid closes |
| Auto-reconnect Bluetooth | Reconnect to devices on wake |
| ★ Device Name | Starred = favorite (will auto-reconnect) |
| ☆ Device Name | Not a favorite (click to star) |
Settings are stored in ~/.sleepwatch.json:
{
"wifi_enabled": true,
"bluetooth_enabled": true,
"auto_reconnect_wifi": true,
"auto_reconnect_bluetooth": true,
"favorite_devices": ["00:1A:7D:DA:71:13", "00:1B:3F:22:44:55"],
"last_wifi_network": "MyNetwork",
"reconnect_mode": "favorites"
}You can edit this file directly if needed.
- Sleep Detection - Uses macOS
NSWorkspaceWillSleepNotificationto detect when lid closes - Radio Control - Calls
blueutilandnetworksetupto toggle WiFi/Bluetooth - Wake Handling - Uses
NSWorkspaceDidWakeNotificationto detect wake events - Smart Reconnection - Restores WiFi and reconnects to favorite Bluetooth devices
| Feature | SleepWatch | Bluesnooze | SleepWatcher Scripts |
|---|---|---|---|
| WiFi Control | ✅ | ❌ | ✅ (manual) |
| Bluetooth Control | ✅ | ✅ | ✅ (manual) |
| Favorite Devices | ✅ | ❌ | ❌ |
| Smart Reconnection | ✅ | ✅ | |
| Menu Bar UI | ✅ | ✅ | ❌ |
| In-App Settings | ✅ | ❌ | ❌ |
| Hide Icon | ✅ | ✅ | ❌ |
| Launch at Login Toggle | ✅ | ❌ (manual) | ❌ |
| Open Source | ✅ | ✅ | ✅ |
| Language | Python | Swift | Shell |
| Homebrew Install | ✅ | N/A |
# Check if blueutil is installed
which blueutil
# If not, install it
brew install blueutil
# Try running with verbose output
python3 sleepwatch.py- Make sure "Auto-reconnect Bluetooth" is checked
- Verify devices are starred (★) if using "Favorites Only" mode
- Check that devices are actually paired in System Settings
- Check that "Disable WiFi on Sleep" is enabled
- Your WiFi interface might not be
en0(rare) - check with:networksetup -listallhardwareports
SleepWatch needs accessibility permissions on newer macOS versions:
- Go to System Settings → Privacy & Security → Accessibility
- Add Terminal or Python to the allowed apps
sleepwatch/
├── sleepwatch.py # Main menu bar app
├── bluetooth_manager.py # Bluetooth device control
├── wifi_manager.py # WiFi network control
├── sleep_watcher.py # Sleep/wake event detection
├── config.py # Configuration management
├── requirements.txt # Python dependencies
├── install.sh # Auto-start installer
└── README.md
# Create virtual environment
python3 -m venv venv
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
# Run
python sleepwatch.py# Install py2app
pip3 install py2app
# Create standalone .app bundle
python3 setup.py py2appContributions are welcome! Please:
- Fork the repo
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Merge Request
MIT License - see LICENSE file for details.
Built with:
- rumps - Ridiculously Uncomplicated macOS Python Statusbar apps
- blueutil - CLI for Bluetooth on macOS
- macOS
networksetup- Built-in WiFi management
Inspired by Bluesnooze but extended to handle WiFi and favorite device management.
Yes! Two ways:
Option 1: Use the menu (easiest)
- Click the lightning bolt icon
- Click "Hide Menu Bar Icon"
- Confirm
Option 2: Terminal command
defaults write com.sleepwatch.app hideIcon -bool true && killall SleepWatchThe app continues running in the background even when hidden.
Run this command in Terminal:
defaults delete com.sleepwatch.app hideIcon && killall SleepWatchWhen you next relaunch the application, it should appear in the menu bar.
SleepWatch uses system-level APIs to control WiFi and Bluetooth which requires special permissions that App Store apps cannot request. However, the app is open source and the release builds can be notarized by Apple for security.
Yes! Use the menu to star (★) your favorite devices. Set the reconnect mode to "Favorites Only" and only starred devices will reconnect on wake.
Yes! Any Bluetooth device that pairs with your Mac can be managed by SleepWatch.
SleepWatch automatically checks for updates on startup (you'll get a notification if a new version is available). You can also manually check via the menu: Check for Updates...
Updates are downloaded from GitHub Releases. The app will open your browser to the download page.
Contributions are welcome! Whether it's:
- 🐛 Bug fixes
- ✨ New features
- 📝 Documentation improvements
- 💡 Ideas and suggestions
Please read CONTRIBUTING.md for details on how to get started.
- 🐛 Bug reports: GitHub Issues
- 💬 Questions: Discussions
- ⭐ Star the repo if you find it useful!
Made with 🌙 to save your battery life