Foot Terminal Configuration Lessons¶
The Problem¶
When generating configurations for the foot terminal emulator, users encountered errors such as:
error: foot: ~/.config/foot/foot.ini:27: [colors-dark:].regular7: #bac2de: color must be in RGB format
The Cause¶
There were two strict syntax rules in foot's configuration that were being violated by the generated template:
1. Hex Color Format: foot requires RGB hex colors to be specified without the # prefix (e.g., 1e1e2e instead of #1e1e2e).
2. Colors Section Naming: foot now expects the section containing terminal color definitions to be explicitly named [colors-dark] (or [colors-light]). The previously used [colors] section name is deprecated and will result in a warning.
The Solution¶
- Updated the template
templates/foot.ini.tmplto use the correct[colors-dark]section header. - Added parsing logic in
scripts/theme-engine.shto automatically strip#prefixes from any variables destined for thefootconfiguration (i.e. variables prefixed withcolor_).