Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crec0/razer-systray-battery
Shows battery remaining for your razer wireless mice. May work on other accessories. (Requires tiny modification of battery.py) I use it with Razer DaV3 pro.
https://github.com/crec0/razer-systray-battery
Last synced: about 1 month ago
JSON representation
Shows battery remaining for your razer wireless mice. May work on other accessories. (Requires tiny modification of battery.py) I use it with Razer DaV3 pro.
- Host: GitHub
- URL: https://github.com/crec0/razer-systray-battery
- Owner: Crec0
- License: gpl-3.0
- Created: 2024-08-25T04:53:27.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2024-09-07T00:54:24.000Z (2 months ago)
- Last Synced: 2024-09-07T03:27:18.398Z (2 months ago)
- Language: Python
- Size: 115 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Razer systray battery
## Introduction
This is a HEAVILY modified (basically a rewrite) version of the [script by Tung Yu Hsu](https://github.com/hsutungyu/razer-mouse-battery-windows)
If you want to use the original script, please go to the link above.## Changes made
- Remove notification thing
- Add system tray icon instead
- Add battery percentage to the icon which updates every minute (configurable but need to recompile)
- Battery percentage on icon is dynamic created using Pillow
- Icon color changes based on battery %
- <10 - Red (#7bed9f)
- \>10 - Green (#ff6b6b)
- Charging - Blue (#0abde3)
- Right click menu
- Manual refresh button - Refreshes the battery percentage[^1]
- Exit button - Kills the script
- Uses py2exe to create a standalone executable, which can be thrown into the startup folder
- Removed the requirement of using Task Schedular. Not my cup of tea.## To compile
- Install the requirements using `pip install -r requirements.txt`
- Run `python3 setup.py`
- The executable will be in the `dist` folder.
- Throw the executable into the startup folder to run on startup## Images
![Tray](./images/title-tray.png)
![Charging](./images/charging.png)
![Menu](./images/menu.png)
[^1]: When mouse goes to sleep, the battery goes to 0%. Unsure why there's no error codes as there are in libusb. Which could have been a better way to handle disconnects. We can either wait for time to hit or manually refresh the battery percentage.