README
A terminal emulator written entirely in Ruby — including a pure-Ruby X11 client to talk to the X server and a pure-Ruby font renderer.
There is no C extension and no libvte; the escape-sequence interpreter, the screen buffer, the rendering and the X11 protocol handling are all Ruby.
It is still rough and opinionated, but it now runs as an installable gem
with a rubyterm executable, renders with a damage-driven pipeline
(scrollback, text selection/copy, truecolor and UTF-8 all work), and is
split into a reusable terminal engine that can be driven without X11 at
all.
NOTE: Escape-code coverage is partial (VT100/VT102 plus a useful chunk of xterm), font handling is basic, and the keymap is limited. It is slow, though it is my main driver. Full-screen apps mostly work; some will still misbehave. I have specific ideas about direction, so if you'd like to contribute, talk to me first (vidar@hokstad.com) or fork — I won't promise to merge changes we haven't discussed.
This shows Rubyterm running on my Ruby based WM, running Rubyterm with a text-based-backend that renders a a terminal to text (so it can run in any terminal), running my editor Re editing the Rubyterm example. The text is rendered using the pure-Ruby TrueType font renderer Skrift, and connected to my X11 server using the Pure-X11 Ruby X11 bindings (no libX or XCB, just pure Ruby socket code).
The code is deliberately small and split along clean seams so the pieces are independently usable and testable:
Term), the damage tracker
(TrackChanges), the columnar screen buffer (TermBuffer) and the
escape/UTF-8 parsers. No pixels, no X11; drivable headlessly.