Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

appearance.md

91 lines4.9 KB

1# Appearance and themes
2​
3Customize T3 Code's theme, light/dark appearance, math rendering, motion, and custom CSS. Appearance settings are saved per device or browser.
4​
5## Switch themes and appearance
6​
7- **Web and desktop**: Open **Settings → Appearance** to choose a theme and light, dark, or system mode. Select the light or dark preview on a theme card to pair different themes with each mode.
8 - Open theme picker from anywhere: `Cmd+Option+A` (macOS) or `Ctrl+Alt+A` (Windows/Linux), or **Change theme** in the command palette.
9 - Cycle System / Light / Dark: `Cmd+Option+Shift+A` (macOS) or `Ctrl+Alt+Shift+A` (Windows/Linux), or **Change appearance** in the command palette.
10- **Mobile**: Open **Settings → Appearance**. Mobile uses its own themes and text/code/terminal preferences and does not follow environment themes.
11 - On Android 12+, **Material You** pulls colors from your wallpaper (configurable separately for light and dark), and **Material You Layout** controls Material You shapes and spacing independently of the theme.
12​
13## Composer context
14​
15Git-backed projects show branch and worktree controls below the composer before the first message. Turn on **Settings → Appearance → Composer context** (web and desktop) to keep those controls visible after the thread starts.
16​
17## Math
18​
19Turn on **Settings → Appearance → Render math** (per device) to render LaTeX in messages and Markdown previews on web, desktop, and mobile.
20​
21- Supports `$…$`, `$$…$$`, `\(…\)`, `\[…\]`, and fenced `math` blocks outside of code.
22- Currency like `$5 and $10` stays plain text; use `\$` to escape other literal dollar signs.
23- Copying a formula or exporting a table preserves the raw TeX. The composer keeps TeX source editable.
24​
25## Motion
26​
27Sidebars, the right panel, and the terminal drawer open immediately by default. Adjust **Settings → Appearance → Panel animations** (0–400 ms) to enable transitions, unless OS reduced motion is enabled.
28​
29## Custom themes
30​
31On web and desktop, choose **Create theme** in **Settings → Appearance** to edit a palette, import a T3 Code or VS Code theme, or export your theme as JSON.
32​
33### Custom CSS
34​
35Open **Custom CSS** in the theme editor for styling beyond palette colors. Custom CSS is saved with the theme and included in exports.
36​
37- Use `.dark` or `:root:not(.dark)` to target one appearance.
38- Target `data-slot` and other `data-` attributes (such as `[data-chat-header]` or `[data-slot="button"]`) rather than class names, which change between releases.
39- External resource loading (`@import`, `image-set()`, and non-`data:`/`#id` `url()`) is blocked for security. Use a [background image](#background-image) for full-size images.
40- **Recovery**: If custom CSS hides something you need, run `t3 theme set t3-chat` on the server or press `Cmd+Option+A` / `Ctrl+Alt+A` to switch themes.
41​
42### Ask an agent
43​
44An agent running on the same machine as the server in **Full access** mode can restyle T3 Code for you (for example, "give T3 Code a solarized theme"). It publishes an [environment theme](#environment-themes) and switches connected web and desktop clients to it. Ask the agent to switch back to a built-in theme to undo.
45​
46## Environment themes
47​
48Environment themes come from the server serving your web app or the desktop app's local environment (or local [background service](./background-service.md) when the built-in local environment is off). Hosted `app.t3.codes` and remote connections do not apply them.
49​
50Select a published theme in **Settings → Appearance** to track server updates, or **Duplicate** it for an independent editable copy.
51​
52Manage the server default from the CLI:
53​
54```bash
55t3 theme set nightfall # Set default and switch connected/reconnecting clients once
56t3 theme clear # Remove the default without changing current client themes
57t3 theme show # List the default and all published themes
58```
59​
60### Publish a theme
61​
62Save an exported theme JSON into `~/.t3/userdata/themes/` on the server (or `themes/` under your custom state directory). The filename sets the theme ID (e.g. `nightfall.json` → `t3 theme set nightfall`). Avoid reserved IDs (`system`, `light`, `dark`, or built-in theme IDs).
63​
64You can also use a minimal palette format—T3 Code generates the remaining tokens:
65​
66```json
68 "name": "Nightfall",
69 "appearance": "dark",
70 "canvas": "#1a1b26",
71 "accent": "#7aa2f7",
72 "colors": {
73 "terminalSelection": "#292e42",
74 "error": "#f7768e"
75 }
77```
78​
79Include an optional `css` string for [custom CSS](#custom-css). Write updates atomically (temp file + rename) so clients never read a partial file.
80​
81### Background image
82​
83Place a JPEG, PNG, or WebP file (up to 16 MB) next to a published theme file with the same base name (e.g. `nightfall.jpg` beside `nightfall.json`), or ask an agent to set one. Reference it in the theme's CSS:
84​
85```css
86[data-workspace-area="conversation"] {
87 background: var(--theme-background-image) center / cover no-repeat;
89```
90​
91Delete the image file to remove it.