opencode icon indicating copy to clipboard operation
opencode copied to clipboard

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

Open ianks opened this issue 1 month ago • 1 comments

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?

ianks avatar Dec 07 '25 06:12 ianks

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 avatar Dec 07 '25 07:12 ariane-emory