Skip to content

[global] power: add native battery alerts and Hub settings - #354

Merged
neur0map merged 3 commits into
Ryoku-dev:unstable-devfrom
Sipper1236:feature/battery-alerts-hub
Oct 12, 2026
Merged

neur0map merged 3 commits into
Ryoku-dev:unstable-devfrom
Sipper1236:feature/battery-alerts-hub

Conversation

@Sipper1236

@Sipper1236 Sipper1236 commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Low-battery alerts now run as a native shell service across every bar style. Win+, → Graphics & Power → Battery exposes a master enable switch, independent warning and critical switches, editable percentages, and a Test notification action. Users can choose warning-only, critical-only, both, or neither; both levels default to enabled. The Test message reflects which levels are enabled. Defaults are 25% and 10%; the daemon validates and persists the settings, including requiring critical below warning.

The service sends “Battery low” and “Battery critical” through the normal notification system, respects Do Not Disturb, and emits each level once per discharge session. AC reconnect resets the session; startup below critical sends only the critical alert. Successful delivery consumes an alert, while failures remain eligible for retry. The existing battery indicator needs no extra widget. Python's separate low/critical notifications are replaced by this service; its full-charge notification remains.

The Battery settings card is available even without hardware charge-limit controls. A dedicated native IPC target avoids collisions with the community add-on. Users with that add-on should disable its alerts when adopting the built-in service to avoid duplicate reminders.

Validation:

  • Shell daemon: all 566 tests pass; go vet and go build pass.
  • Native offscreen QML simulation verifies default/custom thresholds, critical startup, charger reset, disabled alerts, deduplication, Test delivery, and failed delivery retry, warning-only, critical-only, both-disabled, and the matching Test messages; notify-send is mocked.
  • Isolated Hub control probe verifies input bounds and setting/RPC acknowledgment handling.
  • Every Hub section loads in the existing offscreen page probe.
  • Full shell and Hub QML lint, delivery, compositor isolation, git hooks, and diff checks pass.

No installed desktop files or live settings were changed. This PR targets unstable-dev; the Ryostore community add-on remains a separate submission in Ryoku-dev/ryostore#73.

rayyan added 3 commits October 9, 2026 21:37
Note: New: Configure low-battery warning and critical alerts in Graphics & Power settings
Note: New: Enable warning and critical battery reminders separately in Battery settings
@neur0map neur0map closed this Oct 10, 2026
@neur0map

Copy link
Copy Markdown
Collaborator

Thanks for the work here. Reworking this into the next v1 release.

@neur0map neur0map reopened this Oct 12, 2026
@neur0map
neur0map merged commit ad97eb3 into Ryoku-dev:unstable-dev Oct 12, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants