Skip to content

Commit

Permalink
Apply changes to templates, cocopon#61
Browse files Browse the repository at this point in the history
  • Loading branch information
cocopon committed May 15, 2020
1 parent 3ba0a2b commit 05aa55c
Show file tree
Hide file tree
Showing 5 changed files with 136 additions and 103 deletions.
14 changes: 5 additions & 9 deletions autoload/iceberg/palette/light.vim
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,8 @@ function! iceberg#palette#light#create() abort
\ ]

" airline/lightline
let g.xline_base_bg = pgmnt#color#darken(g.normal_bg, 0.15)
let g.xline_base_fg = pgmnt#color#adjust_color(
\ g.normal_bg, {
\ 'saturation': -0.10,
\ 'lightness': -0.35,
\ })
let g.xline_base_bg = g.statuslinenc_bg
let g.xline_base_fg = g.statuslinenc_fg
let g.xline_edge_bg = g.statusline_bg
let g.xline_edge_fg = g.statusline_fg
let g.xline_gradient_bg = pgmnt#color#mix(g.xline_base_bg, g.xline_edge_bg, 0.50)
Expand Down Expand Up @@ -205,11 +201,11 @@ function! iceberg#palette#light#create() abort
let c.wildmenu_fg = c.statusline_fg

" airline/lightline
let c.xline_base_bg = 237
let c.xline_base_fg = 243
let c.xline_base_bg = c.statuslinenc_bg
let c.xline_base_fg = c.statuslinenc_fg
let c.xline_edge_bg = c.statusline_bg
let c.xline_edge_fg = c.statusline_fg
let c.xline_gradient_bg = 241
let c.xline_gradient_bg = 247
let c.xline_gradient_fg = c.xline_edge_fg

" plugins
Expand Down
4 changes: 2 additions & 2 deletions colors/iceberg.vim
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"
" File: iceberg.vim
" Maintainer: cocopon <[email protected]>
" Modified: 2020-04-18 11:00+0900
" Modified: 2020-05-15 21:44+0900
" License: MIT


Expand Down Expand Up @@ -97,7 +97,7 @@ if &background == 'light'
hi ALEWarningSign ctermbg=253 ctermfg=130 guibg=#dcdfe7 guifg=#c57339
hi ALEVirtualTextError ctermfg=125 guifg=#cc517a
hi ALEVirtualTextWarning ctermfg=130 guifg=#c57339
hi CtrlPMode1 ctermbg=241 ctermfg=252 guibg=#999eb6 guifg=#e8e9ec
hi CtrlPMode1 ctermbg=247 ctermfg=252 guibg=#9fa6c0 guifg=#e8e9ec
hi EasyMotionShade ctermfg=250 guifg=#bbbecd
hi EasyMotionTarget ctermfg=64 guifg=#668e3d
hi EasyMotionTarget2First ctermfg=130 guifg=#c57339
Expand Down
149 changes: 79 additions & 70 deletions src/iceberg.vim
Original file line number Diff line number Diff line change
Expand Up @@ -781,77 +781,86 @@ call pgmnt#compile(s:create_context(), {
\ })

function! s:create_xline_context() abort
let p = iceberg#palette#dark#create()
let c = p.cterm
let g = p.gui

