Skip to content

[FEATURE]: Light/Dark mode auto-switching #9697

Closed

Description

@samholmes

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I use a NightOwl app on macOS to switch between light/dark mode throughout the day. So far, all my apps support dynamically switching including Ghostty and Neovim (with the help of this plugin https://github.com/f-person/auto-dark-mode.nvim). But OC doesn't. Is it possible to have light/dark mode themes selected which are switched in real-time? The desktop app has this, but not the TUI.

Activity

  1. added
    discussionUsed for feature requests, proposals, ideas, etc. Open discussion
    on Jan 20, 2026
  2. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Jan 20, 2026
  3. github-actions commented on Jan 20, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  4. jal-co commented on Jan 20, 2026

    @jal-co

    Hey, I'm happy to take this, as it is something I'd like too.

    Proposed approach:

    1. Add an "auto" option to the TUI theme mode (alongside "dark" / "light")
    2. When set to "auto", detect OS appearance and listen for changes:
    • macOS: Use defaults read -g AppleInterfaceStyle or the dark-mode-listener npm package
    • Linux: Check $XDG_CURRENT_DESKTOP + gsettings or similar
    • Windows: Registry check for AppsUseLightTheme
    1. Store the user's preference (auto/dark/light) in KV storage
    2. Update theme reactively when OS appearance changes

    edit:
    maybe do something like this instead?

    Current: theme is a single string (e.g., "dracula"). Mode is detected once at startup from terminal background.

    Proposed config schema:

    // Simple (backwards compatible)
    { "theme": "dracula" }
    // Advanced (new)
    {
      "theme": {
        "light": "github",
        "dark": "dracula", 
        "mode": "auto"  // "auto" | "light" | "dark"
      }
    }

    When mode: "auto", detect OS appearance and switch between light/dark themes automatically.

    Questions:

    • Should "auto" be the default, or should users opt-in?
    • Should this be something added to the config options? alongside separate "dark" and "light" themes? This would also handle Different theme for light and dark mode #3244
    • Any concerns with adding a dependency like dark-mode-listener, or prefer a shell-based approach?
  5. ariane-emory commented on Jan 20, 2026

    @ariane-emory
    Contributor

    @justinlevinedotme I think it should be opt-in, off by default.

    Personally, I would suggest that instead of changing the shape/schema of the configuration file, the enabledness of the automatic switching mode (on or off/true or false) be toggled by a new menu item in the command_list menu and persisted to the kv.json file. There are numerous pre-existing toggleable items in the command_list menu whose implementations can serve as examples.

  6. github-actions commented on Apr 9, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 90 days of no activity. If the issue is still relevant please open a new one.

  7. Saafo commented on Apr 18, 2026

    @Saafo

    Are the related PRs still waiting for approval? While CC had already supported recently.

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

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussionopentuiThis relates to changes in v1.0, now that opencode uses opentui

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions