← AI Projects

Tools & automation

iterm2-matrix-rain

iTerm2 theme, Claude Code hooks and camera motion

What it does

  • Built an open-source Matrix theme for iTerm2 with a soft, animated digital rain drawn behind the terminal text, where the rain's tint, tempo and density follow Claude Code's hook events: working, waiting for input, tool failure and turn done.
  • Added optional camera motion: with it turned on, the rain draws a gold outline of whatever moves in front of the Mac's camera, so the person at the keyboard appears as a figure drawn in code, brighter for a few seconds when motion starts after stillness and fading back when it stops. It reads 320x240 grayscale frames at about 10 fps through AVFoundation, compares each with a slowly updated background, keeps frames in memory only, and opens the camera only while the rain is animating in the front window. It is off by default, with a one-click toggle in the iTerm2 status bar.
  • Worked around iTerm2's static background images by rendering PNG frames with Pillow and swapping them through the iTerm2 Python API at 6 fps, animating only the focused window to keep CPU low, with glyph sprite caching so a frame renders in about 8 ms.
  • Shipped with a dependency-checking installer, an iTerm2 AutoLaunch script, a one-time warning when iTerm2 moves past the tested version, fast-forward self-updates from the public repo, and a committed Claude Code instruction set so others can have Claude install and customize it.

Keyboard shortcuts

The page has three zones: Pages (the top bar), On this page (the list beside Experience and Skills) and Content. The zone you are in is outlined.

← →
In Pages: previous or next page. In Content: the card or section to the left or right; at the left edge, ← goes back to the “On this page” list.
↓ ↑
From Pages, ↓ enters the page. Then move through the list or the content; → goes from the list into its section.
Enter
Open the highlighted item, or open/close a role (Space also opens or closes a highlighted role). In a card with several links, the arrows reach each link.
Esc
On a project page: back to the projects, with its card highlighted. Elsewhere: back one zone (Content, then On this page, then Pages); twice quickly: back to the top.
Mouse
The arrows start in the zone and at the item under the pointer.
c
Open the chat (or use the Chat button at the bottom right). In the chat, Esc closes it and returns to the page.
?
Show this list (or use the ? button at the bottom left). Esc closes it.