A lightweight macOS menu bar application that monitors USB device connections and disconnections in real-time.
USB Monitor Menu Bar sits quietly in your macOS menu bar and keeps track of all USB device activities on your system. It provides instant notifications when devices are connected or disconnected and maintains a detailed log of all USB events.
- Real-time USB Monitoring: Tracks all USB device connections and disconnections as they happen
- Menu Bar Integration: Stays out of your way in the macOS menu bar with minimal UI footprint
- Detailed Event Log: Records timestamps, device names, manufacturers, and hardware IDs
- Desktop Notifications: Provides instant alerts when USB devices are connected or disconnected
- Configurable Settings: Toggle monitoring and notifications on/off as needed
- Visual Log Interface: Color-coded log window for easy scanning (green for connections, red for disconnections)
I have uploaded v1.0 version to releases, you can follow the instructions on the version page in order to use it correctly https://github.com/adaskar/USBMonitorMenuBar/releases
- clang -o USBMonitorMenuBar USBMonitorMenuBar.m -framework Cocoa -framework IOKit
- ./USBMonitorMenuBar
You can build and package your app using the command line tools:
clang -framework Cocoa -framework IOKit USBMonitorMenuBar.m -o USBMonitor
mkdir -p USBMonitor.app/Contents/{MacOS,Resources}
mv USBMonitor USBMonitor.app/Contents/MacOS/
cat > USBMonitor.app/Contents/Info.plist << EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleExecutable</key>
<string>USBMonitor</string>
<key>CFBundleIdentifier</key>
<string>com.adaskar.usbmonitor</string>
<key>CFBundleName</key>
<string>USBMonitor</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>
EOF
chmod +x USBMonitor.app/Contents/MacOS/USBMonitor
codesign --force --sign - USBMonitor.app
