[FEATURE]: Support auto-dimming TUI via focus events or API #3371

Open
opened 2026-02-16 17:39:49 -05:00 by yindo · 1 comment
Owner

Originally created by @ianks on GitHub (Dec 7, 2025).

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

It would be helpful if OpenCode's TUI could automatically dim the UI when the terminal loses focus. Makes it easier for my brain to focus on the correct pane in my tmux setup, which often has a handful of panes / splits.

There's two ways of going about this I can think of:

  1. support a "dim": <percent> config and adjust colors in response to xterm focus-events
  2. add an API endpoint to /tui/switch-theme, heavy-handed but would work

Would be happy to contribute this feature if there's guidance on preferred method... thoughts?

Originally created by @ianks on GitHub (Dec 7, 2025). ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request It would be helpful if OpenCode's TUI could automatically dim the UI when the terminal loses focus. Makes it easier for my brain to focus on the correct pane in my tmux setup, which often has a handful of panes / splits. There's two ways of going about this I can think of: 1. support a `"dim": <percent>` config and adjust colors in response to xterm focus-events 2. add an API endpoint to `/tui/switch-theme`, heavy-handed but would work Would be happy to contribute this feature if there's guidance on preferred method... thoughts?
yindo added the discussion label 2026-02-16 17:39:49 -05:00
Author
Owner

@ariane-emory commented on GitHub (Dec 7, 2025):

Just a question: isn't this something that tmux could (or maybe can?) do? It kind of seems like it would make more sense for this to happen at that level.

@ariane-emory commented on GitHub (Dec 7, 2025): Just a question: isn't this something that tmux could (or maybe can?) do? It kind of seems like it would make more sense for this to happen at that level.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3371