Skip to content

About

Native macOS battery-care app built with SwiftUI. Personal fork with charge limits, thermal pauses, MagSafe signals, and French/English UI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

 
 

Repository files navigation

OpenDente · Personal Edition

Battery care, at home in your Mac’s menu bar.

Set a charge limit. Understand your battery. Keep your everyday settings in the background.

French & English · Light & dark · Native SwiftUI

English · Français

macOS 14+ Swift 6 Version 0.9.1 GPL v3

Features · Local history · Screenshots · Build & run · Documentation

A native SwiftUI battery utility for macOS, maintained by JulienEsbt as a fork of killerk3emstar/OpenDente. This edition adds French and English interfaces, everyday profiles, storage preparation, compact status, local battery history and an experimental native charge backend, while preserving the original project’s history and credits.

English panel in light mode: daily profiles, storage at 50 percent and one-off full charge English panel in dark mode with an 80 percent daily limit

OpenDente 0.8.0 · English · Light and dark appearance · Click to enlarge.

Important

The native charge backend is experimental. It uses private Apple interfaces and has been tested on a MacBook Air M3 running macOS 27.2. Compatibility and response times vary. This repository provides source code for local signing, with no notarized public installer. Review the limitations before enabling charge control.

Local history — 0.9.1

Settings → History shows the macOS battery level, temperature, and recent mode/power-source changes. Choose 24 hours or 7 days (default), with one reading per minute plus state changes (bounded to 2880 samples in 24-hour mode or 20160 in 7-day mode). Shortening retention deletes older readings; extending it cannot restore them. Measurement gaps stay disconnected; thermal markers indicate the app’s requested pause, not proof of an immediate hardware cutoff.

Collection reuses existing readings and does not change the helper or charging policy. No uploads or hardware identifiers. Data stays in ~/Library/Application Support/OpenDente/BatteryHistory.json, survives relaunch, and expires when collection resumes. Turning history off removes samples; Clear history starts fresh. No collection during sleep, shutdown or while the app is closed.

History in French and dark mode: local collection, seven-day retention, battery level and temperature History in French and light mode: temperature curve, recent state changes and clear-history control

OpenDente 0.9.1 · History shown in French · Dark and light appearance · Click to enlarge.

Features

Control What it does
Daily limit & profiles Choose a ceiling and switch between Desk, Daily and Travel profiles. The native backend accepts requests from 20–100%; targets below Apple’s public 80–100% range remain experimental.
Resume threshold Resume charging after a natural drop below a lower threshold, then continue to the ceiling. No repeated discharge cycles are forced.
Return to the ceiling Optionally discharge an already high battery level toward your daily ceiling while plugged in, then hold there.
One-off full charge Temporarily request 100% without replacing your daily settings. Thermal pauses retain priority.
Storage preparation Use a separate 50% target, charging or discharging toward it as needed. Daily settings are retained; unplug and shut down manually when ready.
Additional thermal pause Request a pause at a configurable internal battery temperature. Resume after cooling by 2°C and at least five minutes without exceeding the threshold.
MagSafe signals Assign fixed green, orange or off, slow blinking and alternating patterns to charge states. Ten-second previews make each signal easy to check.
Language & appearance Follow the Mac language or choose French/English in General. Controls, the offline guide and notifications are translated; colors adapt to light and dark mode.
Local history Level, temperature and recent state changes over 24 hours or 7 days. Local storage, observation gaps preserved, clear/disable controls.
Quiet background operation Launch at login directly into the menu bar. Closing a window keeps the app running; open the panel only when you need it.

The compact status puts the percentage inside the battery, with a separate level track and optional temperature, power and mode indicators. The classic layout remains available. Customize the panel’s measurements, inspect energy flows, choose notifications, search the offline guide or export a local diagnostic report.

Percentage inside the battery, separate level track, temperature and power

Details in the panel. Essentials in the menu bar.

Screenshots

The history screenshots above show version 0.9.1. The following panel and settings gallery shows version 0.8.0, in English or French. Colors follow the Mac’s appearance; choose a language in Settings → General → Interface language. Switching takes effect immediately and preserves charging settings.

English General settings in light mode: language selection, launch at login and version 0.8.0 French General settings in dark mode: automatic language, login startup and connected service

English in light mode · French in dark mode

Explore charging, thermal pause, storage and MagSafe signals

English charging settings: 80 percent ceiling, return to the ceiling and resume below 70 percent Additional thermal pause and optional idle-sleep prevention in light mode

Daily charging policy · Additional thermal pause

Temporary 50 percent storage target and battery-care guidance MagSafe state assignments and previews for colors, blinking and alternating signals

Storage preparation · MagSafe colors and patterns

Customize the menu bar and browse the offline guide

Compact menu bar settings with optional percentage, temperature, power and mode indicators Searchable English offline guide explaining daily settings and temporary modes

Configurable compact display · Searchable built-in guide

These are real, unretouched screenshots. 80/70% and 35°C illustrate customizable choices, not universal recommendations or evidence of a thermal test. The app’s thermal default is 40°C. Screenshot provenance.

Compatibility

