← nomonkeysrequired

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.

Koi Pond: ASCII koi in orange, white and gold swimming across a dark pond, with small green lily pads and soft shadows on the pond floor.
Koi swim in bursts and glides, keep loosely together, rise for air and pass under lily pads that come and go.

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

  1. Download ascii-background for macOS above and double-click the zip.
  2. Drag ascii-background into your Applications folder, then open it from there.
  3. 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.
  4. 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

  1. In the menu bar menu, turn off Start at Login, then choose Quit.
  2. 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.

  1. Install Apple's command line tools (once):
    xcode-select --install
  2. Unzip the source, and build it in Terminal:
    cd ~/Downloads/ascii-background-1.0.0-source
    ./build.sh
  3. Quit the ascii-background that's running, then try your build. --scene picks koi, ocean, night, flags, starship, falcon9, saturnv, matterhorn, everest or solar; --lighting day or night picks a rocket's version, and --warp 8 runs it 8 times faster. Control-C stops it.
    build/ascii-background.app/Contents/MacOS/ascii-background --scene starship --lighting night
  4. Change something, run ./build.sh again, 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

changefilelook for
koi coloursKoiPond.swiftstatic let rgb
how many lily padsKoiPond.swiftpadLimit
beach sky coloursSunsetBeach.swift// Sky: in paintBackdrop
where the sun setsSunsetBeach.swiftsun = CGPoint(…)
wave rhythmSunsetBeach.swiftstatic let period
how often gulls fly bySunsetBeach.swiftnextBirds
moon, fireflies, shooting starsNightSky.swiftmoon, fireflies, nextMeteor
Starship's timeline, its girthStarship.swiftenum SSTime, fatness
how lush Saturn V's clouds areSaturnV.swiftrates, cloudRate
how long a sunrise or sunset takesMatterhorn.swift, Everest.swiftstatic let cycle
camera angle, orbit speedSolarSystem.swiftelevation, mercuryLap

a scene of your own

  1. Copy the simplest scene, which is written to be copied:
    cp Sources/Scenes/NightSky.swift Sources/Scenes/Aquarium.swift
  2. In the copy, rename NightSky to Aquarium and NightColor to AquariumColor.
  3. Add a line for it to allScenes in Sources/Scenes.swift, and it shows up in the menu:
    SceneKind(id: "aquarium", title: "Aquarium") { Aquarium(grid: $0, size: $1, seed: $2) },
  4. Build and run it with --scene aquarium, then make it yours. A scene has its colours, a backdrop painted once, setup, and a step that 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.