Theme Engine and Installer Architecture Lessons¶
The Problem¶
The project's ecosystem had fragmented deployment and configuration issues:
1. Running theme-engine.sh apply generated over 50 "Unknown template variable" warnings (e.g., {{GTK_THEME}}, {{ROFI_BG}}, {{MAKO_FONT}}).
2. Running the main install.sh script silently skipped deploying configurations for major components like rofi, mako, qt6ct, and zebar, and GTK themes failed to apply.
The Cause¶
- Hardcoded Template Variable Parsing: The
theme-engine.shscript lacked generic resolvers. It only successfully parsedFOOT_*variables, leaving variables for other apps unresolved. - Incomplete Installer Script:
install.shlacked deployment blocks (cp -r ...) for newly added ecosystem components. Furthermore, it looked for GTK configs indotfiles/gtk/, whereas the theme engine exported them to version-specific directories (dotfiles/gtk-3.0/anddotfiles/gtk-4.0/). - Improper Export Paths: The
theme-engine.sh exportcommand incorrectly bypassed thedotfiles/directory for Zebar, writing directly to the user's home directory ($HOME/.glzr/...), which broke version control syncing.
The Solution¶
- Dynamic Variable Resolution: Enhanced
theme-engine.shto automatically map variable prefixes (ROFI_*,MAKO_*,QT_*,GTK_*,FONT_*,CURSOR_*,COLOR_*) to their respective.inisections dynamically. - Installer Completeness: Added deployment blocks in
install.shforrofi,mako,qt6ct,zebar, andfoot, and corrected the GTK sync logic to pull fromgtk-3.0andgtk-4.0. - Export Path Fixes: Corrected the Zebar export logic in
theme-engine.shto map$HOMEpaths strictly to$DOTFILES_DIRpaths during export.