ascii-background
Animated ASCII scenes for your Mac's desktop. They sit just above your wallpaper, under your icons and windows, and quietly move: koi gliding under lily pads, flags stirring under a lamp post, Starship coming home to the tower's arms, alpenglow sliding down the Matterhorn, the planets turning round the sun. Ten scenes, free, open source, and light on the battery.
cat CHANGES --since=1.0.0
1.1.0: seven new scenes, and the rockets come in day and night.
- Flags at Dusk: two American flags hanging from an old cast-iron lamp post, drooping and folding in the evening air, lit by the lantern. Each flag is a real cloth simulation.
- Starship: liftoff from Starbase in a wall of steam, then the booster comes back and the tower's arms catch it, the ship belly-flops home and is caught too, and the two are stacked for the next launch.
- Falcon 9 Liftoff and Saturn V Liftoff: the moment of liftoff, held. Shock diamonds, fire pouring into the trench, exhaust clouds rolling across the pad, ice shedding off the Saturn V.
- Matterhorn: sunrise from the Riffelsee. Alpenglow slides down the face over eight minutes, a banner cloud streams off the summit and the reflection breaks up when the wind ruffles the lake.
- Everest: from Kala Patthar. The summit's snow plume streams in the jet stream, evening light climbs Nuptse's fluted wall, prayer flags snap in the wind.
- Solar System: the eight planets round the sun, seen from above at an angle so they pass behind it. Each spins and shows its phase in the sunlight; Saturn's rings throw a shadow.
- Day or night for the rocket scenes: pick one, or let the clock decide, under Lighting in the menu.
./get-ascii-background
macOS 12 Monterey or later, on Apple silicon or Intel. About 90 MB of memory and roughly 5–15% of one processor core while the desktop is visible (the quiet scenes sit at the low end, the rocket launches at the high end), and nothing at all while it's covered, asleep or locked.
cat install.txt
- Download ascii-background for macOS above and double-click the zip.
- Drag ascii-background into your Applications folder, then open it from there.
- The first time, macOS says it can't check the app for malicious software, because it comes from this site rather than the App Store. Click Done, then open System Settings > Privacy & Security, scroll down, click Open Anyway next to ascii-background, and confirm. macOS only asks once.
- Your desktop turns into a koi pond. Pick a scene, pause, or quit from the framed-picture icon in the menu bar; for the rockets, Lighting picks day, night, or by the clock. It starts by itself when you log in; turn that off with Start at Login in the same menu.
to remove it
- In the menu bar menu, turn off Start at Login, then choose Quit.
- Drag ascii-background from Applications to the Trash.
vim Sources/Scenes/*.swift
Every scene is one Swift file, and the whole app is a few thousand lines with no Xcode project. Download the
source above to change the colours, timings and creatures of the scenes, or to write your own.
The full guide is CUSTOMIZING.md in the source zip; here's the short version.
- Install Apple's command line tools (once):
xcode-select --install
- Unzip the source, and build it in Terminal:
cd ~/Downloads/ascii-background-1.0.0-source ./build.sh - Quit the ascii-background that's running, then try your build.
--scenepickskoi,ocean,night,flags,starship,falcon9,saturnv,matterhorn,everestorsolar;--lighting dayornightpicks a rocket's version, and--warp 8runs it 8 times faster. Control-C stops it.build/ascii-background.app/Contents/MacOS/ascii-background --scene starship --lighting night
- Change something, run
./build.shagain, and look again. When you like it, put it on your desktop for good:./install.sh
easy changes: a number or a colour in one file
| change | file | look for |
|---|---|---|
| koi colours | KoiPond.swift | static let rgb |
| how many lily pads | KoiPond.swift | padLimit |
| beach sky colours | SunsetBeach.swift | // Sky: in paintBackdrop |
| where the sun sets | SunsetBeach.swift | sun = CGPoint(…) |
| wave rhythm | SunsetBeach.swift | static let period |
| how often gulls fly by | SunsetBeach.swift | nextBirds |
| moon, fireflies, shooting stars | NightSky.swift | moon, fireflies, nextMeteor |
| Starship's timeline, its girth | Starship.swift | enum SSTime, fatness |
| how lush Saturn V's clouds are | SaturnV.swift | rates, cloudRate |
| how long a sunrise or sunset takes | Matterhorn.swift, Everest.swift | static let cycle |
| camera angle, orbit speed | SolarSystem.swift | elevation, mercuryLap |
a scene of your own
- Copy the simplest scene, which is written to be copied:
cp Sources/Scenes/NightSky.swift Sources/Scenes/Aquarium.swift
- In the copy, rename
NightSkytoAquariumandNightColortoAquariumColor. - Add a line for it to
allScenesinSources/Scenes.swift, and it shows up in the menu:SceneKind(id: "aquarium", title: "Aquarium") { Aquarium(grid: $0, size: $1, seed: $2) }, - Build and run it with
--scene aquarium, then make it yours. A scene has its colours, a backdrop painted once, setup, and astepthat puts each frame's characters into a grid. Row 0 is at the bottom, and the first thing put in a cell wins.
Keep it light: the screen is redrawn in small tiles, and only where a character changed. Things that never move belong in the backdrop; things that change now and then cost almost nothing. The code is MIT licensed: change it, share it, sell it, keep the licence notice.
sha256sum --check
Each download lists a SHA-256 fingerprint. To confirm a file arrived complete and unchanged, compare it with:
shasum -a 256 ~/Downloads/ascii-background-1.0.0-macos.zip
whoami
William Cheriton made ascii-background and this site.
Questions, bugs or a scene you made: [email protected]
Also here: inv, a private AI assistant that runs on your own computer, and creature quest, a pixel-art creature-catching game you can play in your browser.