Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No transparent background #101

Open
con-f-use opened this issue Nov 30, 2019 · 4 comments
Open

No transparent background #101

con-f-use opened this issue Nov 30, 2019 · 4 comments

Comments

@con-f-use
Copy link

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

@tommady
Copy link

tommady commented Dec 27, 2019

same here 👋

@con-f-use
Copy link
Author

con-f-use commented Dec 27, 2019

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.

@baco
Copy link

baco commented Mar 4, 2021

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
Copy link

baco commented Mar 28, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants