gitwtfhub

kageroumado/phosphene

554SwiftAudience · developerComplexity · 4/5ActiveLicenseSetup · hard

TL;DR

macOS Tahoe menu bar app that turns your own MP4 or MOV files into live desktop wallpapers and lock screen backgrounds via a private Apple framework.

Mindmap

mindmap
  root((phosphene))
    Inputs
      MP4 files
      MOV files
      Display selection
    Outputs
      Desktop wallpaper
      Lock screen background
      Gapless loops
    Use Cases
      Custom video wallpaper
      Multi display setups
      Battery aware playback
    Tech Stack
      Swift 6
      Xcode 17
      WallpaperExtensionKit
      Apple Silicon
    Risks
      Private framework
      OS upgrade breakage
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why anyone would actually build this

REASON 1

Set your own looping video as macOS Tahoe desktop wallpaper and lock screen

REASON 2

Study how a Swift app loads a private Apple framework with dlopen and Mirror reflection

REASON 3

Build a thermal and battery aware playback policy for a background macOS process

Stack

SwiftXcodemacOSWallpaperExtensionKit

Spinning it up

Difficulty · hard Time to first run · 1h+

Requires macOS 26 Tahoe on Apple Silicon plus Xcode 17 with Swift 6, and relies on a private Apple framework that may break on OS updates.

MIT license, so you can reuse, modify and ship it commercially as long as you keep the copyright notice.

Wtf does this do

Phosphene is a macOS app that lets you use your own video files as the desktop wallpaper and lock screen background on Apple's latest version of macOS, called Tahoe. It is a menu bar app paired with a wallpaper extension. Once installed, you add MP4 or MOV files through the menu bar, then pick them from the standard System Settings panel where you would normally choose between Apple's own moving wallpapers like the Aerials. The way it talks to the system is not entirely supported. The README is honest that the project loads a private Apple framework called WallpaperExtensionKit using a low-level dlopen call, and inspects internal types using Swift Mirror reflection because the real definitions are not published. The author warns that Apple could change those internal types in a future macOS release and break the app. The project currently targets macOS 26 Tahoe on Apple Silicon Macs, and needs Xcode 17 with Swift 6 to build. A fair amount of engineering went into making the video look natural as a wallpaper. Loops are designed to be gapless by adjusting timestamps across the loop boundary so there is no visible stutter. A PlaybackPolicy module slows down or pauses the video based on thermal state, battery level, whether the Mac is on AC power, Game Mode, or whether the screen is locked or idle. Multiple displays each get their own selection, and rendering pauses when every desktop is fully covered by windows. There is also an adaptive variants system that pre-renders lower resolution copies of a video so the renderer can pick the cheapest one that still meets the current policy at each loop point. Snapshots and the lock screen fade in and out smoothly to match Apple's own behavior. The README ends with a note that Phosphene was started as a commercial project, but the author open sourced it under the MIT license after deciding the market for Mac video wallpaper apps was already crowded.

Yoink these prompts

Prompt 1
Walk me through Phosphenes WallpaperExtensionKit dlopen path and what could break on the next macOS point release
Prompt 2
Explain the PlaybackPolicy module in Phosphene and how it decides to pause based on thermal state, battery and Game Mode
Prompt 3
Show me how Phosphene builds gapless video loops by adjusting timestamps and where I would tweak the loop boundary logic
Prompt 4
Build a stripped down Swift menu bar app inspired by Phosphene that just picks a video and shows it on one display
View the repo → Decode another repo

← kageroumado on gitmyhub — every repo by this author, as a profile.

Don't trust strangers blindly. Verify against the repo.