Skins

Brief

A theme decides the colours. A skin decides the shape of everything around the terminals: whether corners are round or square, whether an edge is a hairline, a double rule or nothing, how the active tab stands out, and whether labels are capitals.

Figure 1. One strip of tabs in each built-in skin, with the same colours. Drawn by hand from each skin's settings over the hacker palette, not photographed from the app.

Pick one from the SKIN row in the window's DESIGN tray (🎨 in the footer), or run terminal-delight ctl skin deco. A skin applies to the whole window, never to one pane. Because a skin describes its colours as adjustments to the theme's (the accent at half strength, the text a little dimmer), every skin works with every theme.

Technical has how a skin gets chosen and every key in skin.toml.

Technical

skin.toml

Which skin draws#

  1. terminal-delight ctl skin <name>, until ctl skin theme undoes it.
  2. The file TD_SKIN names.
  3. Your ~/.config/terminal-delight/skin.toml, reloaded when you save it.
  4. skin = "…" in the theme file; deco asks for deco.
  5. default.

In the tray, SKIN lights whichever skin is drawing, and ◎ theme appears once you've chosen one, to hand the choice back. Nothing is written on first run: with no skin.toml, the theme decides. An unknown name is refused with the list of known ones.

The file#

Start from app/skins/default.toml in the repository, which lists every key, commented out. Every key is optional; one you leave out takes its default, worked out against the live palette.

name = "mine"
icon = "▲"

[shape]
corner   = "square"    # round | square
boundary = "double"    # hairline | double | inset | none
emphasis = "rail"      # fill | underline | bracket | rail | glow
divider  = "line"      # line | double | none
caps     = "tracked"   # off | upper | tracked
shine    = "flat"      # gradient | flat

[metric]
radius = 0
pad_x  = 8
rail   = 3

[ink]
rule = { from = "accent", a = 0.5 }
ink_on_mark = { from = "bg" }
panel_raised = { from = "surface", l = 1.25, max_l = 0.30 }

Shape#

KeyDefaultDecides
cornerroundRounded corners or none.
boundaryhairlineHow a region's edge is drawn. double is two thin rules.
emphasisfill; the default skin sets glowHow the active item stands out. glow is a phosphor ring, rail a bar along one side.
dividerlineHorizontal dividers.
capsoffLabels as written, in capitals, or tracked with thin spaces between the letters.
shinegradientWhether raised surfaces carry a soft gradient.

Metrics#

In pixels before the window's scale is applied; borders never scale. Defaults: radius 4, radius_lg 10, hairline 1, border 1, rule_gap 2, gap 4, pad_x 6, pad_y 4, chip_px 5, chip_py 1, row_h 15, label_size 9, bracket 5, rail 2, glow 5.25 (how far the ring spreads) and glow_a 0.11 (how bright it is, 0 to 1).

Inks#

An ink is either a fixed colour, "#1a2226", or a recipe over one of the theme's colours: { from = "accent", l = 0.8, s = 1.2, a = 0.5, max_l = 0.3, toward = "text", t = 0.4 }. from and toward name bg, surface, text, accent, complement, human, faint, cursor, white, black or ansi0 to ansi15. l scales lightness, max_l caps it, s scales saturation, toward blends by t (0.5 if left out), and a sets opacity, applied in that order.

GroupInks and their defaults
groundspanel bg · panel_raised surface · panel_sunken surface at 0.4 lightness · panel_glass bg at 0.7 · btn_face surface at 0.8 lightness
edgesrule faint at 0.25 · rule_strong surface at 0.3 lightness · edge accent at 0.35 · edge_strong accent at 0.5 · focus accent
textink text · ink_dim text at 0.7 · ink_off faint · ink_faint text at 0.6 · ink_ghost text at 0.2 · ink_on_mark white at 0.95
controlsink_lit text at 0.92 · edge_rest text at 0.3 · face_rest text at 0.06
marksmark accent · mark_soft 0.85 · mark_dim 0.4 · mark_wash 0.14 · select human · row_active human at 0.08 · hover white at 0.12
stateslive complement · ok ansi10 · warn ansi11 · danger ansi9

Fractions without a word are opacity. ink_faint at 0.6 is the lowest setting at which faint text passes 4.5:1 contrast on all six built-in themes. Selection uses the 👤 colour from the theme's wheel, not the accent.

A key the parser doesn't know is reported, never fatal, with a guess: rule_stong (no such token — did you mean rule_strong?).

Checking a skin#

terminal-delight skin --skin deco --theme hacker

Prints every resolved shape, ink, metric and type size as JSON, without a window. --list names the skins this build has; --scale is the menu-bar gauge (0.7 to 1.6) and --text-size the text-size gauge's factor (0.6 to 2.0). Exit codes: 0, 1 for a file that doesn't load, 2 for usage.

Not yet#

  • Some overlays, such as the usage card and the paint tray, may still draw rounded corners under a square skin.
  • Chamfered corners can't be drawn yet; corner is round or square.

Sources

  1. Tokens, recipes, precedence and the skin verb: skin.rs; the built-in skins: app/skins/.