Skip to content

Latest commit

 

History

2 Commits

Folders and files

Repository files navigation

WallpaperEngine

A lightweight macOS wallpaper engine — play MP4, MOV, or GIF files silently behind your desktop icons with near-zero CPU overhead.


Features

Feature Details
Formats MP4, MOV, GIF
Looping Seamless, silent, infinite
Multi-monitor One wallpaper window per connected display (currently broken)
Window level Behind desktop icons, below Dock and all windows
GIF playback ImageIO + CVDisplayLink — no conversion needed
Fullscreen pause Pauses automatically when a fullscreen app covers the display
Battery Saver pause Optional — pauses when on battery + Low Power Mode
Persistence Remembers your wallpaper across reboots via UserDefaults
Launch at Login SMAppService (macOS 13+) / LaunchAgent fallback
Menu bar only No Dock icon, clean status bar menu
No dependencies Pure Apple frameworks only

Requirements

  • macOS 12 Monterey or later
  • Xcode 15+ (to build)
  • Not sandboxed — direct distribution only

Build & Run

Open in Xcode

open WallpaperEngine.xcodeproj

Then press ⌘R to build and run.

Command Line

xcodebuild -project WallpaperEngine.xcodeproj \
           -scheme WallpaperEngine \
           -configuration Release \
           build

The built app will be inside ~/Library/Developer/Xcode/DerivedData/.


How it Works

Window Layering

┌─────────────────────────────┐  ← All apps / Finder windows
│  Desktop Icons              │  ← Finder (kCGDesktopIconWindowLevel)
│  ┌─────────────────────┐    │
│  │  WallpaperWindow    │    │  ← kCGDesktopWindowLevel (our layer)
│  │  AVPlayerLayer /    │    │
│  │  GIF via CALayer    │    │
│  └─────────────────────┘    │
│  macOS Desktop Picture      │  ← below us
└─────────────────────────────┘

Architecture

AppDelegate                 (menu bar, observers, lifecycle)
  └─ WallpaperWindow[]     (one per NSScreen)
       ├─ AVPlayerLayer    (MP4/MOV — via AVQueuePlayer + AVPlayerLooper)
       └─ GIFAnimation     (GIF — ImageIO frames + CVDisplayLink tick)

Frameworks Used

  • AVFoundation — video decode + hardware-accelerated playback
  • ImageIO — GIF frame extraction
  • CoreVideo — CVDisplayLink for vsync-locked GIF timing
  • IOKit — power source monitoring
  • ServiceManagement — launch-at-login (macOS 13+)
  • AppKit / Cocoa — window management

Usage

  1. Click the 📷 icon in the menu bar.
  2. Select "Choose Wallpaper…" and pick an MP4, MOV, or GIF.
  3. The wallpaper plays immediately on all connected screens.
  4. Use Pause / Resume to toggle playback.
  5. Enable Options → Launch at Login to start automatically.
  6. Enable Options → Pause on Battery Saver to save power.

Signing Note

The project uses ad-hoc signing (CODE_SIGN_IDENTITY = "-") with no sandbox entitlements. This is intentional for direct distribution. If you have a Developer ID certificate, set your team in Xcode → Signing & Capabilities to notarize for distribution.


Known Limitations

  • Wallpaper windows respawn when displays are added/removed (existing wallpaper reloads automatically).
  • On macOS 12, Launch at Login uses a LaunchAgent plist in ~/Library/LaunchAgents/; on macOS 13+ it uses SMAppService.
  • Video files larger than ~4 GB should work but haven't been explicitly tested.

Releases

Packages

Contributors

Languages