Skip to content

theme = "auto": re-detect terminal background at runtime (long-lived --watch sessions) #582

Description

@maxwelhoener

theme = "auto" (#290) queries the terminal background once at startup. With --watch, Hunk sessions are long-lived by design — parked in a pane next to a coding agent for hours — so when the OS appearance flips mid-session, Hunk keeps rendering the stale theme until quit/relaunch.

Runtime switching was noted as a leftover in the #238 discussion ("lack of automatic switching during runtime"), and #552's expected behavior assumes it too, but there is no issue tracking it directly.

Expected: re-run the background detection at runtime — either by re-querying OSC 11 periodically/on focus, or by re-evaluating when the watch loop refreshes — and swap the active auto theme accordingly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions