mirror of
https://github.com/vim-airline/vim-airline-themes.git
synced 2024-12-04 07:53:34 +08:00
support swapping of colors if separators are disabled
This commit is contained in:
parent
63f2f98102
commit
ee5b6bbf31
|
@ -1,6 +1,6 @@
|
|||
let s:powerline = 0
|
||||
let s:swap = 0
|
||||
if exists('g:airline_powerline_fonts') && g:airline_powerline_fonts
|
||||
let s:powerline = 1
|
||||
let s:swap = 1
|
||||
|
||||
let s:left = 0
|
||||
function! airline#themes#simple#left()
|
||||
|
@ -27,17 +27,21 @@ if exists('g:airline_powerline_fonts') && g:airline_powerline_fonts
|
|||
let g:airline_right_sep = '%{airline#themes#simple#right()}'
|
||||
endif
|
||||
|
||||
if g:airline_left_sep == '' && g:airline_right_sep == ''
|
||||
let s:swap = 1
|
||||
endif
|
||||
|
||||
let s:guibg = '#080808'
|
||||
let s:termbg = 232
|
||||
let s:termsep = 236
|
||||
let s:guisep = '#303030'
|
||||
|
||||
let s:N1 = s:powerline ? [ s:guibg , '#00dfff' , s:termbg , 45 ] : [ s:guibg , '#080808' , 45 , s:termbg ]
|
||||
let s:N1 = s:swap ? [ s:guibg , '#00dfff' , s:termbg , 45 ] : [ s:guibg , '#080808' , 45 , s:termbg ]
|
||||
let s:N2 = [ '#ff5f00' , s:guibg, 202 , s:termbg ]
|
||||
let s:N3 = [ '#767676' , s:guibg, 243 , s:termbg ]
|
||||
let g:airline#themes#simple#normal = {
|
||||
\ 'mode': [ s:N1[0] , s:N1[1] , s:N1[2] , s:N1[3] , 'bold' ] ,
|
||||
\ 'mode_separator': s:powerline
|
||||
\ 'mode_separator': s:swap
|
||||
\ ? [ '#00dfff' , s:N2[1] , 45 , s:N2[3] , 'bold' ]
|
||||
\ : [ s:guisep , s:N2[1] , s:termsep , s:N2[3] , 'bold' ] ,
|
||||
\ 'info': [ s:N2[0] , s:N2[1] , s:N2[2] , s:N2[3] , '' ] ,
|
||||
|
@ -50,12 +54,12 @@ let g:airline#themes#simple#normal_modified = {
|
|||
\ 'statusline': [ '#df0000' , s:guibg, 160 , s:termbg , '' ] ,
|
||||
\ }
|
||||
|
||||
let s:I1 = s:powerline ? [ s:guibg, '#5fff00' , s:termbg , 82 ] : [ s:guibg, '#080808' , 82 , s:termbg ]
|
||||
let s:I1 = s:swap ? [ s:guibg, '#5fff00' , s:termbg , 82 ] : [ s:guibg, '#080808' , 82 , s:termbg ]
|
||||
let s:I2 = [ '#ff5f00' , s:guibg, 202 , s:termbg ]
|
||||
let s:I3 = [ '#767676' , s:guibg, 243 , s:termbg ]
|
||||
let g:airline#themes#simple#insert = {
|
||||
\ 'mode': [ s:I1[0] , s:I1[1] , s:I1[2] , s:I1[3] , 'bold' ] ,
|
||||
\ 'mode_separator': s:powerline
|
||||
\ 'mode_separator': s:swap
|
||||
\ ? [ '#5fff00' , s:I2[1] , 82 , s:I2[3] , 'bold' ]
|
||||
\ : [ s:guisep , s:I2[1] , s:termsep , s:I2[3] , 'bold' ] ,
|
||||
\ 'info': [ s:I2[0] , s:I2[1] , s:I2[2] , s:I2[3] , '' ] ,
|
||||
|
@ -64,12 +68,12 @@ let g:airline#themes#simple#insert = {
|
|||
\ }
|
||||
let g:airline#themes#simple#insert_modified = copy(g:airline#themes#simple#normal_modified)
|
||||
|
||||
let s:V1 = s:powerline ? [ s:guibg, '#dfdf00' , s:termbg , 184 ] : [ '#dfdf00' , s:guibg, 184 , s:termbg ]
|
||||
let s:V1 = s:swap ? [ s:guibg, '#dfdf00' , s:termbg , 184 ] : [ '#dfdf00' , s:guibg, 184 , s:termbg ]
|
||||
let s:V2 = [ '#ff5f00' , s:guibg, 202 , s:termbg ]
|
||||
let s:V3 = [ '#767676' , s:guibg, 243 , s:termbg ]
|
||||
let g:airline#themes#simple#visual = {
|
||||
\ 'mode': [ s:V1[0] , s:V1[1] , s:V1[2] , s:V1[3] , 'bold' ] ,
|
||||
\ 'mode_separator': s:powerline
|
||||
\ 'mode_separator': s:swap
|
||||
\ ? [ '#dfdf00' , s:V2[1] , 184 , s:V2[3] , 'bold' ]
|
||||
\ : [ s:guisep , s:V2[1] , s:termsep , s:V2[3] , 'bold' ] ,
|
||||
\ 'info': [ s:V2[0] , s:V2[1] , s:V2[2] , s:V2[3] , '' ] ,
|
||||
|
|
Loading…
Reference in New Issue
Block a user