主题配置/
├── README.md # 本说明文件
├── switch-theme.sh # 主题切换脚本
├── opencode/
│ ├── theme1-catppuccin-mocha.json # 主题1: 深色主题
│ ├── theme2-architect-light.json # 主题2: 暖色浅色主题
│ ├── theme3-ethereal-frost.json # 主题3: 冷色浅色主题
│ ├── theme4-deep-ocean.json # 主题4: 深海科技浅色主题
│ ├── theme5-soft-noir.json # 主题5: 柔黑中调主题
│ └── theme6-parchment.json # 主题6: 羊皮纸浅色主题
└── ghostty/
├── theme1/
│ └── config # 主题1: Catppuccin Mocha
├── theme2/
│ └── config # 主题2: Architect Light
├── theme3/
│ └── config # 主题3: Ethereal Frost
├── theme4/
│ └── config # 主题4: Deep Ocean
├── theme5/
│ └── config # 主题5: Soft Noir
└── theme6/
└── config # 主题6: Parchment
- OpenCode:
catppuccin-mocha.json - Ghostty:
theme1/config - 特点: 深紫色背景,粉紫色强调色,磨砂玻璃效果
- 适用: 夜间使用,护眼模式
- OpenCode:
architect-light.json - Ghostty:
theme2/config - 特点: 温暖的米色背景(#F5F2E9),类似纸张质感,珊瑚色强调
- 配色:
- 背景: #F5F2E9 (温暖米白)
- 主文字: #2D2D2D (深灰)
- 箭头/强调: #D97A5E (珊瑚橙)
- 路径: #5B6B8C (蓝灰)
- Git分支: #9B7CB6 (紫粉)
- 适用: 白天使用,阅读舒适
- OpenCode:
ethereal-frost.json - Ghostty:
theme3/config - 特点: 冷灰白色背景(#F8F9FA),青蓝色调,极简现代风格
- 配色:
- 背景: #F8F9FA (冷灰白)
- 主文字: #2D3436 (深灰)
- 关键字/箭头: #087F8C (青色)
- 链接/函数: #2D5A7B (蓝灰)
- 字符串: #2D6A4F (墨绿)
- 注释: #868E96 (灰)
- 适用: 白天使用,清爽现代风格
- OpenCode:
deep-ocean.json - Ghostty:
theme4/config - 特点: 淡蓝白色背景(#F0F7FA),海洋色调,清新自然风格
- 配色:
- 背景: #F0F7FA (淡蓝白)
- 主文字: #1E3A5F (深海蓝)
- 关键字/箭头: #0EA5E9 (天青)
- 函数/链接: #2563EB (蓝色)
- 字符串: #059669 (翠绿)
- 注释: #6A8AAF (灰蓝)
- 适用: 白天使用,海洋/清新风格
- OpenCode:
soft-noir.json - Ghostty:
theme5/config - 特点: 暖灰紫色中调背景(#4a4a5a),介于深浅之间,优雅柔和
- 配色:
- 背景: #4a4a5a (暖灰紫)
- 主文字: #f0f0f5 (浅灰白)
- 强调色: #b89cc8 (淡紫)
- 关键字: #d97a8a (粉紫)
- 字符串: #5a9a6a (绿)
- 注释: #7d7d8d (灰)
- 适用: 全天使用,不刺眼,视觉舒适
- OpenCode:
parchment.json - Ghostty:
theme6/config - 特点: 奶油色背景(#F5F0E6),灵感源自 Terminalist,温暖复古风格
- 配色:
- 背景: #F5F0E6 (奶油色)
- 主文字: #1A1A1A (深灰)
- 强调色: #1E88E5 (蓝色)
- 关键字: #1E88E5 (蓝)
- 字符串: #A0522D (棕)
- 注释: #B8B8B8 (浅灰)
- 适用: 白天使用,复古优雅风格
# 切换到主题1 (深色)
./switch-theme.sh 1
# 切换到主题2 (暖色浅色)
./switch-theme.sh 2
# 切换到主题3 (冷色浅色)
./switch-theme.sh 3
# 切换到主题4 (海洋浅色)
./switch-theme.sh 4
# 切换到主题5 (柔黑中调)
./switch-theme.sh 5
# 切换到主题6 (羊皮纸浅色)
./switch-theme.sh 6- 编辑配置文件:
~/.opencode/settings.json - 修改 theme 字段:
{ "theme": "catppuccin-mocha" // 主题1 // 或 "theme": "architect-light" // 主题2 // 或 "theme": "ethereal-frost" // 主题3 // 或 "theme": "deep-ocean" // 主题4 // 或 "theme": "soft-noir" // 主题5 // 或 "theme": "parchment" // 主题6 } - 重新加载 OpenCode: Command+Shift+P → reload
- 复制对应主题配置:
# 主题1 cp "主题配置/ghostty/theme1/config" ~/.config/ghostty/config # 主题2 cp "主题配置/ghostty/theme2/config" ~/.config/ghostty/config # 主题3 cp "主题配置/ghostty/theme3/config" ~/.config/ghostty/config # 主题4 cp "主题配置/ghostty/theme4/config" ~/.config/ghostty/config # 主题5 cp "主题配置/ghostty/theme5/config" ~/.config/ghostty/config # 主题6 cp "主题配置/ghostty/theme6/config" ~/.config/ghostty/config
- 重启 Ghostty 或按 Command+Shift+, 重新加载配置
本主题配置使用了以下字体,你可以根据需要选择安装:
Maple Mono - 编程字体
- 特点:支持连字(ligatures)、Nerd Font 图标、中文显示优化
- GitHub: https://github.com/subframe7536/maple-font/releases
- 下载后安装 MapleMono-NF-CN 版本以获得完整中文支持
PingFang SC(苹方) - 中文回退字体
- macOS 系统自带字体,无需额外安装
- Windows/Linux 用户可以使用系统默认中文字体作为替代
如果不想安装 Maple Mono,Ghostty 会自动回退到系统默认等宽字体:
- macOS: SF Mono, Menlo
- Windows: Consolas, Cascadia Code
- Linux: Fira Code, JetBrains Mono
修改字体配置:
编辑对应的 Ghostty 配置文件,修改 font-family 为你喜欢的字体名称。
- OpenCode 主题:
~/.opencode/themes/ - Ghostty 配置:
~/.config/ghostty/config - Ghostty 配置(备用):
~/Library/Application Support/com.mitchellh.ghostty/config
- 两个工具的主题需要分别切换,OpenCode 改 settings.json,Ghostty 换 config 文件
- 建议保持两个工具使用相同主题,保持视觉一致性
- 可以随时修改 JSON 文件中的颜色值来自定义主题