Themes: the JSON schema

A theme is a folder with theme.json (required: id, name), plus an optional wallpaper and icons. Shipped themes: /usr/local/share/yapuka/themes/<id>/; yours: ~/.config/yapuka/themes/<id>/.


python3 /usr/local/lib/yapuka/yapuka_theme.py check ~/.config/yapuka/themes/my-theme
python3 /usr/local/lib/yapuka/yapuka_theme.py apply my-theme

{
  "id": "my-theme", "name": "My theme", "author": "Lou", "version": "1.0", "mode": "light",
  "colors": { "accent": "#237a35", "accent_text": "#ffffff", "background": "#fbfff5", "surface": "#ecf6df",
              "panel": "#f1f8e6", "panel_text": "#1d3a1f", "text": "#1d3a1f", "muted": "#4b6a46", "focus": "#d9480f" },
  "fonts": { "ui": "Nunito" }, "radius": 24,
  "dock": { "opacity": 0.92, "style": "clair" }, "notch": { "style": "panneau" }, "wallpaper": "fond.jpg"
}
FieldValue
modelight or dark
colors.*#rrggbb; hover tints and panel cards are computed from them
fonts.ui / titlean installed font family (Nunito, DejaVu Sans/Serif/Mono, Parisienne)
radius0 to 30 px
dock.styleclair (window colours) or panneau (panel colours)
notch.stylenoir or panneau (the field name is internal; the user-facing name is Fidel)
wallpaperrivage, coucher-de-soleil, nuit-etoilee, prairie, or a picture in the folder

Strict rules: unknown fields are refused, pictures are checked from their first bytes, SVGs may hold no scripts or external links, theme.json 64 KB at most, wallpaper 8 MB. Text must reach WCAG AA contrast (4.5 : 1); yapuka_theme.py check says which colours fall short.

Updated on