GeezerVison is showing github.com — feat(tui): add appearance setting with dark/light/system modes by nguyenphutrong · Pull Request #7182 · anomalyco/opencode
Conversation
Summary
Adds an appearance config option to control the TUI color scheme with three modes:
- dark: Always use dark variant of theme
- light: Always use light variant of theme
- system: Auto-detect from terminal background color (polls every 5s)
Changes
- Added
appearance field to config schema (dark | light | system)
- Added appearance selector UI in theme dialog with ←/→ keyboard navigation
- Implemented theme mode detection (analyzes theme JSON to determine dark-only/light-only/both support)
- Auto-disables unsupported modes for single-mode themes (e.g., aura, catppuccin-macchiato are dark-only)
- Real-time terminal background detection using
renderer.getPalette() for cross-platform support
- Regenerated SDK types to include
appearance field
Usage
Via Config
{
"appearance": "system"
}
Via TUI
- Press
Ctrl+X T to open theme dialog
- Use
←/→ to switch between System/Light/Dark modes
- Use
↑/↓ to browse themes
Screenshots
The appearance selector appears at the top of the theme dialog. Unsupported modes are dimmed and cannot be selected.
Testing
- Tested with dark-only themes (aura, ayu, catppuccin-macchiato, nightowl)
- Tested with dual-mode themes (flexoki, github, opencode, tokyonight)
- Verified real-time system mode polling works across terminal theme changes
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
- Add appearance field to config schema (dark/light/system)
- Add AppearanceSelector UI in theme dialog with radio buttons
- Auto-detect theme mode support (dark-only, light-only, or both)
- Disable unsupported appearance options for single-mode themes
- Auto-switch to supported mode when selecting dark/light-only themes
- Add real-time terminal background polling for system mode
- Remove Cycle appearance command (replaced by Switch theme dialog)
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…etting
# Conflicts:
# packages/opencode/src/cli/cmd/tui/context/theme.tsx
This was referenced Jan 20, 2026
|
Closing this pull request because it has had no updates for more than 60 days. If you plan to continue working on it, feel free to reopen or open a new PR.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|