Drawings

On paper first, then in Metal.

Every surface in bateri began as a written decision. This set is a selection of them: the drawing, the measurements and the reasoning. No number was made up; they come from the source code.

A-01

Exploded axonometric

Under the AppKit window, a frame passes through nine Metal pipelines, in this order: backgrounds, the wave and the dust of the dock's arrival, selection, the caret, emoji, glyphs, pictures and typing effects. Text is drawn after the caret, so the caret never covers the letter under it. When nothing on screen changes, none of them run.

bateri: exploded axonometric An exploded drawing of a bateri window: the AppKit window and nine Metal pipelines. A AppKit The window and the tabs in its title bar B glyph_fx Typing and erasing effects in the dock C image Pictures a program sends, over the text or under it D cell Glyphs from the CoreText atlas, plus rules E emoji_fragment Colour emoji sampled from its own texture F caret_fragment SDF caret: rounded corners, edge and halo G selection Mouse selection with rounded corners H dot_fragment Dust drawn onto the dock's line I wave_fragment The dock's line, rippling as it arrives J cell_bg Backgrounds, block marks and quads Z NOTENine pipelines draw a single frame.When nothing on screen changes, none of them run. N.T.S. PROJECT bateri DRAWING Exploded axonometric CONTENT AppKit + 9 Metal pipelines SHEET A-01

A-02

The tab bar

The tabs are bateri's, not the system's: drawn in the title row, in the theme's colors. The row is 40 points and a tab 30; the strip starts 12 points right of the traffic lights. A tab is at most 184 points wide and never under 120: past that the strip scrolls. + is rounded to sit in the window's corner.

A tab wears its program on a tile, as an app wears its icon, and says one thing at a time, the most urgent: a question waiting, a command running, how a command ended while you were away, a transfer. A question outranks everything, because nothing goes on in that tab until it's answered; failure outranks success, because it's the one you mustn't miss. A running command is a line going round the tile; the rest is a badge on its corner. A marked server is a thin line along the tab's top, and a transfer fills the tab's ground from the left.

The line goes round once in four seconds, however long the command has run, and the window server turns it: the app draws no frame for it, and under Reduce Motion it stands still. A program that reports its own status, as Claude Code does, runs the line only while it works. A tick or a dot stays 0.6 seconds after you look at the tab. A window with a single tab shows none of this; its title sits in the middle. A tab of several panes wears a deck: the focused pane's tile in front and, behind it, an edge for each other pane, two at the most.

tab
30 pt · 120 – 184
tile
22 × 18 pt
deck
2 · 4 pt · 2.5°
setting
[appearance] tab_icons · tab_running
zsh web Fix the flaky test zsh staging-1 84 184 28 40 pt gap 6 a separator between two quiet tabs zsh prod-web-1 6.5 22 6 184 30 18 corner 14 the server's mark a command runs scp design.fig a transfer fills the tab's ground from the left, in the accent 1 question waiting 2 command running 3 ended in failure 4 ended in success 5 transfer the most urgent wins 0 s 1 s 2 s once round in 4 s production staging development 4 a tab of three panes wears a deck an edge for each other pane, two at most each 4 pt further, 0.88 the size, turned 2.5°
A-02 The tab bar SCALE N.T.S. bateri

A-03

Split cards

Every pane is a card on a ground of its own, a tab's only pane too. No line draws a card: it reads as one by depth, with light from above. Its top edge catches the light, a dark card has a faint sheen under it, and its shadow is tucked under its foot instead of spreading over the ground.

The ground isn't a new color but one derived from two: the background a step toward the foreground, one flat tone under the title row and round every card. The step is 8% on a dark theme and 4% on a light one, where a small difference shows sooner. Every theme gets its own.

8 points between the cards and around them, none at the top: they start right under the title row. A card's corner is the window's less the gap, so the gap is as wide at the corners as along the edges. A header 34 points tall stands over every pane: the program's mark, the pane's title and, under the pointer, its tools. The focused card stands nearer, and no pane is dimmed.

