Your Own Status Bar: User Scripts and the set() Builtin
November 15, 2026
The bottom row of a BBS screen is contested territory. The server paints its status text there; the widget wants its border there; and every terminal is too narrow for everyone who wants a word. For most of Phosphor’s life that row had exactly one author. As of the user-render seam, each user owns a small strip of it — and you are the author, in a few lines of script.
Where the slots come from
A user script is a few lines stored with your account (a sysop accepts them, the same gate as everything else on a shared board). When you log in, your scripts load; when you leave, they unload — nothing about them survives the session except the script text itself. The events ride the same grammar the reactive-bindings guide teaches, prefixed user_handler:
user_handler on mail_received {
set("mail", "✉ 2")
}
user_handler on login {
set("hi", "hey!")
}
That’s the whole vocabulary: pick an event, call set(slot, text). When new mail lands, your script runs and writes a slot — the same “it changed” moment the house variable wave gives doors (the Watch door is the reference implementation).
What set writes into
set(slot, text) writes into your personal status-bar strip, appended after the screen’s own status text. It’s deliberately small, and the bounds are explicit in UserStatusSlots:
- 3 slots per user (
MAX_SLOTS = 3) - 8 columns per slot (
MAX_COLS_PER_SLOT = 8) —"✉ 2"fits with room to spare; long values clip, they don’t wrap - a 24-column zone overall (
MAX_ZONE_COLS = 24) — a designed-for slice, not a whole row
Oversized text clips; a fourth slot is politely ignored. The server caps silently rather than erroring your script — a status line that can’t wedge can’t become a support ticket. Your slots clear when you log out, so nothing you write lingers on a shared terminal.
The strip repaints on the screen’s next refresh — a keystroke or a menu change is usually enough for your newest value to appear. The instant-update machinery underneath is the same one the board’s own counters use; the bare-connect scenario that proves Online: N+1 arrives with zero keystrokes is the reason your mail badge shows up mid-read, not only after a redisplay.
The rules of the road — same as doors
Everything the bindings guide teaches applies verbatim, because it’s the same render philosophy:
setis the only render verb. You name a slot and give it text; that’s the entire surface you can touch.- The server owns the paint. Your script never holds a component, never writes a cell directly. The server composes your strip into the bar on the next refresh — which is why a repaint is guaranteed and why you can’t fight the widget for the row.
- Pick events with a natural “it changed” moment. Mail arrives, login happens — real moments with real instants. A clock or a countdown has no such moment: it changes every second on its own, and belongs on the
on everyside of the house, not a slot you set once.
Try it
A sysop can install a starter script for you today; a door-shaped example is one screen away in the guide. Then log in, watch ✉ 2 appear the next time mail lands, and enjoy the rare feature whose failure mode is “your line doesn’t update” — bounded, silent, and yours.