munch(6)
π munch(6) β the XScreenSaver manual, but make it cute π
okay bestie so you're reading the XScreenSaver manual, section 6 (6 is the games/demos girlies, iykyk), and this page is all about munch. it's giving retro-iconic and honestly it ate. let's get into it π
β¨ NAME β¨
munch β munching squares. that's it. that's the whole vibe. πͺπ©
β¨ SYNOPSIS β¨
munch [--display host:display.screen] [--foreground color] [--background
color] [--window] [--root] [--window-id number][--mono] [--install]
[--visual visual] [--delay usecs] [--xor] [--noxor] [--clear number]
[--simul number] [--classic | --mismunch | --random] [--fps]
copy it exactly, queen, don't be retyping flags from memory π
β¨ DESCRIPTION β¨
so munch runs the munching squares hack, and it full-on picks the square size, the position, and the gravity randomly every time. main character energy fr fr. it also shows off a creatively broken misimplementation of the classic algorithm β like a chaos remix, and we love her for it π«Ά
here's the actual lore: the munching squares hack is just drawing Y = X XOR T for a range of X and T, over and over, until all the possible combinations of X and T have come up. that's the whole bit. reportedly discovered by Jackson Wright in 1962, and it took 5 instructions of PDP-6 code. five. π₯ not me being obsessed with a five-instruction flex.
β¨ OPTIONS β¨
munch accepts the following options:
--windowβ draw on a newly-created window. this one is the default, so it's already happening, no notes π--rootβ draw on the root window instead. go big, put it on your whole desktop background, slay π--window-idnumber β draw on the window you point at with that specific id number. targeted behaviour, we respect it π―--monoβ if you're on a color display, just pretend we're on a monochrome display. delusion, but make it intentional π--installβ install a private colormap for the window. fancy palette, private club β¨--visualvisual β specify which visual to use. legal values are the name of a visual class, or the id number (decimal or hex) of a specific visual. do not invent a third kind, bestie π--delayusecs β the delay between steps of the animation, in microseconds. default:2500. that's the tempo, the bpm, the heartbeat π--xorβ use the XOR drawing function. this is the default, iconique as always π--no-xorβ don't use the XOR drawing function. contrarian queen behaviour π--clearnumber β number of squares to misdraw before clearing the display. default:65--simulnumber β number of squares to misdraw simultaneously. default:5. multitasking icon π₯--classicβ draw classic munching squares only. pure, unbothered, original recipe πΈ--mismunchβ draw "mismunch" only. the broken remix, only β€οΈβπ₯--randomβ do one or the other. chaos decides, we just press play π²--fpsβ display the current frame rate and CPU load. numbers on screen, we love stats π¦
tiny heads-up:--no-xoris how it's written in the options list, but the synopsis spells it--noxor. both live here, both are valid, don't come for me π
β¨ ENVIRONMENT β¨
DISPLAYβ to get the default host and display number. this is how it knows where to draw, periodt πXENVIRONMENTβ to get the name of a resource file that overrides the global resources stored in theRESOURCE_MANAGERproperty. fancy override energy β¨XSCREENSAVER_WINDOWβ the window ID to use with--root. it's giving teamwork π«Ά
β¨ HISTORY β¨
okay history lesson, grab a strawberry π
HAKMEM: MIT AI Memo 239, Feb. 29, 1972. Beeler, M., Gosper, R.W., and Schroeppel, R.
"Unless otherwise stated, all computer programs are in PDP-6/10 assembly language."
not the all-caps quote, they knew they were being iconic β€οΈ
π ITEM 146: MUNCHING SQUARES π
another simple display program. it is thought that this was discovered by Jackson Wright on the RLE PDP-1 circa 1962. ancient lore, still serving:
DATAI 2
ADDB 1,2
ROTC 2,-22
XOR 1,2
JRST .-4
2=X, 3=Y. try things like 1001002 in data switches. this also does interesting things with operations other than XOR, and rotations other than -22. (try IOR; AND; TSC; FADR; FDV(!); ROT -14, -9, -20, ...) go wild, experiment, it's your sandbox π§
π ITEM 147 (Schroeppel) π
munching squares is just views of the graph Y = X XOR T for consecutive values of T = time. that's the tea β
π ITEM 148 (Cohen, Beeler) π
a modification to munching squares which reveals them in frozen states through opening and closing curtains: insert FADR 2,1 before the XOR.
try data switches =
4000,,4 1000,,2002 2000,,4 0,,1002
(notation: <left half>,,<right half>)
also try the FADR after the XOR, switches = 1001,,1. two variations, both valid, pick your fighter π
β¨ SEE ALSO β¨
X(1), xscreensaver(1), https://www.inwap.com/pdp10/hbaker/hakmem/hakmem.html
go read the friends, they're literally right there π¦
β¨ COPYRIGHT β¨
Copyright Β© 1997 Tim Show alter. Copyright Β© 2004 Steven Hazel. Copyright Β© 1992-2008 Jamie Zawinski.
permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation. no representations are made about the suitability of this software for any purpose. it is provided "as is" without express or implied warranty.
no warranty bestie, it's "as is", handle with care ππ«Ά
and that's the page!! shoutout to the X Version 11 girlies, this is version 6.15 dated 30-Mar-2026, and yes we're still on munch(6). byeee ππ
π¦ where this page comes from
- alpine 3.24: xscreensaver-doc 6.15-r0 Β· GPL-2.0-or-later GPL-3.0-or-later 0BSD MIT
- arch rolling: xscreensaver 6.15-1 Β· LicenseRef-XScreenSaver
- nixpkgs unstable: xscreensaver 6.15
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms