Battery Plus

July 7, 2026 · View on GitHub

An extended battery panel plugin for DankMaterialShell: everything the built-in battery widget shows, plus a phone-style charge history chart and extra stats — all drawn in your theme colors.

Bar popoutControl center
popoutcontrol center

Features

  • Charge history chart — battery level over the last 12/24 hours, straight from UPower's history (the same data GNOME Power Statistics reads). Discharge segments in the theme primary color, charging segments in green, suspend gaps as dashed connectors. Hover for exact time · level readouts.
  • Stats tiles — health, full-charge capacity, current energy, live voltage, measured average drain, and estimated full-charge runtime derived from your real usage (not the instantaneous rate).
  • Power profiles — switch Power Saver / Balanced / Performance inline, same backend as the built-in panel (power-profiles-daemon).
  • Since-unplug summaryUsed 23% in 2h 10m on battery while discharging.
  • Bar pill — mirrors the built-in battery widget (dynamic icon + percent), with the full panel as its popout. Optional; the Control Center widget works standalone.

Requirements

  • DankMaterialShell
  • upower (history is read via the user-accessible D-Bus GetHistory call — no root, no sudoers rules)
  • power-profiles-daemon (optional, for the profile switcher)

Install

git clone https://github.com/arcatva/dms-battery-plus \
    ~/.config/DankMaterialShell/plugins/batteryPlus
dms ipc call plugins reload batteryPlus

Then add Battery Plus in Settings → Control Center widgets (and optionally as a dankbar widget). It can fully replace the built-in battery widget.

Structure

Everything lives in BatteryPlusWidget.qml, organized as inline components: the plugin root (UPower data fetching, derived stats, bar pills, wiring), BatteryPanel (header, stat tiles, profiles, history) and BatteryChart (the canvas chart with hover readouts). A single file is deliberate: DMS loads plugin components with a cache-busting query string, which breaks QML's same-directory type resolution for sibling files.

License

MIT