Skip to content
Interface flottante futuriste sur MacBook

Case study · open source

LiveIsland

A macOS app that turns the notch into a Dynamic Island: what’s playing, calls and AirPods, and every Claude Code and Codex session with its real usage limits.

Role
Author and sole engineer
Year
2026

The challenge

Claude Code and Codex sessions run at once, in editors and terminals. The notch had to say which one needs you and how much limit is left, read from gigabytes of transcripts, at almost no CPU.

In numbers

  1. 3 s → 16 msTo read 460 Claude Code transcripts, 2 GB, the first time, then to check them all again.
  2. < 1%Of one CPU core with the island closed, while Claude Code, Codex and Spotify run.
  3. 13Kinds of activity ranked for the notch, from a call at 100 down to paused music at 10.
  4. 86Tests in Swift Testing, on the parsers, the usage ledger, the waveform and the account rules.

What it does

One island, four pages

LiveIsland lives in the Mac’s notch. Closed, it shows the one thing that matters most right now; on hover it opens onto four pages: Media, Agents, Activity and Accounts. Everywhere else, clicks pass straight through.

Agents lists every Claude Code and Codex session as working, needs you, done or idle, and jumps to it in the app it runs in: the right window of VS Code, Cursor, Antigravity or Windsurf, the exact tab of Terminal or iTerm2. Rings show the 5-hour and weekly limits.

Media follows any app that plays sound, with a waveform that moves with the music. Activity holds timers, the next calendar event, AirPods and battery, and which app uses the microphone or the camera. It is written in Swift, with no third-party dependency apart from one vendored media adapter, for macOS 14 and later.

How it listens

From a transcript line to the notch

Nothing is installed in Claude Code or Codex. macOS file events say which session file changed, one background queue reads only its new bytes, and a session’s state comes from its last lines and how long the file has been quiet.

Claude Code · Codexrunning sessionsTranscripts~/.claude/projects · ~/.codex/sessionsFSEventsfile events · 0.3 sWorkerone utility queueUsageLedgerbyte offset per fileSession taillast 256 KBHost appfound in the process tableIslandModelhighest priority winsNotchSwiftUI · Core Animationappends a linefile changedchanged .jsonl pathsnew bytes onlylast linesscan, at most every 5 stokens · limit noticesworking · needs you · donemost importantclick: jump to the session

Reading transcripts

Nothing is read twice

A busy day leaves gigabytes of Claude Code transcripts, and some lines run to hundreds of kilobytes. The ledger keeps how far it has read each file, with the file’s inode, and the next look starts there.

Within new data it never decodes a whole line. A memmem search finds the only two markers that carry usage or limits, and only those lines are copied; everything else is skipped in place. A file that shrank or was replaced is read again from the start.

Tokens are rebuilt into Claude’s own 5-hour windows, each starting on the hour of the first message after the previous one ended. Records older than 26 hours are dropped, so memory stays flat.

What wins the notch

A call beats an agent that needs you

Thirteen kinds of activity can claim the notch, each with a priority. Things that need you, or just happened, beat things that are merely going on, and the highest wins.

A call is 100, a finished timer 95, an agent waiting for you 90, an account that ran out 88. An agent at work is 50 and playing music 40. Paused music is 10, and on its own it never widens the notch. Between equals the first in the list wins, so the choice stays stable.

While music plays, an agent or a timer shares the notch with the waveform, the way an iPhone shows two things at once. Everything else stays one hover away.

Switching accounts

One tap, two values swapped, nothing else touched

  1. Step 1 of 6

    Hear it run out

    The status line shares Claude Code’s percentages. When an account is spent, a refused request is the only news it gives, so that limit notice is read too.

  2. Step 2 of 6

    File it right

    A session keeps the login it started with. Numbers land on an account only from a session started after the latest switch, or when they match that account’s reset times.

  3. Step 3 of 6

    Point, then wait

    The notch names the account with the most room. Nothing switches on its own: only the user’s tap starts a switch.

  4. Step 4 of 6

    Take the locks

    LiveIsland takes the three lock folders Claude Code uses for its login, in Claude Code’s order. A refresh in flight finishes first. Still busy after 9 s, nothing changes.

  5. Step 5 of 6

    Keep the outgoing login

    Claude Code replaces its login on every refresh and only the newest one works, so the current one is saved to the login Keychain before anything moves.

  6. Step 6 of 6

    Swap two values

    Only claudeAiOauth in the credential item, which also holds the MCP logins, and only oauthAccount in ~/.claude.json, spliced into the raw text. If the config write fails, the old login goes back.

The waveform

The waveform only listens

The bars move with the music itself: bass in the middle, treble at the edges, in the cover’s colours. They come from a Core Audio tap on what the Mac plays, which leaves out LiveIsland’s own sounds and changes nothing: the tap never mutes the sound, and its private device outputs silence.

Each analysis takes 2,048 samples through Accelerate’s FFT into eight bands from 45 Hz to 12 kHz, about an octave each. Every band is measured against its own recent average, so a quiet track moves like a loud one and silence stays flat.

The levels go straight to Core Animation layers 30 times a second; SwiftUI redraws nothing. The tap runs only while something plays and the bars are on screen, and closes 4 s after.

Built with

  • Swift
  • SwiftUI
  • AppKit
  • Core Animation
  • Core Audio
  • Accelerate
  • FSEvents
  • MediaRemote
  • AppleScript
  • EventKit
  • IOBluetooth
  • CoreMediaIO
  • Swift Testing
  • GitHub Actions

Where it stands

Open source, under MIT, on GitHub

It installs with one Terminal command, on Apple silicon and Intel, and updates from Settings on a tap. Still to come: notarization by Apple, which needs a paid developer account; until then, a copy downloaded in a browser asks for Open Anyway the first time.

Read the code on GitHub
Places to jump back to a session: four editors’ windows, and the exact tab of Terminal or iTerm2.
6
Checks before an update replaces the app: SHA-256, version, signature. Each install waits for a tap.
3
Next caseKeforo Studio