-
-
Notifications
You must be signed in to change notification settings - Fork 62
THEMING_TARGETS
This document explains the first modular layer of the iNiR theming system.
Users and contributors should be able to understand:
- which theming targets exist
- which generated inputs they consume
- how to apply a specific target
- how to add a new app integration without understanding the whole pipeline
The theming pipeline has two phases:
-
Palette generation
switchwall.shgenerate_colors_material.pyThemePresets.qml
-
Target application
scripts/colors/applycolor.sh- target modules under
scripts/colors/modules/
The new modular layer adds target manifests under:
scripts/colors/targets/*.json
Each manifest declares:
- stable target id
- backing module script
- category
- expected inputs
- high-level description
inir theme list-targetsOutput columns:
idlabelcategorymoduleinputs
inir theme inspect terminalsThis prints:
- manifest metadata
- backing module path
- whether the module exists
- whether it is executable
- resolved generated input paths
Validate all declared targets:
inir theme doctorValidate one target:
inir theme doctor editorsThe doctor currently checks:
- manifest parseability
- backing module existence
- module executability
- declared generated inputs
- current config gate value when the target declares a
configKey
Apply one target:
inir theme apply terminalsApply several:
inir theme apply gtk-kde editors chromeApply all declared targets:
inir theme apply allCreate a new target skeleton:
inir theme scaffold myappExample with custom metadata:
inir theme scaffold myapp \
--label "My App" \
--category custom \
--inputs palette.json terminal.json \
--config-key appearance.wallpaperTheming.enableAppsAndShellIf you do not pass --inputs, the scaffold now defaults to:
palette.json
Use terminal.json or material_colors.scss only when the target really needs terminal/ANSI data.
This creates:
scripts/colors/targets/myapp.jsonscripts/colors/modules/70-myapp.sh
The scaffold refuses to overwrite existing files.
gtk-kdeterminalseditorschromespicetifysddm-
steam— Adwaita-for-Steam Material You CSS
Current declared input model:
- palette-first targets:
gtk-kde,chrome,spicetify,sddm,steam - terminal-first targets:
terminals - mixed targets:
editors
Current generated inputs are still:
~/.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
Today:
-
colors.jsonandmaterial_colors.scssremain compatibility inputs used by current targets -
palette.json,terminal.json, andtheme-meta.jsonare the new explicit contracts for future target work
This lets the target layer evolve without forcing a big-bang rewrite of existing integrations.
Add a script under:
scripts/colors/modules/<nn>-<name>.sh
The module should:
- read the generated inputs it needs
- respect config toggles when appropriate
- generate/apply the app-specific output
- exit cleanly when the app is not installed or the integration is disabled
Add:
scripts/colors/targets/<id>.json
You can also generate both files automatically with:
inir theme scaffold <id>Example:
{
"id": "myapp",
"label": "My App",
"module": "70-myapp.sh",
"category": "custom",
"inputs": ["palette.json"],
"description": "Apply generated iNiR palette to My App.",
"configKey": "appearance.wallpaperTheming.enableAppsAndShell"
}List targets:
inir theme list-targetsApply only your target:
inir theme apply myappInspect the generated target:
inir theme inspect myappDoctor-check it:
inir theme doctor myappThis is the first compatibility slice, not the final architecture.
It deliberately does not replace the current pipeline yet. Instead it gives iNiR:
- explicit target discovery
- selective apply
- a clearer mental model for contributors
- a migration path away from ad-hoc module discovery
Future work can build on this to add:
- stable palette schemas
- generator/apply separation per target
-
doctor-style validation per target - scaffolding for new app integrations
Today the modular layer is:
-
Palette generation
- produces generated inputs under
~/.local/state/quickshell/user/generated/
- produces generated inputs under
-
Target manifests
- declare what each integration is and which generated inputs it expects
-
Target modules
- the real implementation scripts that generate or apply app-specific output
-
CLI layer
inir theme list-targetsinir theme inspect <id>inir theme doctor [id]inir theme scaffold <id>inir theme apply <ids...|all>
This means contributors can now reason about theming by target, instead of reverse-engineering the entire apply pipeline first.