Sample Header Ad - 728x90

Colors different when running nvim through tmux using alacritty config

2 votes
1 answer
2179 views
Background: I'm just setting up an install of Arcolinux. I have a keyboard shortcut SUPER+Enter to launch alacritty. What I want is to have alacritty automatically create and start in a new tmux session if there are none that havent been attached to. Or attach to an existing tmux session if nothing is attached to it. I got this working by adding the following into alacritty.yml: shell: program: /usr/bin/bash args: - -l - -c - "tmux ls | grep -v attached && tmux attach || tmux" This all works exactly as I would like apart from one thing, the colors in nvim are messed up using this method (darker so visual mode has the same highlight color as the background - annoying). I found several related issues and have tried solutions from there: e.g I have the following in my tmux config (as well as some other variants including a 2 liner): set -ag terminal-overrides ",xterm-256color:RGB" I've made sure the TERM variable is set to xterm-256color and I also tried setting background to "dark" in nvim. None of this seems to help when I launch nvim from a tmux session connected to using the above configuration in alacritty. However if I remove the alactritty configuration and run the command to connect to tmux manually everything works fine and nvim looks as expected: /usr/bin/bash -l -c "tmux ls | grep -v attached && tmux attach || tmux" Any ideas why im getting different results launching from the alacritty config. FYI part of the reason I am doing it this way is because I have no idea where the binding for SUPER+Enter is set, cant find it in any config files or settings (is there a better way to chase it down) so thoughts on that might be useful too.
Asked by SwiftD (191 rep)
Sep 28, 2023, 01:45 PM
Last activity: Sep 28, 2023, 03:08 PM