A macOS screen saver that recreates the nostalgic disk-defragmentation experience of several classic operating systems — animated cluster map, real-time status output, switchable retro themes, and optional procedurally-synthesised hard-disk sounds.
⬇ Download the latest version · How to install
It does not make your SSD faster. It does not fix your filesystem. It does not improve your productivity.
What it does do is fill your screen with a lovingly fake retro defrag display: blue DOS-style colors, animated disk clusters, progress bars, status text, and the comforting illusion that your computer is doing something extremely technical and important.
Perfect for retro-PC fans, old-school nerds, or anyone who thinks “watching colored blocks move around” counts as entertainment.
-
4-phase animation loop — Scan → Analyze → Defrag → Complete, then seamlessly restarts
-
80 × 35 cluster grid with a procedurally generated fragmentation pattern using multi-frequency sine waves
-
Five switchable OS themes, each with period-correct chrome and palette:
Theme Look MS-DOS (DEFRAG) Authentic text-mode console: a large cluster map drawn with █ ▓ · r W Bglyphs on the left, a Status box (cluster, % complete, elapsed, total) and a Legend box stacked on the right, a top menu bar (Optimize / Method / Drive / Configure) and a bottom key-hint bar — all in double-line box-drawing borders on CGA blueWindows 9x Teal desktop with a taskbar (Start button + four-colour flag, app button, clock), a 3D-beveled gray window with a navy gradient title bar and ✕/□/– buttons, sunken white cluster grid, a Defragmenting Drive C — NN% Completelabel, a segmented blue progress bar, and Stop / Pause / Legend buttons (blue = contiguous, red = fragmented)Classic Mac OS Top menu bar with a rainbow Apple logo (File / Edit / Disk / Special) and clock, a Platinum window with a pinstriped title bar, close/zoom/collapse boxes, drop shadow, Norton-Speed-Disk-style map, and a rounded Stop default button OS/2 Warp GammaTech HPFS-Optimizer styling: a WarpCenter strip, beveled WPS-gray window with a system-menu icon and deep-blue title bar, blue/teal HPFS map, and Optimize / Analyze / Exit buttons BeOS The signature yellow window tab, a Deskbar (blue B logo + clock) in the top-right corner, a teal desktop, and Defragment / Cancel buttons A sixth option, Random, picks a fresh theme on every defrag cycle. All chrome (desktops, taskbar/menu bar/Deskbar, window buttons) is drawn procedurally — no copyrighted screenshots are bundled.
-
8 distinct block states (Optimized / Used / System / Bad / Reading / Writing / Cleared / Free), re-mapped to each theme's palette. In the default MS-DOS theme each state has its own DOS-palette color:
Color State Bright cyan Optimized (defragmented) Light gray Used (not yet moved) Teal System / kernel file Dark red Bad sector Bright red Read head active Bright yellow Write head active Dim blue Source cluster after move Dark blue Free space -
Optional hard-disk sounds — a continuous platter hum plus seek "ticks" and arm-sweep "chirps" synthesised in real time and timed to the read/write head movements (
AVAudioEngine). Toggle and volume live in the settings sheet -
Live status line with scrolling cluster address counter and elapsed time, plus a progress bar with percentage readout
-
Monospace aesthetic using Menlo in the MS-DOS theme
-
Configuration sheet — pick the theme, enable sounds, and set the volume
-
Preview image shown in the macOS screen saver picker
- macOS 26 Tahoe or later
- Xcode 26 or later (to build from source)
No Xcode, no Terminal — just download and double-click.
- Download the latest version: MacDefrag.saver.zip (or pick it from the Releases page under Assets).
- Unzip it: double-click
MacDefrag.saver.zipin your Downloads folder. Safari usually does this for you — you then already seeMacDefrag.saver. - Double-click
MacDefrag.saver. macOS asks whether to install the screen saver for this user only or for all users of this Mac. Pick one and click Install. The release is signed and notarized by Apple, so there is no “unidentified developer” warning. - Select it: System Settings opens on its own (if not, open Apple menu → System Settings). Go to Screen Saver and click MacDefrag in the list.
That's it. To choose a theme or switch on the hard-disk sounds, see Usage.
Note: Version 0.5 uses the bundle identifier
de.johannesehrlich.MacDefrag. If you used an older build, choose your theme and sound settings once again.
Download and double-click the new version exactly as above. macOS asks whether to replace the installed one — click Replace. If the old version still shows up afterwards, quit System Settings and open it again, or log out and back in.
- Open System Settings → Screen Saver.
- Right-click (or Control-click) MacDefrag and choose Delete “MacDefrag”.
If that menu item is missing, delete the file by hand: in Finder choose Go → Go to Folder… and enter ~/Library/Screen Savers (installed for you only) or /Library/Screen Savers (installed for all users), then move MacDefrag.saver to the Trash.
For developers. Requires Xcode 26 or later.
- Open
MacDefrag.xcodeprojin Xcode - Build with
⌘B - In Xcode's Report Navigator, click the latest build and locate
MacDefrag.saverinDerivedData, or run in Terminal:
open ~/Library/Developer/Xcode/DerivedData/MacDefrag-*/Build/Products/Debug/MacDefrag.saver- macOS prompts you to install the screen saver — click Install
After installation, open System Settings → Screen Saver, select MacDefrag, and enjoy.
Click Options… (the settings sheet) to:
- Choose a theme (MS-DOS, Windows 9x, Classic Mac OS, OS/2 Warp, BeOS, or Random)
- Enable hard-disk sounds
- Adjust the sound volume
Settings are stored via ScreenSaverDefaults and applied on the next cycle.
The animation runs through four phases automatically and loops indefinitely:
- Scan — reveals the cluster map block by block while cycling through filesystem paths
- Analyze — displays fragmentation statistics (blinking, classic style)
- Defrag — animates read/write heads moving clusters into contiguous order
- Complete — brief pause before the next cycle begins
MacDefrag/
├── README.md
├── LICENSE
├── MacDefrag_Preview.jpg # Photo of the screen saver on a desk monitor
├── MacDefrag.xcodeproj
├── docs/
│ └── Recherche-DOS-Programme.md # Research (German): classic DOS programs as ideas for new themes
├── scripts/
│ ├── notarize.sh # Build, sign, notarize and staple a release ZIP
│ ├── notarize.conf # Apple ID and team ID for notarize.sh (no secrets)
│ ├── preview.sh # Smoke test: Gatekeeper check + render every theme to PNG
│ └── preview/ # Small host program used by preview.sh
└── MacDefrag/
├── MacDefragView.h # ScreenSaverView subclass interface
├── MacDefragView.m # All animation logic and drawing
├── MacDefrag.jpg # Photo of the screen saver in action
├── thumbnail.png # Picker thumbnail (90 × 58)
└── thumbnail@2x.png # Picker thumbnail, Retina (180 × 116)
- Runs at 30 fps via
ScreenSaverView'sanimateOneFrame - The fragmentation layout is regenerated on each
startAnimationcall usingarc4randomand sine waves — no two runs look identical - Bad clusters are scattered randomly at ~1.5% density
- The defrag algorithm is a simple left-to-right compaction: the write head advances to the first free slot, the read head finds the next movable block, and they are swapped over three sub-frames (read → write → commit)
- Theming is fully decoupled from the simulation: a single cluster model drives every theme, which only changes the chrome, palette, and (for MS-DOS) the rendering style. The DOS theme renders the grid as run-length-grouped attributed glyphs in a monospaced font; the GUI themes render colored squares inside theme-specific window chrome
- Audio is generated by an
AVAudioSourceNoderender callback: a low platter hum + faint whine, with short filtered-noise "tick" voices (read/write) and a descending "seek" chirp triggered whenever the head jumps more than a row. Voices are added from the animation thread under anos_unfair_lock; the engine is only started for the full-screen saver (never the preview) and only when sounds are enabled
docs/Recherche-DOS-Programme.md (German) collects classic DOS programs whose look would make a good screen saver — ScanDisk, MS-DOS Setup, PKZIP, Norton Commander and more. For each it notes the look, a screenshot source, whether it fits the existing cluster map or needs its own animation, and who owns the name today. Favourites: ScanDisk, MS-DOS 6.22 Setup and PKZIP.
Requires the “Developer ID Application” certificate of team 28AS78GU5K in the login keychain and an app-specific password for the Apple ID in scripts/notarize.conf.
- Set the new version in Xcode (target MacDefrag → General → Version,
MARKETING_VERSION). - Run
scripts/notarize.sh. Credentials come from the notarytool keychain profile named innotarize.conf(create it once withxcrun notarytool store-credentials), otherwise from the environment variableNOTARY_PASSWORDor the keychain item named innotarize.conf— the password is never stored in the repository. The script builds for Apple silicon and Intel, signs with hardened runtime, submits to Apple, staples the ticket and writesbuild/release/MacDefrag.saver.zip. - Run
scripts/preview.sh. It unpacks the ZIP like a download, checks that Gatekeeper accepts it as notarized, loads the screen saver and writes a snapshot of every theme (preview and full screen) tobuild/preview/. Nothing is installed and no sound plays. Look at the images. - On GitHub create a release with the tag
v<version>(e.g.v0.5) and attachbuild/release/MacDefrag.saver.zipunder exactly that name, so the download links in this README keep working (they always point to the latest release).
MIT — see LICENSE for details.

