Documentation
¶
Overview ¶
Package termbg decides the terminal's background color for Lip Gloss before Bubble Tea can ask the terminal itself.
Bubble Tea v1 queries the terminal in a package init (tea_init.go: "make sure Lip Gloss and Termenv query the terminal before any Bubble Tea Program runs") whenever stdout is a terminal. Termenv waits up to OSCTimeout, five seconds, for the answer. Terminals that never answer OSC 11 (the Linux console, some IDE and serial terminals, a few multiplexer setups) therefore stalled every zn command, `zn --version` included, for five seconds, and the belated answer could land in the next thing reading stdin, such as the `zn setup` prompt.
Go initializes packages in import-path order among those whose imports are ready, and github.com/ZenNotes sorts before github.com/charmbracelet, so this package's init runs after Lip Gloss's and before Bubble Tea's. Presetting the answer here makes that init a no-op; the two places that want the real answer, the terminal app's auto theme and `zn read --pretty`, call Detect and ask the terminal deliberately.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.