Battery Notifier is a lightweight Windows application designed to help you manage your laptop's battery life more effectively. By monitoring the battery percentage and power status, the application provides timely notifications when your battery reaches a user-defined threshold. This helps prevent overcharging and extends the overall lifespan of your battery.
The application runs quietly in the system tray, ensuring it doesn't interfere with your workflow. You can customize the battery threshold and notification settings to suit your needs. Additionally, Battery Notifier supports custom notification sounds, allowing you to choose an alert that best grabs your attention.
Key features include:
- Real-time battery monitoring
- Customizable battery threshold for notifications
- Custom notification sounds
- System tray integration for minimal disruption
- Easy-to-use interface with settings accessible via a context menu
Battery Notifier is built using .NET 8 and leverages the NAudio library for audio playback, ensuring a smooth and reliable user experience.
- Clone the repository: git clone https://github.com/yourusername/battery-notifier.git
- Open the solution in Visual Studio.
- Build the project to restore the necessary NuGet packages.
- Run the application.
- Set the desired battery threshold using the numeric up-down control.
- Ensure notifications are enabled using the checkbox.
- Minimize the application to the system tray.
- The application will notify you when the battery reaches the specified threshold.
This application includes advertisements to support development. Ads are displayed in the notification form when the battery threshold is reached.
Contributions are welcome! Please fork the repository and submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
- Open the application.
- Use the numeric up-down control to set the desired battery threshold percentage.
- Ensure the checkbox for enabling notifications is checked.
- Minimize the application to hide it in the system tray.
- The application will continue to monitor the battery level and notify you when the threshold is reached.
- Replace the
notificationSoundPathin the code with the path to your custom sound file. - The application will play this sound when the battery threshold is reached.
Form1.cs: Main form and logic for the application.Program.cs: Entry point of the application.
- Clone the repository: git clone https://github.com/yourusername/battery-notifier.git
- Open the solution in Visual Studio.
- Build the project to restore the necessary NuGet packages.
- Follow C# coding conventions.
- Use meaningful variable and method names.
- Include comments to explain complex logic.
Currently, the application does not expose any APIs.
- Initial release with basic battery monitoring and notification features.
Replace the notificationSoundPath in the code with the path to your custom sound file.
Uncheck the checkbox for enabling notifications in the application settings.
Right-click the system tray icon and select "Exit" from the context menu.