Skip to content

Conversation

@nguyenphutrong
Copy link

@nguyenphutrong nguyenphutrong commented Jan 7, 2026

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

  1. Press Ctrl+X T to open theme dialog
  2. Use ←/→ to switch between System/Light/Dark modes
  3. Use ↑/↓ to browse themes

Screenshots

Screenshot 2026-01-07 at 16 23 32@2x

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

- 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)
@github-actions
Copy link
Contributor

github-actions bot commented Jan 7, 2026

The following comment was made by an LLM, it may be inaccurate:

I found 2 potentially related PRs:

  1. fix: auto-detect system theme changes at runtime #7162 - fix: auto-detect system theme changes at runtime

  2. feat: add theme hot-reload functionality #4879 - feat: add theme hot-reload functionality

The current PR (#7182) appears to be a comprehensive feature for appearance settings. Check these related PRs to ensure there's no duplicate work on system theme detection or theme management.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant