vim-one icon indicating copy to clipboard operation
vim-one copied to clipboard

No transparent background

Open con-f-use opened this issue 5 years ago • 4 comments

I'm using transparency with my terminal emulator. Using one sets a solid, opaque background. How do I change that?

con-f-use avatar Nov 30 '19 17:11 con-f-use

same here 👋

tommady avatar Dec 27 '19 08:12 tommady

Hey @tommady, I put this in my rc file. It doesn't work 100% perfectly but good enough:

if (has("autocmd") && !has("gui_running"))
  augroup colorset
    autocmd!
    let s:white = { "gui": "#ABB2BF", "cterm": "145", "cterm16" : "7" }
    autocmd ColorScheme * call onedark#set_highlight("Normal", { "fg": s:white }) " `bg` will not be styled since there is no `bg` setting
  augroup END
endif
colorscheme onedark
let s:white = { "gui": "#ABB2BF", "cterm": "145", "cterm16" : "7" }
call onedark#set_highlight("Normal", { "fg": s:white }) " `bg` will not be styled since there is no `bg` setting

It's somewhere burred deep in the customization documentation. I consider it rather hacky, especially seeing that I neded it as both autocmd and then invocation right after setting the color scheme.

con-f-use avatar Dec 27 '19 19:12 con-f-use

That configuration is for other colorscheme, onedark.vim by joshdick, not vim-one. You are loading it when you call colorscheme onedark and the function call onedark#set_highlight("Normal", { "fg": s:white }) is available in that other colorscheme

baco avatar Mar 04 '21 00:03 baco

A more accurate hack, using vim-one functions, would be to add in your init.vim/vimrc:

if has('autocmd') && !has('gui_running')
    augroup colorset
        autocmd!
        autocmd ColorScheme one silent!
            \ call one#highlight('Normal', '', 'none', '')
    augroup END
endif

baco avatar Mar 28 '21 23:03 baco