From de5062de33fadbfdf472aa6d8ea4811e043d9578 Mon Sep 17 00:00:00 2001 From: "prompt.ac/@jeffrey" Date: Fri, 11 Sep 2026 10:32:45 -0400 Subject: [PATCH] aesthetic-code: stop painting over the window Slab is colouring MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The interface painted a fixed purple ground, #463264, and Slab tints the whole Terminal window by session status — lifted to #563A7A while the machine works, pulled to #7A2B52 when it wants you, settled to #33285A when it is done. The two agree in exactly one state, blank. In every other state the rows were one purple and the rest of the window another, which reads as a hard rectangle drawn around the interface that moves every time the status changes. Both sides were right on their own. The status ground is the signal a wall of terminals is read by; the scheme's ground is what makes a terminal running a piece and the piece agree about what purple is. They just cannot both own the same pixels. Where Slab manages the window, the interface now inherits its colour instead of covering it, so the whole window carries the status together. Everywhere else — iTerm, a plain Terminal, an ssh session — it keeps painting, because this palette's light text needs a dark ground under it and there is nobody else to supply one. `AESTHETIC_CODE_GROUND=paint|inherit` forces either. Detection is Apple_Terminal plus an existing Slab state directory, which is exactly the condition under which the -aesthetic profile family gets applied. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01A1xZ1BonXHyds6EzF5H9Hb --- aesthetic-code/src/render.mjs | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/aesthetic-code/src/render.mjs b/aesthetic-code/src/render.mjs index 4e53769511..490a0aa334 100644 --- a/aesthetic-code/src/render.mjs +++ b/aesthetic-code/src/render.mjs @@ -3,6 +3,9 @@ // The palette is the Aesthetic Computer prompt's dark scheme (disks/prompt.mjs // `scheme.dark`): purple ground, pink prompt block, orange highlight, magenta // handle, light-purple secondary text. +import { existsSync } from "node:fs"; +import { homedir } from "node:os"; +import { join } from "node:path"; import { MASCOT_HEIGHT, mascotAt, mascotRow } from "./mascot.mjs"; const ESCAPE = /\x1b(?:\[[0-?]*[ -/]*[@-~]|\][^\x07]*(?:\x07|\x1b\\))/g; @@ -42,11 +45,31 @@ function cube(rgb) { const fg = (rgb) => (truecolor ? `\x1b[38;2;${rgb.join(";")}m` : `\x1b[38;5;${cube(rgb)}m`); const bg = (rgb) => (truecolor ? `\x1b[48;2;${rgb.join(";")}m` : `\x1b[48;5;${cube(rgb)}m`); +// Slab tints the whole Terminal window by session status — lifted while the +// machine works, pulled toward the prompt's pink when it wants you, settled +// deeper when it is done. Painting our own fixed ground on top of that leaves +// the interface one purple and the rest of the window another, so a hard +// rectangle appears around the text and moves every time the status changes. +// +// Where Slab is managing the window, inherit its colour and let the whole +// window carry the signal together. Everywhere else — a plain Terminal, iTerm, +// an ssh session — keep painting, because this palette's light text needs a +// dark ground under it and there is nobody else to supply one. +const slabState = join( + process.env.SLAB_HOME || join(homedir(), ".local", "share", "slab"), + "state", +); +const groundMode = (process.env.AESTHETIC_CODE_GROUND || "").toLowerCase(); +const slabManagesWindow = + process.env.TERM_PROGRAM === "Apple_Terminal" && existsSync(slabState); +export const paintsGround = + groundMode === "paint" || (groundMode !== "inherit" && !slabManagesWindow); + export const color = { reset: "\x1b[0m", bold: "\x1b[1m", inverse: "\x1b[7m", - ground: bg(palette.background) + fg(palette.text), + ground: (paintsGround ? bg(palette.background) : "") + fg(palette.text), text: fg(palette.text), prompt: fg(palette.prompt), highlight: fg(palette.highlight), -- 2.51.2