feat(power): add battery charge threshold controls - #3829
Conversation
|
Nice man, thats a wanted feature. |
|
I didn't explore plugins, so we already have the feature |
|
The plugin doesn't inline it into the existing battery widget right, but adds another one to the bar? From what I could tell, adding content to the existing widget isn't supported in the current plugin API, and that's specifically what I wanted to implement here. I haven't looked at the plugin API at all to know if it's reasonable to expose the ability to add content to existing widget panels, which could be an approach. But considering that battery limit functionality is already exposed by UPower which we already use for displaying battery charge levels etc. on the built-in widget, I don't really see why this wouldn't be appropriate for the built-in widget as well. |
# Conflicts: # meson.build
Summary
Add battery charge threshold information and controls to the Power tab.
This PR adds a Battery charging card after Power Profile. The card:
Motivation
Noctalia shows battery status and health, but it does not expose charging thresholds supported by UPower.
Users currently need another interface to determine whether charging limits are active or to enable UPower’s configured preset. This change adds that functionality to the existing Power tab without requiring TLP, privileged helpers, or direct sysfs writes.
Type of Change
Related Issue
Testing
Automated testing:
meson compile -C build-charge-limits.python3 tools/i18n-check.py.just formatwith clang-format 22.1.8 becausejustwas unavailable.Test coverage includes:
NativePathvalues.Manual verification:
Manual Coverage
Screenshots / Videos
limits disabled:
limits set but not managed by upower:
multiple batteries:
Checklist
CONTRIBUTING.md.just formatwith clang-format v22+ installed, or this PR has no code changes.assets/translations/en.json, or this PR adds no new user-facing strings.