Ethernet Connection Status
A native macOS menu bar app that monitors your ethernet connection status in real-time.
Features
- Real-time Ethernet Monitoring: Displays current ethernet connection status in the menu bar
- Dual Display Modes: Toggle between text ("Ethernet") or custom RJ45 port icon
- Status Indication: Brightness changes based on connection (bright = connected, dim = disconnected)
- Native macOS Design: SwiftUI-based settings with native macOS styling
- Menu Bar Only: Runs as a menu bar-only app (no dock icon)
Installation
Option 1: Homebrew (Recommended)
brew tap montanaflynn/EthernetConnectionStatus https://github.com/montanaflynn/EthernetConnectionStatus brew install --cask ethernet-connection-status
The Homebrew installation automatically handles the quarantine attribute removal for you.
Option 2: Manual Installation
- Download the latest release ZIP from GitHub Releases
- Extract the ZIP file
- Remove the quarantine attribute (required for unsigned apps):
Replace
xattr -cr "/path/to/Ethernet Connection Status.app"/path/to/with the actual location of the extracted app - Drag the app to your Applications folder
- Launch the app - it will appear in your menu bar
Note: This app is unsigned, so macOS will block it by default. The xattr command removes the quarantine flag that prevents unsigned apps from opening.
Requirements
- macOS 13.0 (Ventura) or later
- Xcode 15.0+ for building from source
Building
From Xcode
- Open
EthernetConnectionStatus.xcodeproj - Select the "EthernetConnectionStatus" scheme
- Build and run (⌘R)
From Command Line
xcodebuild clean build \ -project EthernetConnectionStatus.xcodeproj \ -scheme EthernetConnectionStatus \ -configuration Release
CI/CD
This project includes GitHub Actions for continuous integration:
- Build verification on every push and pull request
- macOS latest runner for testing
- Automated builds with artifact upload
See .github/workflows/build.yml for configuration.
Adding Tests
To add unit tests to this project:
- Open the project in Xcode
- Go to File → New → Target
- Select "Unit Testing Bundle" under macOS
- Name it "EthernetConnectionStatusTests"
- Add the test file
NetworkMonitorTests.swiftto the test target - Run tests with ⌘U
The test file is already included in the repository and contains tests for:
- NetworkMonitor initialization
- Network interface detection
- Start/stop cycles
Architecture
- MacMenuBarApp.swift: Main app entry point and AppDelegate
- NetworkMonitor.swift: Monitors network interfaces using SystemConfiguration framework
- EthernetIcon.swift: Custom RJ45 ethernet port icon drawing
- SettingsView.swift: SwiftUI settings interface
Settings
Click the menu bar item to access settings:
- Display mode: Choose between Text or Icon display
- Brightness indicator: Shows connection status
How It Works
The app uses the SystemConfiguration framework to monitor network interfaces:
- Detects ethernet interfaces (en1+, bridge devices)
- Polls every 5 seconds for reliable detection
- Posts notifications when status changes
- Updates menu bar display accordingly
License
MIT License - feel free to modify and distribute.
Compatibility
| macOS Version | Supported |
|---|---|
| Ventura (13.x) | ✅ Yes |
| Sonoma (14.x) | ✅ Yes |
| Sequoia (15.x) | ✅ Yes |
| Future versions | ✅ Expected |
| Monterey (12.x) and earlier | ❌ No |