◉ Pulse
bulava92 avatar
#29 today

bulava92/magsafe-dark

Swift App

A tiny macOS menu bar utility for disabling the MagSafe LED on Apple Silicon MacBooks.

Created Jul 19, 2026
Stars
11
Today
+11
Forks
0
Quality
90/100
Momentum
19

README

Fetched from GitHub on Nov 7, 2026, 1:56 AM UTC · README.md

View original on GitHub

Third-party content — Open Source Pulse is not the owner of this repository.

This README belongs to bulava92/magsafe-dark and its contributors. We fetch it directly from the project’s public GitHub repository and display it for reference only. All text, code, images and trademarks remain the property of their respective authors. See the repository for its license terms. Copyright / takedown policy.

MagSafe Dark

Русская версия

Support the project on Boosty

MagSafe Dark is a macOS menu bar app for controlling the LED on a MagSafe connector.

The app uses an undocumented macOS mechanism. A system or firmware update may change or completely disable this behavior.

Requirements

  • macOS 13 or newer;
  • Apple Silicon MacBook with MagSafe 3.

Check support after installation:

magsafe-dark probe

Expected result:

supported

Features

  • turn the MagSafe LED off or restore normal macOS control;
  • green, orange, and blinking modes;
  • temporary modes;
  • weekly schedules;
  • Codex CLI working, success, and error indication;
  • automatic recovery of the current mode after power changes;
  • optional battery, charging, and charge-completion information in the menu bar;
  • diagnostics, logs, CLI, and update checks;
  • installer package building, signing, and notarization.

Installation

Installer package

zsh ./scripts/check-release.sh --package
open build

Build a local package directly:

zsh ./build-pkg.sh
open build

Installation from source

git clone https://github.com/bulava92/magsafe-dark.git
cd magsafe-dark
zsh ./scripts/check-release.sh
zsh ./install.sh

For an existing checkout:

cd ~/Projects/magsafe-dark
git pull
zsh ./scripts/check-release.sh
zsh ./install.sh

macOS asks for the administrator password once during installation. Normal app and CLI use does not require sudo afterwards.

The app is installed at /Applications/MagSafe Dark.app.

LED modes

Mode Action
System macOS controls the LED normally
Off LED remains off
Green solid green
Orange solid orange
Single indication one short indication
Slow blink slow orange blinking
Fast blink fast orange blinking
Blink then off blinking followed by off

Keyboard shortcuts while the menu is open:

  • ⌘⇧0 — switch between Off and System;
  • ⌘⇧G — Green;
  • ⌘⇧O — Orange;
  • ⌘Q — Quit.

Power and charging

Connecting or disconnecting the charger updates the app state immediately. When a schedule is enabled, MagSafe Dark also verifies and restores the correct mode after the power state stabilizes.

The menu bar can optionally show:

  • battery percentage;
  • active charging state;
  • estimated charge completion time.

These options only affect status display and do not change LED behavior.

Timers

A timer temporarily overrides the normal LED state. When it ends, the app recalculates the mode that should be active at that moment instead of restoring a stale previous value.

For example, when a schedule boundary occurs during a timer, the new schedule interval is applied after the timer finishes.

Weekly schedule

Each interval defines days, start time, end time, and an LED mode. Intervals may cross midnight.

Default template:

Every day  08:00–23:00  System
Every day  23:00–08:00  Off

The template remains inactive until the schedule is enabled and saved.

Outside configured intervals, the app can use:

  • normal macOS control;
  • LED off;
  • the last persistent manual mode.

Manual control while a schedule is active

Selecting a mode manually while the schedule is enabled keeps it active until the next schedule boundary. The schedule then regains control.

When the schedule is disabled, a manually selected mode remains active until the user changes it again.

Codex CLI indication

MagSafe Dark can represent:

  • working;
  • successful completion;
  • error.

Each state has a configurable LED mode. Success and error can also use separate durations and notifications.

Run Codex through the wrapper:

codex-led
codex-led exec "Fix the failing tests"

When several tasks run simultaneously, the working indication remains active until the final task exits.

Mode priority

1. User timer
2. Active Codex indication
3. Manual mode until the next schedule boundary
4. Current schedule interval
5. Persistent manual mode
6. Normal macOS control