let col_base = string([
\ g.xline_base_fg,
\ g.xline_base_bg,
\ c.xline_base_fg,
\ c.xline_base_bg,
\ ])
let col_edge = string([
\ g.xline_edge_fg,
\ g.xline_edge_bg,
\ c.xline_edge_fg,
\ c.xline_edge_bg,
\ ])
return {
\ 'col_base': col_base,
\ 'col_tabfill': col_base,
\ 'col_edge': col_edge,
\ 'col_normal': col_edge,
\ 'col_tabsel': col_edge,
\ 'col_error': string([
\ g.normal_bg,
\ g.red,
\ c.normal_bg,
\ c.red,
\ ]),
\ 'col_gradient': string([
\ g.xline_gradient_fg,
\ g.xline_gradient_bg,
\ c.xline_gradient_fg,
\ c.xline_gradient_bg,
\ ]),
\ 'col_nc': string([
\ g.statuslinenc_fg,
\ g.statuslinenc_bg,
\ c.statuslinenc_fg,
\ c.statuslinenc_bg,
\ ]),
\ 'col_warning': string([
\ g.normal_bg,
\ g.orange,
\ c.normal_bg,
\ c.orange,
\ ]),
\ 'col_insert': string([
\ g.normal_bg,
\ g.blue,
\ c.normal_bg,
\ c.blue,
\ ]),
\ 'col_replace': string([
\ g.normal_bg,
\ g.orange,
\ c.normal_bg,
\ c.orange,
\ ]),
\ 'col_visual': string([
\ g.normal_bg,
\ g.green,
\ c.normal_bg,
\ c.green,
\ ]),
\ 'col_red': string([
\ g.red,
\ g.normal_bg,
\ c.red,
\ c.normal_bg,
\ ]),
let ps = {
\ 'dark': iceberg#palette#dark#create(),
\ 'light': iceberg#palette#light#create(),
\ }
let context = {}
for [bg, p] in items(ps)
let c = p.cterm
let g = p.gui

let col_base = string([
\ g.xline_base_fg,
\ g.xline_base_bg,
\ c.xline_base_fg,
\ c.xline_base_bg,
\ ])
let col_edge = string([
\ g.xline_edge_fg,
\ g.xline_edge_bg,
\ c.xline_edge_fg,
\ c.xline_edge_bg,
\ ])
let prefix = bg . '_col_'
let context = extend(context, {
\ prefix . 'base': col_base,
\ prefix . 'tabfill': col_base,
\ prefix . 'edge': col_edge,
\ prefix . 'normal': col_edge,
\ prefix . 'tabsel': col_edge,
\ prefix . 'error': string([
\ g.normal_bg,
\ g.red,
\ c.normal_bg,
\ c.red,
\ ]),
\ prefix . 'gradient': string([
\ g.xline_gradient_fg,
\ g.xline_gradient_bg,
\ c.xline_gradient_fg,
\ c.xline_gradient_bg,
\ ]),
\ prefix . 'nc': string([
\ g.statuslinenc_fg,
\ g.statuslinenc_bg,
\ c.statuslinenc_fg,
\ c.statuslinenc_bg,
\ ]),
\ prefix . 'warning': string([
\ g.normal_bg,
\ g.orange,
\ c.normal_bg,
\ c.orange,
\ ]),
\ prefix . 'insert': string([
\ g.normal_bg,
\ g.blue,
\ c.normal_bg,
\ c.blue,
\ ]),
\ prefix . 'replace': string([
\ g.normal_bg,
\ g.orange,
\ c.normal_bg,
\ c.orange,
\ ]),
\ prefix . 'visual': string([
\ g.normal_bg,
\ g.green,
\ c.normal_bg,
\ c.green,
\ ]),
\ prefix . 'red': string([
\ g.red,
\ g.normal_bg,
\ c.red,
\ c.normal_bg,
\ ]),
\ })
endfor

return context
endfunction

call pgmnt#compile(
Expand Down
33 changes: 23 additions & 10 deletions src/template-airline.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,29 @@ set cpo&vim


function! s:build_palette() abort
let col_base = {{col_base}}
let col_edge = {{col_edge}}
let col_error = {{col_error}}
let col_gradient = {{col_gradient}}
let col_nc = {{col_nc}}
let col_warning = {{col_warning}}
let col_insert = {{col_insert}}
let col_replace = {{col_replace}}
let col_visual = {{col_visual}}
let col_red = {{col_red}}
if &background == 'light'
let col_base = {{light_col_base}}
let col_edge = {{light_col_edge}}
let col_error = {{light_col_error}}
let col_gradient = {{light_col_gradient}}
let col_nc = {{light_col_nc}}
let col_warning = {{light_col_warning}}
let col_insert = {{light_col_insert}}
let col_replace = {{light_col_replace}}
let col_visual = {{light_col_visual}}
let col_red = {{light_col_red}}
else
let col_base = {{dark_col_base}}
let col_edge = {{dark_col_edge}}
let col_error = {{dark_col_error}}
let col_gradient = {{dark_col_gradient}}
let col_nc = {{dark_col_nc}}
let col_warning = {{dark_col_warning}}
let col_insert = {{dark_col_insert}}
let col_replace = {{dark_col_replace}}
let col_visual = {{dark_col_visual}}
let col_red = {{dark_col_red}}
endif

let p = {}
let p.inactive = airline#themes#generate_color_map(
Expand Down
39 changes: 27 additions & 12 deletions src/template-lightline.vim
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,33 @@ function! s:build_palette() abort
\ 'visual': {},
\ 'tabline': {}}

let col_base = {{col_base}}
let col_edge = {{col_edge}}
let col_gradient = {{col_gradient}}
let col_nc = {{col_nc}}
let col_tabfill = {{col_tabfill}}
let col_normal = {{col_normal}}
let col_error = {{col_error}}
let col_warning = {{col_warning}}
let col_insert = {{col_insert}}
let col_replace = {{col_replace}}
let col_visual = {{col_visual}}
let col_tabsel = {{col_tabsel}}
if &background == 'light'
let col_base = {{light_col_base}}
let col_edge = {{light_col_edge}}
let col_gradient = {{light_col_gradient}}
let col_nc = {{light_col_nc}}
let col_tabfill = {{light_col_tabfill}}
let col_normal = {{light_col_normal}}
let col_error = {{light_col_error}}
let col_warning = {{light_col_warning}}
let col_insert = {{light_col_insert}}
let col_replace = {{light_col_replace}}
let col_visual = {{light_col_visual}}
let col_tabsel = {{light_col_tabsel}}
else
let col_base = {{dark_col_base}}
let col_edge = {{dark_col_edge}}
let col_gradient = {{dark_col_gradient}}
let col_nc = {{dark_col_nc}}
let col_tabfill = {{dark_col_tabfill}}
let col_normal = {{dark_col_normal}}
let col_error = {{dark_col_error}}
let col_warning = {{dark_col_warning}}
let col_insert = {{dark_col_insert}}
let col_replace = {{dark_col_replace}}
let col_visual = {{dark_col_visual}}
let col_tabsel = {{dark_col_tabsel}}
endif

let p.normal.middle = [
\ col_base]
Expand Down

0 comments on commit 05aa55c

Please sign in to comment.