{"id":51466059,"url":"https://github.com/ithilias/logitray","last_synced_at":"2026-07-06T11:02:03.424Z","repository":{"id":366351570,"uuid":"1275911193","full_name":"Ithilias/logitray","owner":"Ithilias","description":"Tiny Windows tray app for your Logitech wireless mouse's battery level — reads it directly over HID++ 2.0, no G HUB or Options+ required.","archived":false,"fork":false,"pushed_at":"2026-06-21T12:53:16.000Z","size":72,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-06-21T14:17:01.635Z","etag":null,"topics":["battery","battery-indicator","battery-monitor","desktop-app","hid","hidapi","hidpp","logitech","mouse","rust","system-tray","tray-icon","windows","wireless-mouse"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Ithilias.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-21T09:49:05.000Z","updated_at":"2026-06-21T12:50:11.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Ithilias/logitray","commit_stats":null,"previous_names":["ithilias/logitray"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Ithilias/logitray","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ithilias%2Flogitray","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ithilias%2Flogitray/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ithilias%2Flogitray/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ithilias%2Flogitray/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Ithilias","download_url":"https://codeload.github.com/Ithilias/logitray/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Ithilias%2Flogitray/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35187655,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-06T02:00:07.184Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["battery","battery-indicator","battery-monitor","desktop-app","hid","hidapi","hidpp","logitech","mouse","rust","system-tray","tray-icon","windows","wireless-mouse"],"created_at":"2026-07-06T11:02:02.757Z","updated_at":"2026-07-06T11:02:03.408Z","avatar_url":"https://github.com/Ithilias.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# logitray\n\nA tiny Windows tray app that shows your wireless Logitech mouse's battery level and warns you before it dies — no Logitech G HUB or Options+ required.\n\n## What it does\n\nlogitray sits in your system tray and talks to your Logitech wireless mouse directly over the HID++ protocol through its USB receiver. It listens for the receiver's notifications, so battery, charging, and connect/disconnect changes show up on the tray icon within about a second (with a periodic re-read as a backstop), and it pops a Windows notification when the battery gets low — all without any Logitech software running.\n\n## Features\n\n- Live battery level for your wireless Logitech mouse, right in the system tray\n- Two view modes: a color-coded **battery glyph**, or the **percentage as text** — switch any time from the menu\n- Color coding: green (healthy), orange (low), red (critical), blue (charging)\n- Hover the icon for the device name and exact percentage\n- Automatic low-battery notifications, with a cooldown so they don't spam you\n- Multiple devices: pick which one the tray follows\n- Manual \"Refresh now\" any time\n- Optional autostart with Windows\n- Event-driven: connect, disconnect, charging, and battery-level changes are pushed by the receiver and reflected within ~1s — no busy polling, near-zero idle USB traffic, with a periodic re-read as a backstop\n\n## Install \u0026 run\n\n1. Download `logitray.exe` from the [latest release](https://github.com/Ithilias/logitray/releases/latest).\n2. Put it anywhere you like and double-click it — it appears in the system tray (check the `^` overflow if you don't see it).\n3. (Optional) From a terminal, run `logitray.exe --once` to print the current battery level and confirm your device is detected.\n\nNo installer, no admin rights, no Logitech software needed. logitray does not start with Windows unless you enable **Start at login** from the tray menu.\n\n## In the tray\n\nRight-click the icon for the menu:\n\n- **Status line** — the selected device and its battery (e.g. `G502 X Plus: 76%`)\n- **Select Device** — choose which device the tray follows when more than one is paired\n- **Refresh now** — re-check all devices immediately instead of waiting for the backstop re-read\n- **Show percentage as text** — toggle between the battery-glyph icon and the percentage-number icon\n- **Start at login** — register/unregister autostart with Windows\n- **Exit**\n\nIcon colors: **green** ≥ 36%, **orange** 16–35%, **red** ≤ 15%, **blue** while charging.\n\n## Low-battery alerts\n\nWhen the selected device drops to or below the threshold (15% by default), logitray shows a Windows toast. To avoid nagging, it waits out a cooldown (120 minutes by default) before alerting again, and tracks each device separately.\n\n## Supported devices\n\nAny Logitech wireless device that speaks **HID++ 2.0** through a Logitech **Unifying**, **LIGHTSPEED**, or **Bolt** USB receiver. Devices report their own marketing name over HID++, so there's no large hardcoded device database to maintain — the name you see is the one your mouse reports. Battery is read via feature `0x1000`, `0x1001` (voltage, converted with a lookup table), or `0x1004`, whichever the device supports.\n\nTested against a **G502 X PLUS** over a LIGHTSPEED receiver.\n\n## Settings\n\nConfiguration lives in `%APPDATA%\\logitray\\config.toml` (created on first run):\n\n| Key | Default | Description |\n| --- | --- | --- |\n| `poll_interval_seconds` | `180` | Backstop re-read interval. Battery/charging changes are pushed via notifications; this only bounds the fallback re-read (and recovery after sleep). |\n| `low_battery_threshold` | `15` | Percent at/below which a low-battery toast fires |\n| `low_battery_cooldown_minutes` | `120` | Minimum time between repeat alerts per device |\n| `selected_device_id` | `\"\"` | Which device the tray follows (set via the menu) |\n| `autostart` | `false` | Start logitray when you log in |\n| `log_level` | `\"info\"` | Log verbosity (`error`/`warn`/`info`/`debug`/`trace`) |\n| `view_mode` | `\"icon\"` | Tray display: `icon` (battery glyph) or `text` (percentage) |\n\nEnumerated device details (which battery feature to use, the device name) are cached per device in `%APPDATA%\\logitray\\devices.toml` so cold starts can skip the slower HID++ feature enumeration. It's safe to delete — it rebuilds itself.\n\nLogs are written to `%APPDATA%\\logitray\\logitray.log` (rotated, last few kept).\n\n## Limitations\n\n- Windows only.\n- The device must be connected through a Logitech USB receiver — Bluetooth-only connections are not supported.\n- Requires an HID++ 2.0 device (essentially all modern Logitech wireless mice/keyboards).\n- For devices reporting voltage (feature `0x1001`), the percentage is an estimate from a voltage curve.\n- Coexists with Logitech G HUB / Options+ if they're installed, but neither is required.\n\n## For developers\n\nBuild from source with [Rust](https://rustup.rs/):\n\n```sh\ncargo build --release          # build\ncargo run                      # start the tray app\ncargo run -- --once            # print battery level to stdout\ncargo run -- --diag            # dump HID++ interfaces, ping results + notification probe (hardware debugging)\n```\n\nThe release binary and CI build with the **MSVC** toolchain (`x86_64-pc-windows-msvc`), which works out of the box on `windows-latest`. To build locally with the **GNU** toolchain instead, you also need a full MinGW-w64 on `PATH` (the `windows` crates invoke `dlltool`/`as`, which rustup's bundled MinGW does not fully provide).\n\nCI lives in [`.github/workflows`](.github/workflows): `pr-build` tests and builds on every push/PR, and `release-on-tag` cuts a GitHub release with the exe and a SHA256 checksum when you push a `v*.*.*` tag.\n\n## Acknowledgements\n\n- Structure and spirit modeled on [razertray](https://github.com/nuxencs/razertray).\n- HID++ protocol details informed by [Solaar](https://github.com/pwr-Solaar/Solaar) and [LGSTrayBattery](https://github.com/andyvorld/LGSTrayBattery).\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fithilias%2Flogitray","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fithilias%2Flogitray","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fithilias%2Flogitray/lists"}