Problem
I have Ghostty set to theme = Gruvbox Light and WezTerm using a custom gruvbox_light table ported from Windows Terminal (#FBF1C7 cream background, #282828 foreground, exact ANSI). iTerm2’s built-in “Gruvbox Light” was close but not identical, and my initial custom .itermcolors + DynamicProfile only populated the dropdown — Basic Colors stayed #FFFFFF/#000000.
chezmoi managed kept saying “not managed”, cwd=~/tmp turned relative Library/... paths into ~/tmp/Library/..., and Cmd+Q + reopen didn’t load the colors. The session ballooned to 80 tool calls.
What worked
- Official preset over custom plist
curl -sSL https://raw.githubusercontent.com/morhetz/gruvbox-contrib/master/iterm2/gruvbox-light.itermcolors \ -o "$HOME/Library/Application Support/iTerm2/Color Presets/GruvboxLight.itermcolors" open "$HOME/Library/Application Support/iTerm2/Color Presets/GruvboxLight.itermcolors"plutil -pconfirms#FBF1C7background. Filename-driven (no explicit “Color Preset Name” key). - chezmoi with absolute target paths (the key fix)
chezmoi add "$HOME/Library/Application Support/iTerm2/Color Presets/GruvboxLight.itermcolors" chezmoi add "$HOME/Library/Application Support/iTerm2/DynamicProfiles/profiles.json" chezmoi apply "$HOME/Library/Application Support/iTerm2"private_Library/...in source maps correctly. Neverchezmoi addpaths insidesourceDir. - Self-contained DynamicProfile
Embed full color dicts (not just
Custom Color Presetname) so new windows don’t need “Load Preset”:{ "Profiles": [{ "Guid": "12C59B15-BAFA-4898-87C4-309EFA5F06FA", "Name": "Gruvbox Light", "Normal Font": "JetBrainsMono Nerd Font 13", "Custom Color Preset": "GruvboxLight", "Use Bold Font": true, "Use Bright Bold": true, "Scrollback Lines": 100000, "Background Color": { "Red": 0.979, "Green": 0.936, "Blue": 0.733, "Color Space": "Calibrated" }, ... (all Ansi + Foreground, Cursor, Selection) }] } - Activation
defaults write com.googlecode.iterm2 "Default Bookmark Guid" -string "12C59B15-BAFA-4898-87C4-309EFA5F06FA" osascript -e ' tell application "iTerm" activate create window with profile "Gruvbox Light" end tell '
Lessons
- Dropdown ≠ applied. Load Preset is mandatory for the current profile.
private_Library+ absolute$HOME/Librarytargets is the chezmoi pattern for macOS (relative paths +~/tmpcwd = silent failure).- morhetz/gruvbox-contrib is the canonical source — our initial custom plist had sRGB vs Calibrated mismatch.
plutil -extract "Color Preset Name" raw ...orplutil -pto debug naming.- Managed skill
iterm2-gruvbox-chezmoinow contains the full repeatable workflow.
Result
New iTerm2 windows open with exact parity to WezTerm (Ctrl+Shift+T toggle) and Ghostty (theme = Gruvbox Light). The 80-call war is over.
Sources
- morhetz/gruvbox-contrib iterm2/gruvbox-light.itermcolors
- iTerm2 Dynamic Profiles docs
- Chezmoi private_ discussion
- Managed skill:
iterm2-gruvbox-chezmoi
Posted from the new iTerm2 window with Gruvbox Light active.