Open draptik opened 9 months ago
This clearly looks like a tmux color handling error as we dont have any code that specifies if that term do this please send this error to tmux and keep us updated, you can close this if you want or refer it in the tmux issue
OK, thanks for the quick feedback @MartinFillon ! I'll try to get some infos from tmux and report back if I there's anything relevant.
according to @PThorpe92
yeah tmux you have to have $TERM = xterm-256color in your env. i'll bet they are using alacritty
@draptik https://gist.github.com/andersevenrud/015e61af2fd264371032763d4ed965b6
check this out, even though it is neovim related, it should help out.
@MartinFillon @PThorpe92 thanks for the pointers!
I've dumbed down my ~/.tmux.conf
and ~/.config/alacritty/alacritty.yml
to the examples provided in the gist.
The bash-24 script shows the correct colors in all terminals (alacritty, kitty, gnome-terminal). Also in tmux, in all terminals.
This screenshot shows alacritty with tmux:
This screenshot shows alacritty without tmux:
I am at a loss what to try next. Any ideas? I'm still testing different permutations from the comments in the gist, but I'm not feeling lucky.
Ok so I had recently moved to wezterm, but I just tried out Alacritty again and it does indeed work with tmux.
.tmux.conf
set -g default-terminal "${TERM}"
set -as terminal-overrides ',*:Smulx=\E[4::%p1%dm' # undercurl support
set -as terminal-overrides ',*:Setulc=\E[58::2::%p1%{65536}%/%d::%p1%{256}%/%{255}%&%d::%p1%{255}%&%d%;m' # underscore colours - needs tmux-3.0
set -ga terminal-overrides ",*256col*:Tc"
alacritty.yml
env:
TERM: xterm-256color
Maybe give that a go?
@PThorpe92 Mmh, this is strange. Still no luck, even when using your configs. Which other environment variable might be involved? This should not be a X11/Wayland issue, right? I'm on Wayland, in case that matters.
I am indeed on X11. Let me try it on my other laptop I have sway/wayland installed give me a few mins :+1:
@draptik it seems you are right
So I mostly SSH into that laptop so i hadn't actually setup tmux w/ alacritty how I had it on this one. I configured it properly and the fix for the background worked, but it looks very much like your screenshots. Those colors aren't working, it is indeed somehow a wayland thing.
So it just so happens, I literally rewrote most of the color-scale feature today. I am going to do some experimenting, but I doubt this is actually in our control. I'll ping you if I learn anything new :+1:
@PThorpe92 thanks for the quick update! I would have never guessed this being a wayland-thing. In case you need somebody to double-check results: Just ping me!
When using eza with
--color-scale
within tmux the color-scale option is ignored.Can I provide any further infos?