Skip to content

Show the battery's charge, power and health in its icon, with the percentage in a tooltip #237

Closed

Description

@M4n0x

Problem

The built-in battery widget always draws the full battery.100percent symbol, or battery.100percent.bolt while charging, next to the percentage as text. The icon doesn't show how full the battery is, or that the Mac is on its adapter without charging (full, or held at 80 % by optimized charging). Nothing in the bar says when macOS recommends servicing the battery; that is only in System Settings → Battery → Battery Health. The percentage text also takes room that the icon could cover.

Proposal

  • Draw the battery like the one in the macOS menu bar: a fill that follows the charge and turns red at 10 % or less on battery power, a bolt while charging, and a plug on the adapter without charging. It is sized by iconSize and drawn in the theme's text color.
  • Make it the battery widget's default layout, with the percentage in the tooltip: 62%, 3:20 left, 45%, charging, full in 1:05, 80%, plugged in, not charging, 100%, charged.
  • When macOS recommends service, add an orange badge to the battery, fields.health (normal or service), and a "Service recommended" line in the tooltip.
  • Add a battery layout block, so custom layouts, the Display choices and popups draw the same battery.
  • Read health from BatteryHealthCondition (Check Battery or Permanent Battery Failure), or a BatteryHealth of Poor. On one Mac, IOKit's BatteryHealth reads Check Battery while System Settings shows Condition Normal and Maximum Capacity 83 %, so BatteryHealth alone would warn wrongly. System Settings' capacity figure comes from a private call that returns kIOReturnNotPrivileged to apps.
  • Make the provider's icon follow the charge in quarters (battery.0percent to battery.100percent) for layouts that use a symbol.

Possible today

Partly. rules can set a data state from values.percent or fields.state, and a layout can drop the text. No layout can draw the level, the plugged-in state or the battery's health: the provider's icon is always full, and it has no health field.

Related

Triaged by Claude Code (Claude Opus 5.5).

Activity

  1. added
    enhancement
    on Oct 22, 2026
  2. stablebar-releases commented on Oct 23, 2026

    @stablebar-releases

    🎉 This issue has been resolved in version 0.6.0 🎉

    The release is available on GitHub release

    Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementreleased

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions