Is it possible to change the background color depending on which application is running currently?
My vim theme background differs with the terminal but I don't want to change the background of my terminal permanently just because of vim.
Is it possible to change the background color depending on which application is running currently?
My vim theme background differs with the terminal but I don't want to change the background of my terminal permanently just because of vim.
You can use multiple configuration files for alacritty. So instead of the default alacritty.yml you pass a different configuration to it.
alacritty --config-file ~/.config/alacritty/alacritty-vim.yml -e vim
This would spawn one instance of alacritty, running vim inside it, using a dedicated configuration file just for your vim preferences. This would allow you to give it a different appearance just for vim.
But it won't use that configuration on the fly if you start vim in a terminal. That does not seem possible currently, although I guess that such a feature could be added to alacritty's IPC msg mechanism.
For vim's colors there is vim's config, if that's what you are looking for. For example, I have
highlight Normal guibg=NONE
In ~/.config/nvim/init.vim, which makes vim's background transparent, i.e. matches it to alacritty's background. This works with transparency as well, if that's what you are after.