Wrong light colorscheme in zellij
apraga opened this issue · comments
Hi,
Using zellij light theme (tested with solarized-light), broot's own light theme (also solarized) looks bad inside zellij :
Broot correctly detects it's a light theme though. My conf.hjson :
imports: [
verbs.hjson
{
luma: [
dark
unknown
]
file: skins/dark-gruvbox.hjson
}
{
luma: light
file: skins/solarized-light.hjson
}
]
Terminal: alacritty, with solarized-light here. Any idea would be great, thanks !
Broot correctly detects it's a light theme though
Are you sure ? Can you have a look at the debug log ?
Interesting. It is detecting the light theme in both case but apply the dark theme ?
In zellij
19:15:25.548 [DEBUG] broot::display::luma: terminal_light::luma() took 421.902µs
19:15:25.548 [INFO] broot::display::luma: terminal's luma: Ok(0.15625)
19:15:25.548 [DEBUG] broot::conf::conf: reading conf file: "/home/alex/.config/broot/skins/dark-gruvbox.hjson"
19:15:25.550 [DEBUG] broot::conf::conf: skipping not applying conf file : "skins/solarized-light.hjson"
19:14:47.681 [DEBUG] broot::display::luma: terminal_light::luma() took 209.449µs
19:14:47.681 [INFO] broot::display::luma: terminal's luma: Ok(0.96371955)
19:14:47.681 [DEBUG] broot::conf::conf: skipping not applying conf file : "skins/dark-gruvbox.hjson"
19:14:47.681 [DEBUG] broot::conf::conf: reading conf file: "/home/alex/.config/broot/skins/solarized-light.hjson"
I've edited the issue with the full configuration for dark and light theme.
In your first log (zellij), the terminal is seen as dark (luma = 0.15625), and the dark theme is applied
It's a little weird. There are many reasons to not be able to detect the background color, but there should not be any wrong detection.
If you're always on a light background, an obvious workaround is to just not detect and always apply the light theme.
To force the theme, do
imports: [
verbs.hjson
skins/dark-gruvbox.hjson
]
Further testing: same results in other shells (fish, sh, initially tested with nushell).
I've tested (at least I hope) your strategy in terminal-light using terminal escape code. In zellij
~> printf "\x1b]11;?\x07"
~> ]11;rgb:fbfb/f1f1/c7c7
Outside zellij
~/.c/broot> printf "\x1b]11;?\x07"
~/.c/broot> ]11;rgb:2828/2828/2828^C
By the way, feel free to move the issue in terminal-light !