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.
![Bildschirmfoto 2023-10-18 um 23 49 37](https://private-user-images.githubusercontent.com/16246095/276413980-5d370246-eb4e-482b-9048-4ec74f8aa501.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ2Nzk0ODcsIm5iZiI6MTcyNDY3OTE4NywicGF0aCI6Ii8xNjI0NjA5NS8yNzY0MTM5ODAtNWQzNzAyNDYtZWI0ZS00ODJiLTkwNDgtNGVjNzRmOGFhNTAxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDEzMzMwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTVkODUyNjkxOTNhODMxM2Q4ZTU0Nzk4ZTNhYzdiOWFjYTZmY2Y3YTJiYWVmYTJkMjNjOWVlMTBkMDQ1ZGEyNGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.74ZHCYVsVrP5caACOFqXby4vjcs4LssBj_cjOatpp8s)
-
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.