Skip to content
This repository was archived by the owner on Jul 24, 2026. It is now read-only.

feat: notify when battery drops below configurable threshold - #17

Merged
trin94 merged 5 commits into
mainfrom
feat/low-battery-notification
Jul 18, 2026
Merged

feat: notify when battery drops below configurable threshold#17
trin94 merged 5 commits into
mainfrom
feat/low-battery-notification

Conversation

@trin94

@trin94 trin94 commented Jul 18, 2026

Copy link
Copy Markdown
Owner

Notify when the mouse battery level drops to or below a configurable threshold. Closes #2.

trin94 added 5 commits July 18, 2026 00:31
The low battery point was hardcoded at 20 percent. What counts as
low really depends on the mouse and on personal taste, so let users
pick the threshold themselves in the widget settings.
A dying mouse is easy to miss until it stops working. Warning once
when the level drops below the configured threshold leaves enough
time to put it on the charger. The warning is latched so a sleeping
or reconnecting mouse does not nag again, and the state found at
startup stays silent so a shell reload does not repeat old warnings.
A single bar made it hard to tell how close the battery is to the
low battery warning point. Splitting the bar at the threshold makes
that visible at a glance. The bar is also hidden when no supported
mouse is present, since showing a level without a device would be
misleading.
The settings page was a flat list under one big title. Splitting it
into labeled sections makes it easier to scan as options grow. The new
GitHub link gives users a quick way to reach the project page. It pulls
the homepage from plugin.json so the URL only lives in one place.
Notifications only worked while the widget was placed in the bar.
Readings that jitter around the threshold or briefly touch a
charger could announce over and over, and there was no setting to
turn the announcements off. Default values were also repeated
across files, so they could drift apart.
@trin94
trin94 merged commit ee20d7b into main Jul 18, 2026
1 check passed
@trin94
trin94 deleted the feat/low-battery-notification branch July 18, 2026 00:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notify if battery percentage drops below configurable threshold

1 participant