CRT

Brief

Every pane in Terminal Delight is drawn as a small CRT tube. Its glass curves, its edges fall into shadow, scanlines run across it, and now and then a faint band rolls down it the way it did on an old monitor. Only the panes bend. The tabs, bars and menus around them stay flat, and a click lands on whatever is drawn under the pointer.

Two settings decide how much of it you get. The theme sets the texture: scanlines, glow, the rolling band, flicker. The warp sets the curve, pane by pane, from 0 for flat glass to 1.5; the default is 1.43. Press Ctrl+Shift+G on a pane to open its GAUGES tray, where warp sits beside brightness, contrast, colour and text size.

For none of it, choose quiet-command in the DESIGN tray (Ctrl+Shift+D) and set warp to 0.

Technical has the warp's formula, every effect and every gauge.

Technical

The tube

There are two layers. Scanlines, the tracking band, vignette, bloom, flicker, jiggle and the bezel are drawn over each pane, at strengths the theme's [effects] sets. The barrel warp and the glass glare run in a pass added to the renderer, which bends each pane's own rectangle after the frame is drawn; the same pass does the text crawl and the focus reader's blur.

warp 0 flat warp 1.43 the default
Figure 1. One pane's content grid at warp 0 and at the default 1.43, bent by the app's own formula. The centre doesn't move. A corner of the glass shows content from 12% further out, so the content's edge lands 2.4% inside the frame at mid-height and 4.5% at the top, and the corners are left as black glass. Drawn by docsite/tools/barrel-figure.mjs from the shader in the renderer patch.

Warp#

For a point c on the pane, measured from its centre in the pane's own 0–1 space, the pass shows the content at c × (1 + k1·r² + k2·r⁴), where r = |c|, k1 = 0.14 × warp and k2 = 0.06 × warp. Brightness falls to 86% toward the edge, and a bent pane is drawn 35% brighter overall so it doesn't look dim beside flat chrome. A pane at warp 0 skips the pass entirely and looks exactly as it would without it.

  • Clicks, selection and links are mapped through the same curve, so they land on what you see.
  • While a menu or dialog is open, every pane's glass is drawn flat for that frame.
  • Up to 32 bent rectangles per frame, enough for the agent wall's card pictures.
  • A new bent pane powers on over 300 ms: the phosphor floods in, collapses to a line, then pinches to a star while the terminal appears behind it. Closing it plays the second half. Flat panes skip this.

Effects#

Set in the theme file's [effects] table. Every key is optional and clamped to its range; one left out is off.

KeyRangeDefaultDraws
scanline_opacity0–0.60A dark line every scanline_step pixels, with a faint accent line under it.
scanline_step2 and up4Pixels between scanlines.
vignette0–10Shadow toward the edges, and a soft highlight at the top left. Off on the workbench and on documents.
glow0–10An accent glow around the pane header.
bloom0–10An accent haze rising toward the middle of the pane.
tracking0–10A 160 px band that rolls from top to bottom.
tracking_period2–120 s14Seconds from one band to the next.
tracking_sweep1–30 s7Seconds one band takes to cross.
flicker0–10Every 9 to 17 seconds, a half-second stutter in brightness.
jiggle0–10Every 6 to 9 seconds, the picture hops a pixel or two.
screen_glare0–10, or 0.42 for a theme named hackerA glare spot and streak at the top left of the glass. Shows only on a bent pane.
bezel0–10A raised frame around the glass.

A curvature key in older theme files is ignored: the curve is the per-pane warp now. On a fresh install your theme file starts as a copy of hacker, which turns most of these on, and the window tints it amber.

GAUGES#

Ctrl+Shift+G on a pane opens GAUGES — THIS PANE; the ⛭ in the window's footer opens GAUGES — OUTER for the whole window. A pane follows the window on every gauge until you move that gauge on the pane; ◉ follow outer hands it back.

GaugeRangeFresh windowAfter reset
text size0.6–2×0.75×1×
bench size0.6–2×, or follow text sizefollows text size1×
brightness0–10.380.5
contrast, colour, text, background, gamma0–10.50.5
menu bar0.7–1.6×0.8×1×
warp0–1.51.430, flat

0.5 is neutral on the colour gauges, and they read as a signed offset from it: +19, -34. Text and background are graded separately, and brightness can only dim text, never push it past white. Below the gauges, roll, roll spd and roll size override this pane's tracking band, and ↺ roll → per-theme gives it back to the theme.

Ctrl and the mouse wheel size whatever is under the pointer: the terminal's text, the workbench, or, over a header or the chrome, the menu bar. One notch is 5%.

An agent can set the same gauges through the MCP server's set_pane_config, each as a percentage of its range, with writes on.

Switches for debugging#

TD_NOGLASS skips everything drawn over the pane: scanlines, the band, vignette, bloom, glare. TD_NOCANVAS skips only the scanlines and the band. Neither turns off the warp; set it to 0 for that. TD_IGNITION_FREEZE=0.7 holds the power-on at that point for a screenshot.

What would prove this wrong#

Click a word near the corner of a bent pane. If the selection starts anywhere other than the word you clicked, the click mapping and the drawing have come apart.

Sources

  1. The warp and glare: 0001-td-crt-pass.patch; the overlay effects and ignition: crt.rs; effects, gauges and their defaults: theme.rs; the tube list: warp.rs.