{"id":51294480,"url":"https://github.com/cafca/mxbattery","last_synced_at":"2026-06-30T13:02:46.741Z","repository":{"id":356589123,"uuid":"1233093459","full_name":"cafca/mxbattery","owner":"cafca","description":"Logitech MX Master 3 battery indicator and notifications for macOS","archived":false,"fork":false,"pushed_at":"2026-05-08T19:01:51.000Z","size":144,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-08T20:18:33.063Z","etag":null,"topics":[],"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/cafca.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-05-08T15:29:19.000Z","updated_at":"2026-05-08T19:01:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/cafca/mxbattery","commit_stats":null,"previous_names":["cafca/mxbattery"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/cafca/mxbattery","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafca%2Fmxbattery","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafca%2Fmxbattery/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafca%2Fmxbattery/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafca%2Fmxbattery/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cafca","download_url":"https://codeload.github.com/cafca/mxbattery/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cafca%2Fmxbattery/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34967642,"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-06-30T02:00:05.919Z","response_time":92,"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":[],"created_at":"2026-06-30T13:02:45.928Z","updated_at":"2026-06-30T13:02:46.728Z","avatar_url":"https://github.com/cafca.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MXBattery\n\nThe Logitech MX Master 3 is a fantastic mouse but I was surprised once too often by the battery suddenly being empty. Curiously, I could see the battery level in the list of connected Bluetooth devices, although that number also seemed off sometimes. \n\nThis is a small utility, which shows a macOS notification, by default when battery drops to 20% and another one at 5%. It also adds a menu bar icon showing the battery percentage, which can also be disabled.\n\n![CI](https://github.com/cafca/mxbattery/actions/workflows/ci.yml/badge.svg)\n\n## Usage\n\n### Install\n\n```bash\ngit clone https://github.com/cafca/mxbattery\ncd mxbattery\n./tools/make-app.sh\nopen target/release/MXBattery.app\n```\n\nThe first launch prompts for Bluetooth and (on the first notification) Notifications permissions. Approve both.\n\n### Configure\n\nClick the menu bar icon → **Preferences…**, or edit `~/Library/Application Support/MXBattery/config.toml` directly:\n\n```toml\nschema_version = 1\n\n[device]\nmode = \"any-mx\"   # specific | any-mx | any-logitech\n# identifier = \"798C4CBB-…\"   # required when mode = \"specific\"\n\n[thresholds]\nwarn = 20              # %; notification fires once per day below this\ncritical = 5           # %; notification re-fires every critical_period below this\nrearm_hysteresis = 5   # %; battery must rise this far above a threshold to re-arm\nwarn_enabled = true\ncritical_enabled = true\n\n[cadence]\nwarn_period = \"24h\"\ncritical_period = \"30m\"\n\n[menubar]\nenabled = true\n\n[autostart]\nenabled = false\n```\n\nEdits to the file are picked up by the running daemon within ~1 s via FSEvents — no restart needed.\n\n### CLI\n\n```\nmxbattery                     run the daemon (used by launchd; can also be invoked directly)\nmxbattery prefs               open or focus the preferences window\nmxbattery read                print the last recorded battery + charging state\nmxbattery install \u003cAPP\u003e       install the LaunchAgent (pass the absolute path to MXBattery.app)\nmxbattery uninstall           remove the LaunchAgent\nmxbattery uninstall --purge   also delete config + state in ~/Library/Application Support/MXBattery\n```\n\n### Supported devices\n\nAny Logitech BLE peripheral that exposes the standard Battery Service (`0x180F`) and the Logitech vendor GATT service (`00010000-0000-1000-8000-011F2000046D`). Confirmed working on the **MX Master 3 Mac**. Other MX-series devices should work; please open an issue if yours does not. Unifying-receiver devices are out of scope.\n\n## Contributing\n\nContributions are welcome — but **please open an issue first** so we can agree on scope before any code is written. Drive-by PRs without prior discussion will likely be closed.\n\nWhen filing a bug, please include:\n\n- Your macOS version and Mac model.\n- Device name (and firmware version if you know it).\n- Daemon logs covering the issue, with `MXBATTERY_LOG=debug` set.\n\nHow to capture logs depends on how the daemon is running:\n\n- **Installed via `mxbattery install` (launchd):** the agent writes to `~/Library/Application\\ Support/MXBattery/daemon.log` and `daemon.err.log`. Set `EnvironmentVariables` → `MXBATTERY_LOG=debug` in `~/Library/LaunchAgents/com.vincentahrend.mxbattery-app.plist` and reload with `launchctl kickstart -k gui/$UID/com.vincentahrend.mxbattery-app`. Then tail `daemon.err.log`.\n- **Running directly (terminal or `open`):** there is no log file by default — logs go to stderr. Capture with:\n\n  ```bash\n  killall mxbattery 2\u003e/dev/null\n  MXBATTERY_LOG=debug open --stderr /tmp/mxb.err target/release/MXBattery.app\n  tail -F /tmp/mxb.err\n  ```\n\n## License\n\n[MIT](LICENSE.md). © 2026 Vincent Ahrend.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcafca%2Fmxbattery","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcafca%2Fmxbattery","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcafca%2Fmxbattery/lists"}