gap
8 pt · 0
corner
20.5 − 8 = 12.5 pt
header
34 pt
setting
[appearance] split_style
plan 40 8 8 8 top 0 ground card focus 34 the ground 8% → foreground#000000 → #111112 a dark theme · bateri 4% → foreground#f5f6f8 → #edeef0 a light theme · bateri Light one flat tone, round every card a card, from the side top edge, 1 pt sheen, 26% cut, 1 pt shadow casts the shadow at rest focused offset914 blur1622 inset810 shadow75%90% cut55%60% depth, not a frame corner, enlarged 8 8 window 20.5 12.5 = 20.5 − 8
A-03 Split cards SCALE N.T.S. bateri

A-04

Moving a pane

A pane is taken by its header, with no key to hold. The header stands over every pane, a tab's only one too: the program's mark, the pane's title and, under the pointer, its tools. Press the band and move 4 points, and the pane is carried by a small card that hangs from the pointer, while the pane itself keeps its place under a veil.

Carried over another pane, nothing moves until you let go; the place it would take is painted and labelled Left, Right, Above, Below or Swap. More than 28% in from every edge is the middle, a swap; nearer an edge, it goes beside. An 18-point strip along the window's edge makes a full-height column or full-width row, two fifths of the window.

Room is made by shrinking the panes around it, none below 20 × 5; a place that is still too small says so. Let go on a tab and the pane joins it; between two tabs it becomes a tab, and outside the window a window. The program is resized once, when it lands; the panes slide there in 200 ms, and a drop that does nothing flies back.

grip
the header · 4 pt
header
34 pt
smallest pane
20 × 5
taken by its header npm run dev 34 14 22 tools, under the pointer 16 npm run dev the card that carries it or let go on a tab: joins it between tabs: a tab outside: a window where it lands Swap Left Right Above Below 28% at the window's edge 18 pt full height 40% nothing moves until you let go
A-04 Moving a pane SCALE N.T.S. bateri

A-05

Anatomy of a cell

The grid's unit is the cell, not the letter. A letter sits in the middle of its cell on a fixed baseline; open up the line spacing and the letter stays where it is.

Box-drawing lines aren't taken from the font: the terminal draws them itself, from one edge of the cell to the other, so no hairline gap opens between rows. A wide character takes two cells and is never split down the middle.

Example setting: Menlo 14 pt, line height 1.2. The default is 13 pt and 1.0; the rule doesn't change.

g 界 8.5 pt 17 pt · 2 cells 20 pt 14.5 pt baseline edge to edge
A-05 Anatomy of a cell SCALE 14:1 bateri

A-06

Section through the dock

The dock lives in its own band at the bottom of the window: the input row, the context row and 32 points of space around them. With a 20-point cell, the one drawn on A-05, the band is 72 points.

Over ssh the line you type stays in the dock where the server's shell is set up for it. Where it isn't, as on a host marked production by default, the band shrinks to one row, 36 points here, and its top line takes the color of the server's mark. The terminal's size doesn't change: the grid just moves down, and no program has to redraw.

The dock is a plate one level above the content. Its top edge is the plate's rim catching the light, and it casts a shadow 12 points up onto the last lines of output, drawn under their text so they stay crisp. A band of one row casts none: the line you type is then the grid's own, right above the edge.

local ssh · production grid 72 pt grid 36 pt 36 pt input row ~/code/web context row prod-web-1~/app context row 12 top line the plate's lit rim shadow · 12 pt under the text top line the mark's color one row: no shadow the terminal keeps its size
A-06 Section through the dock SCALE N.T.S. bateri

A-07

The dock's arrival

In a new tab the dock stays empty until the shell gives its first prompt: the folder, branch, prompt mark and caret are held back. Nothing moves for the first 0.18 seconds, so a quick shell never flickers; after that, only the top line ripples faintly.

When the prompt comes, the scene is over in 0.56 seconds: the ripple settles, a wave runs right from the ›, the folder row's tone opens from the left, the folder and branch appear, and the caret comes last.

If the shell says nothing for 3 seconds, the dock arrives anyway. A key press, or leaving the window or tab, ends the scene at once; with Reduce Motion it's a 0.12-second fade.

4 choices
ripple · dust · type · off
setting
[motion] dock_arrival
waits for the shell to speak folder, branch, › and caret wait…while the shell startsafter 0.18 s · at most 3 s0.08 s› opensripple settles0.20 swave runs righttone opens, from the left~/code/web | main0.28 sfolder and branchcaret~/code/web | main0.56 s0.56 s, then a straight line when the prompt comesripple settleswave runs right› openstone opens, from the leftfolder and branchcaretcolor settles00.10.20.30.40.5s0.56
A-07 The dock's arrival SCALE N.T.S. bateri

