Use the terminal's own background color
The panes used palette color 0, which color themes such as Catppuccin set to a grey lighter than their background: everything looked washed out and grey text almost disappeared (seen in Ghostty on macOS). The startup probe now also asks for the background color (OSC 11), and with 24-bit color and a dark background that color is used. The probe always runs at startup, so a later switch to real images in the Config view never has to ask the terminal while the screen owns it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019reK4DUGYqDUjniWYJvwUW
This commit is contained in:
@@ -100,6 +100,9 @@ type overlay struct {
|
||||
|
||||
// New builds the application shell: a tab bar, one page per view and a status bar.
|
||||
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)
|
||||
a := &App{
|
||||
app: tview.NewApplication(),
|
||||
tabs: tview.NewTextView().SetDynamicColors(true),
|
||||
@@ -136,6 +139,9 @@ 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")
|
||||
}
|
||||
sabClient := sabnzbd.NewClient(cfg.SABnzbd.URL, cfg.SABnzbd.APIKey)
|
||||
a.sab = sabClient
|
||||
a.probes = []probe{
|
||||
|
||||
Reference in New Issue
Block a user