Skip to content

Latest commit

Β 

History

15 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

macOS 13+ Swift 5.9 SwiftUI Powered by Pexels No dependencies Latest Release



πŸ–Ό Personal Wallpaper Engine Lite

A featherweight macOS menubar app that keeps your desktop fresh with stunning wallpapers β€” powered by the free Pexels API.

⬇ Download Latest DMG Β· Get Free Pexels API Key Β· Report a Bug Β· Request a Feature


✨ Features

Feature Details
πŸ–₯ Menubar-only Lives quietly in the menu bar β€” no Dock icon, no window clutter
🏷 6 Built-in Categories Nature · City · Minimal · Abstract · Space · Architecture
✏️ Custom Categories Add any keyword you want β€” cyberpunk, anime, forest rain, anything
⚑ One-click wallpaper Fetch and set a new random wallpaper in seconds
πŸ—‚ Browse grid Preview a scrollable grid of photos, click any to set it
⏱ Auto-change timer Automatically change wallpaper every 5 / 10 / 15 / 30 / 60 / 120 minutes
⏳ Live countdown See exactly how long until the next auto-change
πŸš€ Launch at login Starts automatically when you log in
πŸ”‹ Minimal resources No background polling β€” barely registers in Activity Monitor
πŸ“¦ Zero dependencies 100% Swift + SwiftUI + AppKit, no third-party packages
πŸ†“ Completely free Powered by Pexels β€” free API, no credit card, no rate limits for personal use

πŸ“₯ Installation

Option A β€” Download DMG (Recommended)

  1. Go to Releases

  2. Download PersonalWallpaperEngineLite-x.x.x.dmg

  3. Open the DMG and drag Personal Wallpaper Engine Lite to Applications

    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚                                              β”‚
    β”‚   [ πŸ“· App ]  ──────────►  [ Applications ] β”‚
    β”‚                                              β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
    
  4. Launch from Applications β€” a πŸ“· icon appears in your menu bar

  5. Click the icon β†’ Settings tab β†’ paste your Pexels API key

First-launch Gatekeeper warning? The app is unsigned (no Apple Developer account needed to distribute). Right-click the app in Finder β†’ Open β†’ Open β€” you only need to do this once.

Option B β€” Build from source

Prerequisites: Xcode 15+, macOS 13+

# Clone the repository
git clone https://github.com/devShakib015/personal_wallpaper_engine_lite.git
cd personal_wallpaper_engine_lite

# Open in Xcode
open PersonalWallpaperEngineLite/PersonalWallpaperEngineLite.xcodeproj

Press ⌘R to build and run. Or build a local DMG:

brew install create-dmg
./scripts/build-dmg.sh 1.2.0
# β†’ outputs to ./build/PersonalWallpaperEngineLite-1.2.0.dmg

πŸ”‘ Getting Your Free Pexels API Key

Pexels is completely free β€” no credit card, no paid tiers.

  1. Go to pexels.com/api
  2. Click "Get Started" and create a free account
  3. Your API key is shown immediately on the dashboard
  4. In the app: click the πŸ“· menu bar icon β†’ Settings β†’ paste the key

That's it. You're ready to go.


πŸ–± How to Use

Set a random wallpaper instantly

πŸ“· Menu Bar Icon
  └─► Home tab
        β”œβ”€ Toggle category chips (built-in or custom)
        └─ Click "Set Random Wallpaper"

Add a custom category

πŸ“· Menu Bar Icon
  └─► Home tab
        β”œβ”€ Click the [+] button next to "Categories"
        β”œβ”€ Type any keyword: "cyberpunk", "anime", "rainy forest"...
        └─ Press Enter or click "Add"
        
  Custom chips appear with an [Γ—] to remove them anytime.

Browse and pick a specific photo

πŸ“· Menu Bar Icon
  └─► Browse tab
        β”œβ”€ Click [↻] to load a photo grid
        β”œβ”€ Click any thumbnail to preview it
        └─ Click "Set as Wallpaper" in the preview

Auto-change on a schedule

πŸ“· Menu Bar Icon
  └─► Settings tab
        β”œβ”€ Toggle "Enable auto-change" ON
        β”œβ”€ Pick an interval: 5 min / 10 / 15 / 30 / 60 / 120
        └─ A countdown timer appears in the Home tab

Launch at login

πŸ“· Menu Bar Icon
  └─► Settings tab
        └─ Toggle "Launch at login" ON

πŸ— Architecture