After a temporary state finishes, the app recalculates the current desired mode. Therefore:

  • a user timer is not interrupted by Codex;
  • Codex temporarily overrides the schedule;
  • the current schedule interval is restored after Codex;
  • a manual selection during an active schedule lasts only until the next boundary;
  • the correct mode is restored after a power change.

Menu bar status

The menu bar may show the current LED mode, remaining timer duration, battery percentage, charging state, and charge-completion estimate. Icon style and status text options are independent from LED-control logic.

CLI

Direct control:

magsafe-dark off
magsafe-dark system
magsafe-dark green
magsafe-dark orange
magsafe-dark flash
magsafe-dark blink-slow
magsafe-dark blink-fast
magsafe-dark blink-off

Timers:

magsafe-dark for 900 off
magsafe-dark timer-status
magsafe-dark cancel-timer

Schedule:

magsafe-dark schedule edit
magsafe-dark schedule status
magsafe-dark schedule enable
magsafe-dark schedule disable
magsafe-dark schedule next

Run another command with LED indication:

magsafe-dark run -- make test
magsafe-dark run --working blink-slow -- npm run build
magsafe-dark run --success green --error blink-fast -- ./deploy.sh

The wrapped command keeps its original exit code.

In-app updates

When a new version is available, the update dialog can download the .pkg directly from the GitHub Release. The package is then opened in the standard macOS Installer. Until packages are signed with Developer ID, macOS may show an additional security warning and require manual confirmation.

Diagnostics

magsafe-dark status
magsafe-dark settings
magsafe-dark state
magsafe-dark diagnostics
magsafe-dark log-path

Troubleshooting

The LED does not change

Check compatibility:

magsafe-dark probe

Then open diagnostics and logs from the app menu or run:

magsafe-dark diagnostics
magsafe-dark log-path

The schedule does not apply

magsafe-dark schedule status

A timer or active Codex indication has higher priority. The schedule applies after the temporary state finishes.

The schedule editor does not open

magsafe-dark schedule edit

Running it from Terminal exposes the error message directly.

Signing and notarization

The repository includes scripts for building, signing, and notarizing the installer package. Detailed parameters are documented in the signing guide.

Limitations

MagSafe Dark works locally. Because LED control relies on an undocumented Apple mechanism, compatibility may change after a macOS update, firmware update, or a new MacBook generation.

Uninstall

zsh ./uninstall.sh

The script restores normal macOS LED control and removes the app, its settings, and logs.

License

MIT

Rendered by GitHub from the repository’s README. Scroll to read the full file.
First trending

Jul 20, 2026

first spotted on the list

Best rank

#29

highest position reached

Appearances

1

times on the trending list

Quality score

90

out of 100

Momentum

19

trend strength indicator

Star velocity

0.10

stars per day since creation

Activity — last 60 days

daily counts, collected every 6 hours
  • Stars
  • Forks
  • Merged PRs
  • Issues
  • Closed issues

Collecting activity data since launch — check back in a few days.

Star history

total stars per snapshot

Not enough snapshots yet — check back soon.

Rank history

position on trending · lower is better

Not enough snapshots yet — check back soon.

3D card for your website

Live HTML card with a glass surface and pointer tilt. Paste the iframe on any website.

<iframe src="https://www.notionpulse.cc/embed/bulava92/magsafe-dark" width="420" height="240" style="border:0;max-width:100%;background:transparent" loading="lazy" title="bulava92/magsafe-dark — trending on Open Source Pulse"></iframe>

Stars badge

Show current stars in your README or profile. Auto-updates every 6 hours.

bulava92/magsafe-dark stars badge
Markdown
[![bulava92/magsafe-dark](https://www.notionpulse.cc/api/badge/bulava92/magsafe-dark.svg)](https://www.notionpulse.cc/repo/bulava92/magsafe-dark)
HTML
<a href="https://www.notionpulse.cc/repo/bulava92/magsafe-dark"><img src="https://www.notionpulse.cc/api/badge/bulava92/magsafe-dark.svg" alt="bulava92/magsafe-dark stars badge" /></a>

Repository of the Day

#29 Repository of the Day

Repository of the Week

#29 Repository of the Week

Repository of the Month

#29 Repository of the Month