This is a very simple tool that runs in the background and notifies you via a tray notification and beeps when your Razer mouse/keyboard battery is low (and possibly other devices that are listed via Razer Synapse 3).
- Checks battery level of the Razer device and notifies you when it is low
- If you lock your PC, it will notify you at a higher battery percentage so you can prepare earlier
- Python >=3.9 or just download the precompiled Windows executable file
- It uses the Razer Synapse 3 tool which always runs in the background and writes log files. This simple tool watches the log files for battery status changes.
SIMPLE USAGE: Skip to the Usage via Windows binary section if you want to use the precompiled Windows executable file
-
Clone the repository:
git clone https://github.com/Elehiggle/SimpleRazerBatteryNotification.git cd SimpleRazerBatteryNotification
-
Install the required dependencies:
pip3 install -r requirements.txt
or alternatively:
python3 -m pip install Windows-Toasts file-read-backwards
-
Set the following environment variables with your own values:
Parameter | Description |
---|---|
BATTERY_LEVEL_ALERT_THRESHOLD |
Battery % where you would like to get notified. Default: "5" |
BATTERY_LEVEL_ALERT_THRESHOLD_LOCKED |
Battery % where you would like to get notified when you lock your PC. Default: "30" |
Run the script:
python3 main.py
Simply run the executable file which you can download here (attention: Windows SmartScreen defender may raise an alert, this is normal since this is an unknown tool). It will silently run in the background and notify you when your Razer device battery is low via notifications and beeps at certain thresholds. Copy the file into your startup folder at %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup to run it automatically on startup. It will use the default variables (5% and 30% for when the PC is locked)
This tool was only meant for private use for my Razer Viper V2 Pro wireless mouse. It may not work if you have multiple wireless Razer devices. In this case, let me know, and I may fix it
Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.
This project is licensed under the MIT License.