PersonalWallpaperEngineLite/
β”œβ”€β”€ PersonalWallpaperEngineLiteApp.swift   @main β€” accessory app (no Dock icon)
β”œβ”€β”€ AppDelegate.swift                      NSStatusItem + NSPopover setup
β”‚
β”œβ”€β”€ Models.swift                           PexelsPhoto, PhotoSrc (Codable)
β”œβ”€β”€ WallpaperCategory.swift                6 built-in categories with SF Symbols
β”‚
β”œβ”€β”€ UnsplashService.swift                  Pexels API client (URLSession only)
β”‚   β”œβ”€β”€ fetchRandomPhoto([String])         Random photo from active categories
β”‚   β”œβ”€β”€ fetchPhotos([String])              Paginated search for Browse grid
β”‚   └── downloadImage(urlString)           Download full-res image data
β”‚
β”œβ”€β”€ WallpaperSetter.swift                  NSWorkspace.setDesktopImageURL
β”‚                                          Applies to all connected screens
β”‚
β”œβ”€β”€ WallpaperViewModel.swift               @MainActor ObservableObject
β”‚   β”œβ”€β”€ selectedCategories                 Built-in preset chips (UserDefaults)
β”‚   β”œβ”€β”€ customCategories: [String]         User-defined keywords (UserDefaults)
β”‚   β”œβ”€β”€ activeQueryTerms                   Merged preset + custom for API
β”‚   β”œβ”€β”€ autoChangeEnabled / Interval       Timer settings (UserDefaults)
β”‚   β”œβ”€β”€ fetchAndSetRandomWallpaper()       Full fetch β†’ download β†’ set flow
β”‚   β”œβ”€β”€ resetTimer()                       Native Timer.scheduledTimer
β”‚   └── applyLaunchAtStartup()             SMAppService (macOS 13+)
β”‚
β”œβ”€β”€ MenubarPopoverView.swift               340Γ—460 popover root (3 tabs)
β”œβ”€β”€ HomeTabView.swift                      Quick-set + category chip grid
β”œβ”€β”€ BrowseTabView.swift                    LazyVGrid + full-screen preview sheet
└── SettingsTabView.swift                  API key Β· timer Β· login item Β· quit

βš™οΈ CI/CD β€” Automated Releases

Every version tag triggers the GitHub Actions workflow to:

  1. Archive the app with xcodebuild
  2. Package a polished .dmg installer with create-dmg
  3. Publish a GitHub Release with the DMG attached and auto-generated changelog

Publish a new release

git tag v1.3.0
git push origin v1.3.0

The workflow handles everything. You can also trigger a manual build from Actions β†’ Build & Release DMG β†’ Run workflow.


πŸ” Privacy & Security

  • No telemetry β€” the app never phones home
  • Network access β€” only to api.pexels.com and images.pexels.com over HTTPS
  • Local storage β€” API key and all preferences stored in ~/Library/Preferences via UserDefaults
  • Temp files β€” wallpaper image written to NSTemporaryDirectory(), cleaned up by macOS
  • App Sandbox β€” disabled, which is required for NSWorkspace.setDesktopImageURL to work outside the Mac App Store
  • URL safety β€” all query parameters encoded via URLComponents, no raw string interpolation

πŸ›  Troubleshooting

"Pexels API key is missing" on first launch

Click the πŸ“· menu bar icon β†’ Settings tab β†’ paste your API key from pexels.com/api.

macOS says the app is from an unidentified developer

The DMG is unsigned. To open it:

  1. Right-click the app in Finder
  2. Click Open
  3. Click Open again in the dialog

You only need to do this once.

Wallpaper doesn't change
  • Make sure at least one category chip is active (highlighted in blue)
  • Verify your Pexels API key is correct in the Settings tab
  • Check your internet connection
"Launch at login" toggle has no effect

macOS may require manual approval: System Settings β†’ General β†’ Login Items β†’ enable the toggle next to Personal Wallpaper Engine Lite.

Build fails in Xcode: "No account for team"

In Xcode β†’ Target β†’ Signing & Capabilities β†’ set Team to your personal Apple ID (free accounts work for local builds).


πŸ“‹ Requirements

Minimum
macOS 13.0 Ventura
Xcode (to build) 15.0
Swift 5.9
Pexels API key Free β€” pexels.com/api

πŸ—Ί Roadmap

  • App icon design
  • Notarized & signed release
  • Favorite / save wallpapers locally
  • Per-monitor wallpaper (different image per screen)
  • Wallpaper history with undo
  • Custom Pexels collection support

πŸ“„ License

MIT License β€” see LICENSE for details.


Made with β™₯ using SwiftUI Β· Powered by Pexels Β· Zero external dependencies Β· macOS only

⬆ Back to top

About

A featherweight macOS menubar app that rotates your desktop wallpaper from the free Pexels API. No Dock icon, no window clutter.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages