Terminal background: decide 24-bit color like tcell, and log why
The check only looked at COLORTERM, but tcell also draws 24-bit color for terminals whose description has it (xterm-ghostty, xterm-kitty), so in Ghostty on macOS without COLORTERM the background was never used. Use tcell's rules, and always log which background is used and why. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019reK4DUGYqDUjniWYJvwUW
This commit is contained in:
+2
-4
@@ -102,7 +102,7 @@ type overlay struct {
|
||||
func New(cfg *config.Config) *App {
|
||||
// Ask the terminal before the screen takes it over and before any widget
|
||||
// copies the default background.
|
||||
ownBackground := useTerminalBackground(terminalAnswers(), os.Getenv)
|
||||
backgroundNote := useTerminalBackground(terminalAnswers(), os.Getenv)
|
||||
a := &App{
|
||||
app: tview.NewApplication(),
|
||||
tabs: tview.NewTextView().SetDynamicColors(true),
|
||||
@@ -139,9 +139,7 @@ func New(cfg *config.Config) *App {
|
||||
if a.covers {
|
||||
a.logs.add(levelInfo, coverNote)
|
||||
}
|
||||
if ownBackground {
|
||||
a.logs.add(levelInfo, "Background: the terminal's own color")
|
||||
}
|
||||
a.logs.add(levelInfo, backgroundNote)
|
||||
sabClient := sabnzbd.NewClient(cfg.SABnzbd.URL, cfg.SABnzbd.APIKey)
|
||||
a.sab = sabClient
|
||||
a.probes = []probe{
|
||||
|
||||
Reference in New Issue
Block a user