Add Battery & Power Management plugin - #174
Conversation
…controls (ported from Noctalia 4.x)
|
`1. non-blocking - battery-power-management/service.luau:164 probeProfileAndEta() interpolates deviceName() into the upower command without Impact is limited to a value the user typed into their own plugin settings, so this
|
Plugin
piero-93/battery-power-managementplugin.toml)What it does
A battery status widget and control panel. The bar widget shows charge percentage, live power draw (watts), and the active power profile; clicking it opens a panel to switch the system power profile and set the battery charge-stop threshold — no root at runtime.
Runs entirely locally: reads
/sys/class/power_supply/<device>/ueventand/sys/class/power_supply/<device>/charge_control_end_threshold, runspowerprofilesctlandupower, and writes the charge threshold only when the slider is moved. No network access.Port of my Noctalia v4 plugin of the same name (noctalia-dev/legacy-v4-plugins#864).
External dependencies
powerprofilesctl(power-profiles-daemon) — read/set the power profile. Optional: the profile controls are hidden if it is absent (guarded bycommandExists).upower— time-to-empty / time-to-full. Optional: the time-remaining line is hidden if absent.Both are listed in
dependenciesinplugin.toml.Testing
Added the bar widget and opened the panel; switched between the three power profiles; moved the charge-limit slider (writes the threshold via a udev-permitted sysfs write); verified the multi-row tooltip (level / status / power / time / profile) and the status coloring. Settings toggled from the plugin settings.
Screenshots / Videos
Checklist
idafter the/inplugin.tomlexactly.plugin.toml,README.md,thumbnail.webp, andtranslations/en.json.README.mdfollows the README template, documents every entry id and dependency, and includes exact panel IPC commands and launcher prefixes where applicable.thumbnail.webpwith the thumbnail generator.versionfollows semver and is bumped in this PR;plugin_apiis the oldest API level this plugin requires.catalog.toml; CI generates it.Code review attestation
Plugins run as trusted, unsandboxed Luau in the user's session. Confirm:
licensedeclared inplugin.toml.