Magic Warnings is a lightweight macOS app that monitors the battery levels of your Apple Magic Mouse, Trackpad, and Keyboard.
Key features include:
- Supports monitoring multiple Apple devices simultaneously, ensuring that you are notified for all connected devices.
- Displays a warning notification if the battery of any device drops below 20%.
- Battery levels are checked automatically every 10 minutes.
- Notifications are displayed every 3 hours if the battery remains below 20%.
To manually install Magic Warnings on your system:
- Download the app from the releases section.
- Copy the
Magic Warnings.app
file to your/Applications
folder (or your preferred location). - Remove the quarantine flag that macOS adds to files downloaded from the internet. This is necessary to allow the app to run:
xattr -d com.apple.quarantine Magic\ Warnings.app
- Launch the app.
- In System Settings under Notifications, enable notifications for the
Magic Warnings
app: - Optional: configure your focus mode to allow messages to be displayed even when in
Work
mode. ]
You can download the latest version of the app from the Releases section of this repository. Simply download the .zip
file, extract it, and follow the steps in the Manual Installation section above.
To ensure Magic Warnings runs periodically, you can set up a Launch Agent to trigger the app in the background.
- Download
org.alberti42.magic-warning-launcher.plist
and place it in your~/Library/LaunchAgents/
directory. - Modify the
ProgramArguments
in the.plist
file to reflect the actual location of theMagic Warnings.app
:<key>ProgramArguments</key> <array> <string>/Applications/Magic Warnings.app/Contents/MacOS/applet</string> </array>
- Load the Launch Agent using the following Terminal command:
This will ensure the app runs periodically to monitor the battery status of your devices.
launchctl load ~/Library/LaunchAgents/org.alberti42.magic-warning-launcher.plist
If you'd like to customize the behavior of Magic Warnings, you can modify the following properties in the script:
- Navigate to the folder where the app is installed (e.g.,
/Applications
). - Open the following file in a script editor (e.g., AppleScript Editor):
Magic Warnings.app/Contents/Resources/Scripts/main.scpt
- Modify the following properties to suit your preferences:
-- Disable warnings before so many hours have passed since the last warning message property disableWarningBeforeSoManyHoursHavePassed : 3 -- Define the threshold for battery warnings property threshold : 20
- disableWarningBeforeSoManyHoursHavePassed: Set the number of hours to wait before sending a repeated low battery warning.
- threshold: Set the battery percentage threshold below which the warning will be triggered (default is 20%).
- Save the changes, and relaunch the app for the new settings to take effect.
If you find Magic Warnings useful and would like to support its development, consider buying me a coffee!
- Author: Andrea Alberti
- GitHub Profile: alberti42
- Donations:
Feel free to contribute to the development of Magic Warnings or report any issues in the GitHub repository.