Configuration Design
Philosophy: The “Contractor” Model
Section titled “Philosophy: The “Contractor” Model”Themis acts as a contractor executing a renovation. The user provides a Work Order (Configuration) that specifies:
- The Blueprint: What style are we applying? (The Profile)
- The Scope: Which rooms are we renovating? (Enrollment)
- Specific Instructions: Any custom deviations? (Overrides)
1. The Blueprint (The Profile)
Section titled “1. The Blueprint (The Profile)”A Profile is a Superset of variables required by the supported applications.
metadata: name: Nord
# The "Superset" of variablesvars: mode: "dark" wallpaper: "~/Pictures/nord-mountains.jpg" accent_color: "#88C0D0"
# Colors bg: "#2E3440" fg: "#D8DEE9"2. The Scope (Enrollment)
Section titled “2. The Scope (Enrollment)”The user should not be burdened with configuring applications they don’t use. The themis.yaml
config simply lists which “Integrations” are active.
# themis.yaml (User Config)
# 1. Global Statecurrent_profile: "nord"
# 2. Enrollment (The Scope)# Only these apps will be touched.enroll: - gtk - foot - dunst # - qt (Commented out, so Themis ignores QT completely)3. Overrides (Specific Instructions)
Section titled “3. Overrides (Specific Instructions)”Users can override global variables from the Profile for specific apps.
overrides: # Global Override (Apply to all apps) global: wallpaper: "~/Pictures/my-custom-wall.png"
# App-Specific Override foot: # Use a specific font size for Foot, ignoring the profile defaults font_size: 144. Resolution Logic
Section titled “4. Resolution Logic”When Themis updates an application (e.g., foot):
- Check Enrollment: Is
footin theenrolllist? If no, skip. - Load Handler: Load the integration logic for
foot. - Resolve Variables:
- Start with Profile variables.
- Merge Global Overrides.
- Merge App-Specific Overrides.
- Execute: Pass the resolved variable set to the Handler.
5. Benefits
Section titled “5. Benefits”- Minimal Config: A user only lists the apps they use.
- Safety: Themis doesn’t touch config files for unenrolled apps.
- Flexibility: Presets provide the basics, but users have full control to tweak specific apps without breaking the global theme.