(Re)add support for transparent bg in terminals.

This commit is contained in:
Lifepillar
2016-09-06 11:02:49 +02:00
parent 72c6acc08b
commit 903883a4c2
10 changed files with 48 additions and 10 deletions

View File

@@ -62,10 +62,12 @@ The following options are inherited from Solarized:
- `g:solarized_visibility`: one of `"normal"` (default), `"low"`, `"high"`; - `g:solarized_visibility`: one of `"normal"` (default), `"low"`, `"high"`;
- `g:solarized_diffmode`: one of `"normal"` (default), `"low"`, `"high"`; - `g:solarized_diffmode`: one of `"normal"` (default), `"low"`, `"high"`;
- `g:solarized_termtrans`: make terminal background transparent if set to `1`
(default: `0`).
The following options were not available in the original Solarized: The following options were not available in the original Solarized:
- `g:solarized_statusline`: one of `"normal"` (default) or `"low"`. - `g:solarized_statusline`: one of `"normal"` (default) or `"low"`;
- `g:solarized_term_italics`: set to `1` if your terminal supports italics - `g:solarized_term_italics`: set to `1` if your terminal supports italics
(default is `0`). (default is `0`).

View File

@@ -10,7 +10,11 @@ endif
let colors_name = "solarized8_dark" let colors_name = "solarized8_dark"
set background=dark set background=dark
hi! Normal cterm=NONE gui=NONE ctermfg=12 guifg=#839496 ctermbg=8 guibg=#002b36 if !has('gui_running') && get(g:, 'solarized_termtrans', 0)
hi! Normal cterm=NONE gui=NONE ctermfg=12 guifg=#839496 ctermbg=NONE guibg=NONE
else
hi! Normal cterm=NONE gui=NONE ctermfg=12 guifg=#839496 ctermbg=8 guibg=#002b36
endif
hi! Comment cterm=NONE gui=NONE,italic ctermfg=10 guifg=#586e75 ctermbg=NONE guibg=NONE hi! Comment cterm=NONE gui=NONE,italic ctermfg=10 guifg=#586e75 ctermbg=NONE guibg=NONE
hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE
hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE

View File

@@ -10,7 +10,11 @@ endif
let colors_name = "solarized8_dark_flat" let colors_name = "solarized8_dark_flat"
set background=dark set background=dark
hi! Normal cterm=NONE gui=NONE ctermfg=12 guifg=#839496 ctermbg=8 guibg=#002b36 if !has('gui_running') && get(g:, 'solarized_termtrans', 0)
hi! Normal cterm=NONE gui=NONE ctermfg=12 guifg=#839496 ctermbg=NONE guibg=NONE
else
hi! Normal cterm=NONE gui=NONE ctermfg=12 guifg=#839496 ctermbg=8 guibg=#002b36
endif
hi! Comment cterm=NONE gui=NONE,italic ctermfg=10 guifg=#586e75 ctermbg=NONE guibg=NONE hi! Comment cterm=NONE gui=NONE,italic ctermfg=10 guifg=#586e75 ctermbg=NONE guibg=NONE
hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE
hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE

View File

@@ -10,7 +10,11 @@ endif
let colors_name = "solarized8_dark_high" let colors_name = "solarized8_dark_high"
set background=dark set background=dark
hi! Normal cterm=NONE gui=NONE ctermfg=14 guifg=#93a1a1 ctermbg=8 guibg=#002b36 if !has('gui_running') && get(g:, 'solarized_termtrans', 0)
hi! Normal cterm=NONE gui=NONE ctermfg=14 guifg=#93a1a1 ctermbg=NONE guibg=NONE
else
hi! Normal cterm=NONE gui=NONE ctermfg=14 guifg=#93a1a1 ctermbg=8 guibg=#002b36
endif
hi! Comment cterm=NONE gui=NONE,italic ctermfg=11 guifg=#657b83 ctermbg=NONE guibg=NONE hi! Comment cterm=NONE gui=NONE,italic ctermfg=11 guifg=#657b83 ctermbg=NONE guibg=NONE
hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE
hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE

View File

@@ -10,7 +10,11 @@ endif
let colors_name = "solarized8_dark_low" let colors_name = "solarized8_dark_low"
set background=dark set background=dark
hi! Normal cterm=NONE gui=NONE ctermfg=12 guifg=#839496 ctermbg=0 guibg=#073642 if !has('gui_running') && get(g:, 'solarized_termtrans', 0)
hi! Normal cterm=NONE gui=NONE ctermfg=12 guifg=#839496 ctermbg=NONE guibg=NONE
else
hi! Normal cterm=NONE gui=NONE ctermfg=12 guifg=#839496 ctermbg=0 guibg=#073642
endif
hi! Comment cterm=NONE gui=NONE,italic ctermfg=10 guifg=#586e75 ctermbg=NONE guibg=NONE hi! Comment cterm=NONE gui=NONE,italic ctermfg=10 guifg=#586e75 ctermbg=NONE guibg=NONE
hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE
hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE

View File

@@ -10,7 +10,11 @@ endif
let colors_name = "solarized8_light" let colors_name = "solarized8_light"
set background=light set background=light
hi! Normal cterm=NONE gui=NONE ctermfg=11 guifg=#657b83 ctermbg=15 guibg=#fdf6e3 if !has('gui_running') && get(g:, 'solarized_termtrans', 0)
hi! Normal cterm=NONE gui=NONE ctermfg=11 guifg=#657b83 ctermbg=NONE guibg=NONE
else
hi! Normal cterm=NONE gui=NONE ctermfg=11 guifg=#657b83 ctermbg=15 guibg=#fdf6e3
endif
hi! Comment cterm=NONE gui=NONE,italic ctermfg=14 guifg=#93a1a1 ctermbg=NONE guibg=NONE hi! Comment cterm=NONE gui=NONE,italic ctermfg=14 guifg=#93a1a1 ctermbg=NONE guibg=NONE
hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE
hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE

View File

@@ -10,7 +10,11 @@ endif
let colors_name = "solarized8_light_flat" let colors_name = "solarized8_light_flat"
set background=light set background=light
hi! Normal cterm=NONE gui=NONE ctermfg=11 guifg=#657b83 ctermbg=15 guibg=#fdf6e3 if !has('gui_running') && get(g:, 'solarized_termtrans', 0)
hi! Normal cterm=NONE gui=NONE ctermfg=11 guifg=#657b83 ctermbg=NONE guibg=NONE
else
hi! Normal cterm=NONE gui=NONE ctermfg=11 guifg=#657b83 ctermbg=15 guibg=#fdf6e3
endif
hi! Comment cterm=NONE gui=NONE,italic ctermfg=14 guifg=#93a1a1 ctermbg=NONE guibg=NONE hi! Comment cterm=NONE gui=NONE,italic ctermfg=14 guifg=#93a1a1 ctermbg=NONE guibg=NONE
hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE
hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE

View File

@@ -10,7 +10,11 @@ endif
let colors_name = "solarized8_light_high" let colors_name = "solarized8_light_high"
set background=light set background=light
hi! Normal cterm=NONE gui=NONE ctermfg=10 guifg=#586e75 ctermbg=15 guibg=#fdf6e3 if !has('gui_running') && get(g:, 'solarized_termtrans', 0)
hi! Normal cterm=NONE gui=NONE ctermfg=10 guifg=#586e75 ctermbg=NONE guibg=NONE
else
hi! Normal cterm=NONE gui=NONE ctermfg=10 guifg=#586e75 ctermbg=15 guibg=#fdf6e3
endif
hi! Comment cterm=NONE gui=NONE,italic ctermfg=12 guifg=#839496 ctermbg=NONE guibg=NONE hi! Comment cterm=NONE gui=NONE,italic ctermfg=12 guifg=#839496 ctermbg=NONE guibg=NONE
hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE
hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE

View File

@@ -10,7 +10,11 @@ endif
let colors_name = "solarized8_light_low" let colors_name = "solarized8_light_low"
set background=light set background=light
hi! Normal cterm=NONE gui=NONE ctermfg=11 guifg=#657b83 ctermbg=7 guibg=#eee8d5 if !has('gui_running') && get(g:, 'solarized_termtrans', 0)
hi! Normal cterm=NONE gui=NONE ctermfg=11 guifg=#657b83 ctermbg=NONE guibg=NONE
else
hi! Normal cterm=NONE gui=NONE ctermfg=11 guifg=#657b83 ctermbg=7 guibg=#eee8d5
endif
hi! Comment cterm=NONE gui=NONE,italic ctermfg=14 guifg=#93a1a1 ctermbg=NONE guibg=NONE hi! Comment cterm=NONE gui=NONE,italic ctermfg=14 guifg=#93a1a1 ctermbg=NONE guibg=NONE
hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE hi! Constant cterm=NONE gui=NONE ctermfg=6 guifg=#2aa198 ctermbg=NONE guibg=NONE
hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE hi! Identifier cterm=NONE gui=NONE ctermfg=4 guifg=#268bd2 ctermbg=NONE guibg=NONE

View File

@@ -155,7 +155,11 @@ for s:solarized_background in ["dark", "light"]
"}}} "}}}
call s:put("hi! Normal" .s:fmt_none .s:fg_base0 .s:bg_back) call s:put("if !has('gui_running') && get(g:, 'solarized_termtrans', 0)")
call s:put(" hi! Normal" .s:fmt_none .s:fg_base0 .s:bg_none)
call s:put("else")
call s:put(" hi! Normal" .s:fmt_none .s:fg_base0 .s:bg_back)
call s:put("endif")
" Basic highlighting"{{{ " Basic highlighting"{{{
" --------------------------------------------------------------------- " ---------------------------------------------------------------------