A-08

The caret's spring

The caret doesn't teleport; it travels on a critically damped spring: it speeds up, slows down, and never overshoots. The stiffness, ω = 30, is a chosen number, not a measured one.

Because the thresholds are absolute, settling time grows with distance: about 230 ms for one cell, about 460 ms for 400 cells. These weren't measured; they were computed from the closed form. The 0.7-second ceiling isn't a duration, it's a seat belt.

the caret, frame by framespring · ζ = 1 · ω = 30git log --oneline --graph --allone caret per frame, 1/60 s apartζ = 0.5 · overshoots · not baterigit log --oneline --graph --alltargetnever passes the targetdistance left1 cell≈ 230 ms400 cells≈ 460 msceiling 0.7 sD0snap0.00.10.20.30.40.5s
A-08 The caret's spring SCALE GRAPH bateri

A-09

The caret's shape

The caret isn't a flat rectangle but a distance field (SDF): rounded corners, a soft edge. Its corner radius is a share of the cell's height, 0.10 by default, so it keeps its proportions at any font size; at 0.5 it becomes a pill.

The halo lives only outside and is as light as a box shadow: two fifths of the side margin, 10% at its darkest. The first version glowed like neon; cursor_glow scales spread and darkness together, as one feeling.

cursor takes three shapes; out of focus a block is an empty outline. The selection has its own corner, 0.22. Blinking is off by default: on, an idle window would draw two frames a second.

a r = 0.10 h h halo 0.4 · 0.10 the letter beneath takes the background color cursor_radius 0.000.100.250.50 pill cursor blockunderlinebeamhollow out of focus a shadow, not neon
A-09 The caret's shape SCALE 14:1 bateri

A-10

Arrivals and departures

A typed letter arrives in 240 ms. The first choice was 120 ms; in a real window the effect turned out to be invisible, and the duration doubled.

A deleted letter takes a notch longer, 300 ms, to go: the eye reads what was erased, while it already knows what it typed.

9 arrivals
fade · rise · pop · extrude · heat · echo · drop · ink · squeeze
8 departures
iris · undertow · echo · bleed · unravel · recede · sublime · shatter
pop arrival · 240 ms shatter departure · 300 ms a a a a a aaaa aaaa aaaa aaaa aaaa 060120180240ms grows, doesn't bounce
A-10 Arrivals and departures SCALE N.T.S. bateri

A-11

Color

A theme is twelve roles; every key is optional, and a missing one comes from a built-in theme: the one the file is named after, or else bateri's own, dark or light as the file's background is. The caret is the gold of the icon.

Status colors are meaning, not decoration: success green, error red. A server you've marked production is red, staging yellow, development green, unmarked cyan. A running command is blue.

background#000000foreground#d8d9dddim#909093accent#7a9cc6→ running commandcursor#d9b063selection#283042search_match#3a3212search_current#503a0csuccess#8bb58b→ developmenterror#d16d6a→ productioninfo#79b3b3→ unmarkedwarning#d6b16a→ staging the icon's gold
A-11 Color SCALE THEME · bateri bateri

A-12

Details

Small decisions, enlarged: what happens when a letter doesn't fit its cell, what's drawn when the screen is still, and where box-drawing lines come from.

The whole glyph, or a box

A character missing from your font comes from the system, a prompt's symbols from a font bateri ships, and is drawn whole: in its cell, across two for a wide one, or shrunk just enough to fit. Past 2.2 times it would be too small to read, so it is a box. A half-clipped letter is silent damage; a box is an honest gap.

Quiet when idle

When nothing on screen changes, no new frame is drawn, and your battery and fans notice. It isn't a wish: it's a measured gate, and a change that breaks it turns the test red.

Lines drawn by the terminal

Box drawing, block and Braille characters are drawn by the terminal, not taken from the font. No hairline gaps between rows; htop's frame stays in one piece.

Download bateri

Free and openly licensed. Open it and your zsh arrives as usual; bateri handles the rest.

Download for macOS

macOS 14 or later, Apple silicon · Free software, GPL-3.0

Or with Homebrew: