kutsan/dotfiles

[Question] How can I make terminal emulator transparent?

F-Robot opened this issue · 3 comments

Like this:
image
I have this, a plain background color in terminal emulator:
image

Hi @F-Robot,

You probably need to set background color of Normal highlight group to NONE, like highlight! Normal guibg=NONE.

Thanks @kutsan <3
I change ../mappings/normal/terminal.lua

--  api.nvim_win_set_option(win, 'winhighlight', 'Normal:CursorLine')
++  api.nvim_win_set_option(win, 'winhighlight', 'Normal:NONE')

The Result:
image

Looking good!

By the way, I no longer use that toggle-terminal code because I don't use neovim's built-in terminal anymore. It sometimes acts a little bit buggy and managing multiple terminal windows doesn't provide a good developer experience. If you happen to use kitty terminal emulator, you can try this mapping:

map ctrl+z kitten new_window.py

You also need this file in that place.

https://github.com/kutsan/dotfiles/blob/c9fa7dbca7bf9a709285a5bc76e5885629f7105c/.config/kitty/new_window.py

These mappings also complete the toggle-terminal experience.

map kitty_mod+z toggle_layout vertical
map kitty_mod+enter new_window_with_cwd

You also need to have this as enabled layouts.

enabled_layouts stack,vertical