Profiles and Palettes
Profiles are the core of Themis’s theming system. A profile defines variables that get applied to all your enrolled applications.
Profile Structure
Section titled “Profile Structure”A profile is a YAML file in ~/.config/themis/profiles/:
vars: bg: "#2e3440" fg: "#eceff4" accent: "#88c0d0" font_family: "JetBrains Mono" transparency: 0.95Variables can be any type: strings, numbers, booleans, or even arrays.
Palettes
Section titled “Palettes”Palettes are reusable sets of color variables. They’re stored in:
- User palettes:
~/.config/themis/palettes/ - System palettes:
/usr/share/themis/palettes/
A palette has the same structure as a profile:
vars: bg: "#2e3440" fg: "#eceff4" color0: "#3b4252" color1: "#bf616a" # ... more colorsInheritance with include
Section titled “Inheritance with include”Profiles can include palettes to inherit their variables:
include: nord # Includes palettes/nord.yaml
vars: # Override or add variables font_family: "Fira Code" transparency: 0.9The inheritance chain works like this:
- Load the included palette’s variables
- Override with the profile’s variables
- Override with any config overrides
Chained Inheritance
Section titled “Chained Inheritance”Palettes can include other palettes:
vars: font_family: "Monospace" font_size: 12
# palettes/nord.yamlinclude: basevars: bg: "#2e3440" fg: "#eceff4"
# profiles/my-theme.yamlinclude: nordvars: font_family: "JetBrains Mono" # Overrides baseResult: font_size: 12 (from base), bg: #2e3440 (from nord), font_family: JetBrains Mono (from
profile)
User vs System Palettes
Section titled “User vs System Palettes”When you include: nord, Themis searches:
~/.config/themis/palettes/nord.yaml(user palette)/usr/share/themis/palettes/nord.yaml(system palette)
User palettes take precedence, allowing you to customize system palettes.
Config Overrides
Section titled “Config Overrides”You can override variables in themis.yaml without modifying profiles:
enroll: kitty: type: template # ...
overrides: global: font_size: 14 # Applied to all apps
kitty: font_size: 16 # Only for kittyOverride precedence (highest to lowest):
- App-specific overrides (
overrides.kitty) - Global overrides (
overrides.global) - Profile variables
- Included palette variables
Circular Inheritance Detection
Section titled “Circular Inheritance Detection”Themis detects and prevents circular includes:
# This will error: "Circular include detected"include: b
# palettes/b.yamlinclude: aBest Practices
Section titled “Best Practices”- Use palettes for colors - Keep color schemes in palettes for reuse
- Use profiles for settings - App-specific settings go in profiles
- Name profiles by purpose -
work.yaml,gaming.yaml,presentation.yaml - Keep variables flat - Nested objects can’t be passed to templates easily