MacAlert is a macOS app that helps you preventing theft, by keeping watch over the power connection status and starting an alarm, when disconnected unintentionally. It was used as small security measure during travel and work in public spaces, with power plugged in.
MacAlert is a SwiftUI-based macOS application that monitors your power adapter's status and provides audio alerts when it's disconnected. This can be particularly useful to ensure that your Mac remains powered when needed or to alert you in case of unintentional disconnection.
-
Real-time monitoring of power adapter connection.
-
Customizable audio alerts.
-
Ability to confirm unplugging intentions.
-
Easy-to-use user interface.
-
Future roll-out with Apple Developer Membership is planned!
- Clone or download the MacAlert repository to your Mac.
- Open the Xcode project in the repository.
- Build and run the project in Xcode.
-
Upon running MacAlert, you will see a simple interface indicating the current status of your power adapter:
- "Power Adapter Connected" when the adapter is connected.
- "Power Adapter Disconnected" when the adapter is disconnected.
-
To play an audio alert, click the "Play Sound" button. You can stop the sound by clicking "Stop Sound."
-
If the power adapter is disconnected, MacAlert will display a confirmation dialog asking if you intentionally unplugged the power. You can confirm this intention by clicking "Yes."
-
If you do not confirm, MacAlert will play an alert sound after a short delay.
If you'd like to contribute to MacAlert, feel free to open issues, submit pull requests, or provide suggestions to help improve the application. Your contributions are highly appreciated.
MacAlert is released under the GNU General Public License v3.0. You are free to use, modify, and distribute this software as long as you comply with the terms of the license. See the LICENSE file for more details.
Note: MacAlert uses IOKit and AVFoundation frameworks to monitor power status and play audio alerts. Make sure to grant necessary permissions for the app to function properly.