Area Current scope
Build target macOS 14 or later, Swift 6. Universal Release compilation covers arm64 and x86_64; only arm64 execution has been tested.
Hardware validation MacBook Air M3, 16 GB, macOS 27.2. Real charging checks used USB-C Power Delivery and MagSafe.
Native backend Private PowerUI interfaces, detected at runtime, for this Mac where the original SMC charging keys are unavailable.
Original SMC backend Preserved for compatible machines. This fork does not claim fresh validation across those models.
Distribution Build from source and sign locally with your own certificate. The app and privileged helper must use the same signing identity.

A requested target is not an immediate hardware cutoff. Native changes can take several minutes. macOS allows a few percentage points of tolerance and may occasionally charge to 100% to maintain its gauge. See Apple’s charge-limit documentation.

During sleep, macOS retains the last native target; OpenDente does not continuously monitor temperature or animate the LED. Controls resume on wake. The app cannot run when the Mac is powered off. Optional idle-sleep prevention does not block manual sleep or lid-close sleep.

On quit, the helper requests restoration of the saved Apple settings and system LED behavior. The Apple limit and this native backend share the same mechanism; they are not independent fallbacks. Configure the Apple policy you want restored before enabling the app’s native mode. The 40°C thermal default is an app precaution, not an Apple-prescribed internal sensor threshold or an instantaneous safety cutoff. Apple’s own protections remain in place.

Build and run

Install and initialize full Xcode first; Command Line Tools alone are insufficient. You also need XcodeGen and an Apple Development signing identity with its certificate and private key. The helper rejects an ad hoc signature.

git clone --branch main https://github.com/JulienEsbt/OpenDente.git
cd OpenDente
brew install xcodegen
export DEVELOPER_DIR=/Applications/Xcode.app/Contents/Developer

bash scripts/build-local.sh "Apple Development: YOUR NAME (CERTIFICATE ID)" "TEAM_ID"

Replace the signing placeholders with your own identity. The script generates the Xcode project, runs native tests, builds a signed Debug app and verifies matching app/helper certificates. It does not install or launch the privileged service.

  1. Copy build/DerivedData/Build/Products/Debug/OpenDente.app into Applications and keep one installed copy.
  2. Launch it, then click its battery icon in the menu bar.
  3. In General, choose the interface language, activate the signed service when needed and enable Launch at login for quiet login startup. Approve any macOS authorization locally.
  4. In Charging, review your thresholds and explicitly enable the native backend if offered. Keep only one battery-control app active.

For a Release build, signing details and troubleshooting, see the local development guide.

Validation

Version 0.8.0 (16) adds both languages and adaptive colors. The validation record separates current software checks from physical tests performed on earlier releases, including 0.7.2 (15), 26 October 2026:

Check Recorded result
Native tests — 0.8.0 397 XCTest cases passed in French and 397 in English on arm64, including translation, interpolation, contrast and SwiftUI rendering.
Unchanged helper — 0.7.2 record 36 recovery, lifecycle and watchdog scenarios passed, with simulated hardware boundaries and native Security/XPC type checking.
Charging USB-C hold at 78%; resume at 74% for the 80/75 policy, continued charge after switching supply, then measured stop and hold at 80%.
Thermal policy Physical pause/resume verified with the real sensor and a temporary low threshold, without heating the Mac. This is not a test at an actual hot-battery threshold.

Physical sleep/wake, relaunch, restoration and MagSafe-pattern evidence is recorded from earlier releases. No new 0.7.2 sleep test or controlled full-shutdown test is claimed; startup on the latest version can be observed at the next normal reboot. Results on one Mac are not universal hardware certification.

Full validation record · Helper-test scope and commands

Documentation

Start here Contents
User guide — Français Controls, everyday use, storage, sleep and battery-care references.
Development & signing — Français Xcode setup, local builds and technical details.
Feature comparison — English / Français Original OpenDente, this edition, AlDente and possible next steps.
Specification — Français Intended behavior and constraints.
Language & appearance — English Language selection, translation resources, adaptive colors and focused checks.
Changelog — Français Version history.

For battery-care context, see Apple’s charge limits and long-term storage guidance. No particular battery-lifespan gain is promised. Scheduling, Shortcuts integration and a validated multi-user workflow are not included in this edition.

Architecture and contributing

The SwiftUI app reads measurements through IOKit, IORegistry and SMC, and applies daily policy through ChargingManager. A certificate-authenticated XPC connection delegates privileged operations to the helper, which selects the available SMC or native backend. A recovery journal and watchdog support restoration after failures.

No telemetry, analytics, account or update server is added to the app. Diagnostic exports stay local and optional; review hardware identifiers and logs before sharing them publicly.

Contributions should describe the Mac, macOS version, active backend and observed behavior. Keep changes focused, run the relevant native and helper tests, and distinguish simulated checks from physical measurements. Compatibility reports with clear reproduction steps are welcome.

Credits and license

This project builds on killerk3emstar/OpenDente. Charge limiting, sailing mode, SMC controls, measurements, notifications and the original app architecture come from upstream. The original history, license and credits are preserved, along with the upstream README.

Additional acknowledgements: Battery-Toolkit, SMCKit, actuallymentor/battery, batt, and Ampere / AZ Code Lab for the adapted native mechanism.

GPL-3.0. See LICENSE and third-party notices, including the MIT attribution for the adapted Ampere code. OpenDente Personal is not affiliated with Apple or AppHouseKitchen.

About

Native macOS battery-care app built with SwiftUI. Personal fork with charge limits, thermal pauses, MagSafe signals, and French/English UI.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages