-
-
Notifications
You must be signed in to change notification settings - Fork 62
THEMING_ARCHITECTURE
snowarch edited this page Apr 25, 2026
·
1 revision
This document describes the current iNiR theming pipeline at a high level.
The theming system has two big stages:
- Palette generation
- Target application
Inputs can come from:
- wallpaper image
- explicit seed color
- manual preset theme
- dark/light mode choice
- palette type / scheme variant
Main generators today:
scripts/colors/switchwall.shscripts/colors/generate_colors_material.pymodules/common/ThemePresets.qml
Main generated artifacts today:
~/.local/state/quickshell/user/generated/colors.json~/.local/state/quickshell/user/generated/material_colors.scss~/.local/state/quickshell/user/generated/palette.json~/.local/state/quickshell/user/generated/terminal.json~/.local/state/quickshell/user/generated/theme-meta.json
Target application consumes the generated artifacts and writes app-specific outputs.
Current orchestrators:
scripts/colors/applycolor.shscripts/colors/apply-targets.sh
Target metadata lives in:
scripts/colors/targets/*.json
Target implementations live in:
scripts/colors/modules/*.sh
Important practical rule:
-
colors.jsonis the runtime shell/UI palette authority -
material_colors.scssis still a compatibility input for terminal/editor targets -
palette.jsonis the explicit shell palette contract for future target consumers -
terminal.jsonis the explicit terminal palette contract for future target consumers -
theme-meta.jsoncarries generation metadata such as source, mode, scheme, and generator -
generate_colors_material.pyis the single authoritative palette generator — it handles both Material You color extraction AND template rendering (GTK, fuzzel, KDE, etc.)
Current state:
-
matugenhas been removed as a dependency — all color generation and template rendering is handled by Python (materialyoucolorlibrary + built-in template engine) - templates use
{{colors.token.mode.hex}}syntax (compatible with former matugen templates) - template manifest:
defaults/matugen/templates.json(declares input/output paths) - first shell/UI consumers now prefer
palette.jsonand fall back tocolors.json - terminal/editor generators and terminal escape-sequence application now prefer
terminal.json+palette.jsonand keepmaterial_colors.scssas compatibility fallback - browser mode detection now prefers
theme-meta.jsoninstead of scraping SCSS state - new scaffolded targets now default to
palette.jsonas their declared input - the existing Go VSCode generator now also consumes
terminal.jsonexplicitly instead of relying only on SCSS for ANSI data - the editors target now has a small shared Go theming core used by both VSCode and OpenCode generators
- the migration remains compatibility-first, not big-bang
Each target manifest declares:
idlabelmodulecategoryinputsdescription- optional
configKey
This is the first compatibility slice of the modular system.
The intended next improvements are:
- stronger
doctorchecks per target - target scaffolding for new integrations
- migrate target consumers from compatibility files toward the explicit generated contracts
- cleaner separation between
generate,apply, andreload
A compiled-language migration (Go themegen) is partially in place for some targets. See scripts/colors/system24_themegen/ for the current Go generator.