Skip to content

Latest commit

 

History

49 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MacOS Dynamic Island

A Dynamic Island for your MacBook notch — just like the iPhone. A black island that hangs flush from the top edge of your screen (square top corners, rounded bottom corners — a true extension of the notch, Alcove-style), shows what's playing, pops up notifications when the track changes, and expands on hover with full media controls and a seekable progress bar.

Platform Swift Chip

Features

  • Notch-flush design — square top corners melt into the notch/menu bar, rounded bottom corners; the island looks like part of the hardware
  • Idle pill — clock + battery, sits quietly at the top of the screen
  • Now Playing pill — artwork on the left, live animated waveform on the right (Alcove style), while anything plays (freezes on pause)
  • Track-change pop — the island pops open for a 1-second glance when a new track starts, then tucks itself away (iPhone-style)
  • Notification hub — queued pop-ups for system events, rendered iPhone-style with color-coded icons:
    • 🔌 Charger connected (green) / removed (orange), instantly — the app listens for IOKit power-source events, so the pop fires the moment you plug or unplug, no polling delay. Includes time-to-full / time-left estimates when macOS provides them
    • 🪫 Low battery warning at 20% (red)
    • 🔒 Screen locked / unlocked (blue)
    • 🔊 Volume HUD — the instant you press a volume key: a slim bar with a speaker icon and a thick glow level bar (green → orange → red as the level climbs), 1.5s glance. Native CoreAudio listener, no polling Multiple events queue up and show one at a time, ~4s each (HUDs ~2s)
  • Hover to expand — Alcove-style player card: artwork, title + artist, live waveform, elapsed / -remaining times, a seek bar you can drag, and transport controls with settings + quit tucked into the corners. With nothing playing the card shrinks to hug its content — no dead space
  • Works with everything — YouTube in Brave/Chrome/Safari/Arc/Edge/Firefox, Apple Music, Spotify, QuickTime… anything macOS Now Playing sees
  • YouTube thumbnails — browser playback doesn't ship artwork to macOS, so the app pulls the real video thumbnail from the browser tab URL
  • Click-through — the invisible window area never steals your clicks or hover; only the visible island reacts
  • No Dock icon, floats above everything, follows you across Spaces

Requirements

  • macOS 13 or later (developed and tested on macOS 26, Apple Silicon)
  • Xcode command line tools (xcode-select --install) — only needed to build

Build & Run

cd DynamicIsland
swift build -c release
cp .build/release/DynamicIsland "Dynamic Island.app/Contents/MacOS/DynamicIsland"
open "Dynamic Island.app"

Or just double-click Dynamic Island.app if it's already built.

To run it at every login: System Settings → General → Login Items → + → choose Dynamic Island.app

To quit: hover the island and click the small power button (bottom corner of the expanded card).

Permissions (one-time prompts)

macOS will ask once for each of these — approve them:

  • Automation → your browser: lets the island read the active tab URL to fetch YouTube thumbnails. Without it, everything still works; browser tracks just show a music-note placeholder instead of the video thumbnail.

Usage

Action Result
Do nothing Slim pill: time + battery (or track + waveform while playing)
Play media anywhere Pill grows with artwork + title + live waveform
Track changes Island pops open for 1s with "Now Playing", then collapses
Hover the island Full controls: prev / play / next, seek slider, source badge
Drag the seek bar Scrubs the playing song/video
Swipe left / right across the island Next / previous track
Press a volume key Volume HUD pops with level bar
Click the gear icon Opens Settings — adjust position and every island size live
Click the power icon Quits the app

Settings (gear icon)

Hover the island and click the gear in the bottom corner of the expanded card. Everything applies live while you drag and is saved automatically (it survives restarts):

  • PositionDistance from top (0–60px) and Horizontal shift (±300px from screen center)
  • Idle pill — width and height of the clock/battery pill
  • Now Playing pill — width and height of the playing-track pill
  • Expanded card — width and height of the hover card
  • Reset to defaults — restores the shipped layout

Defaults: top 0px, horizontal +6px, idle 183×31, Now Playing 218×27, expanded 296×210.

How it works

  • SwiftUI + a borderless, always-on-top NSPanel positioned at the top-center of the screen, 13px below the edge.
  • Since macOS 15.4, Apple restricts Now Playing reads to Apple-signed processes. The app runs its query through a small embedded JXA script executed by /usr/bin/osascript (a platform binary), which returns title, artist, duration, elapsed time, playback rate, artwork, and the source app as JSON.
  • Playback commands (play/pause/next/prev/seek) are not restricted, so they go straight to the system via MRMediaRemoteSendCommand.
  • Hover hit-testing is done manually: the window ignores the mouse everywhere except the island's actual visible frame, so it never interferes with apps underneath.

Project layout

DynamicIsland/
├── Package.swift                  SwiftPM manifest (macOS 13+)
├── Dynamic Island.app/            Prebuilt app bundle (double-click to run)
└── Sources/
    ├── DynamicIslandApp.swift     App entry point + AppDelegate
    ├── IslandWindow.swift         Borderless panel, positioning, hover hit-testing
    ├── MediaController.swift      Now Playing bridge (osascript/JXA), commands, thumbnails
    ├── IslandState.swift          State machine: idle / compact / notification / expanded
    ├── IslandView.swift           Island UI + animated waveform
    └── SeekBarView.swift          Live seek/progress slider

Notes

  • Uses the private MediaRemote framework (same one Control Center uses). Not App Store eligible, and could change in a future macOS update.
  • Artwork for non-YouTube browser players may fall back to the placeholder — browsers expose artwork dimensions but not image bytes.

Author

Ahmed Hany (EngOREOO)

About

Dynamic Island for macOS — iPhone-style notch companion: Now Playing with live waveform, hover-to-expand media controls, seek bar, YouTube thumbnails, track-change popups. SwiftUI, works with any browser/app.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages