diff --git a/vim/colors/forgotten-light.vim b/vim/colors/forgotten-light.vim new file mode 100644 index 0000000..c79cfe4 --- /dev/null +++ b/vim/colors/forgotten-light.vim @@ -0,0 +1,244 @@ +" forgotten-light, a vim colourscheme by nightsense +" +" generated with a theme template adapted from +" base16-vim (https://github.com/chriskempson/base16-vim) +" by Chris Kempson (http://chriskempson.com) + + +"=== SET COLOUR VARIABLES ===================================================== + +" GUI colours +let s:g0 = 'f0f8ff' +let s:g1 = 'dde6f0' +let s:g2 = 'a3acb5' +let s:g3 = '8b959e' +let s:g4 = '77808a' +let s:g5 = '616b75' +let s:g6 = '2c333b' +let s:g7 = '1d242b' +let s:g8 = 'f55050' +let s:g9 = 'e06a26' +let s:gA = 'd4ac35' +let s:gB = '219e21' +let s:gC = '1b9e9e' +let s:gD = '468dd4' +let s:gE = 'a26fbf' +let s:gF = 'd46a84' + +" terminal colours +let s:t0 = '00' +let s:t3 = '08' +let s:t5 = '07' +let s:t7 = '15' +let s:t8 = '01' +let s:tA = '03' +let s:tB = '02' +let s:tC = '06' +let s:tD = '04' +let s:tE = '05' +let s:t1 = '10' +let s:t2 = '11' +let s:t4 = '12' +let s:t6 = '13' +let s:t9 = '09' +let s:tF = '14' + +" neovim colours +if has('nvim') + let g:terminal_color_0 = '#f0f8ff' + let g:terminal_color_1 = '#f55050' + let g:terminal_color_2 = '#219e21' + let g:terminal_color_3 = '#d4ac35' + let g:terminal_color_4 = '#468dd4' + let g:terminal_color_5 = '#a26fbf' + let g:terminal_color_6 = '#1b9e9e' + let g:terminal_color_7 = '#616b75' + let g:terminal_color_8 = '#8b959e' + let g:terminal_color_9 = '#e06a26' + let g:terminal_color_10 = '#dde6f0' + let g:terminal_color_11 = '#a3acb5' + let g:terminal_color_12 = '#77808a' + let g:terminal_color_13 = '#2c333b' + let g:terminal_color_14 = '#d46a84' + let g:terminal_color_15 = '#1d242b' +endif + + +"=== OTHER PREPARATION ======================================================== + +" run theme-setting script if using terminal vim +if filereadable(expand('~/.nightshell/forgotten-light')) + if !has('gui_running') + execute 'silent !/bin/sh $HOME/.nightshell/forgotten-light' + endif +endif + +" clear old theme +hi clear +syntax reset + +" set new theme +set background=light +augroup NightsenseThemeSet + autocmd! + autocmd CursorMoved * execute 'if !exists("colors_name") | + \ colorscheme forgotten-light | endif' +augroup END +let colors_name = 'forgotten-light' + +" highlighting function +fun! h(x, gf, gb, cf, cb, a, s) + if a:gf != '' | exe 'hi ' . a:x . ' guifg=#' . a:gf | endif + if a:gb != '' | exe 'hi ' . a:x . ' guibg=#' . a:gb | endif + if a:cf != '' | exe 'hi ' . a:x . ' ctermfg=' . a:cf | endif + if a:cb != '' | exe 'hi ' . a:x . ' ctermbg=' . a:cb | endif + if a:a != '' | exe 'hi ' . a:x . ' gui=' . a:a . ' cterm=' . a:a | endif + if a:s != '' | exe 'hi ' . a:x . ' guisp=#' . a:s | endif +endfun + + +"=== BASIC HIGHLIGHTING ======================================================= + +" cursor + status line + selected tab +cal h('Cursor' , s:g0 , s:gD , s:t0 , s:tD , 'none' , '' ) +cal h('StatusLine' , s:g0 , s:gD , s:t0 , s:tD , 'none' , '' ) +cal h('StatusLineTerm' , s:g0 , s:gD , s:t0 , s:tD , 'none' , '' ) +cal h('TabLineSel' , s:g0 , s:gD , s:t0 , s:tD , 'none' , '' ) +cal h('TermCursor' , s:g0 , s:gD , s:t0 , s:tD , 'none' , '' ) + +" line numbers +cal h('CursorLineNr' , s:g0 , s:g3 , s:t0 , s:t3 , 'none' , '' ) +cal h('LineNr' , s:g4 , s:g1 , s:t4 , s:t1 , 'none' , '' ) + +" basic text +cal h('Bold' , '' , '' , '' , '' , 'bold' , '' ) +cal h('Directory' , s:g5 , '' , s:t5 , '' , 'bold' , '' ) +cal h('Italic' , '' , '' , '' , '' , 'italic' , '' ) +cal h('Normal' , s:g5 , s:g0 , s:t5 , s:t0 , 'none' , '' ) +cal h('Underlined' , s:g5 , '' , s:t5 , '' , 'underline' , '' ) + +" commented-out text +cal h('Comment' , s:g3 , '' , s:t3 , '' , 'none' , '' ) +cal h('Conceal' , s:g3 , '' , s:t3 , '' , 'none' , '' ) +cal h('EndOfBuffer' , s:g3 , '' , s:t3 , '' , 'none' , '' ) +cal h('Ignore' , s:g3 , '' , s:t3 , '' , 'none' , '' ) +cal h('NonText' , s:g3 , '' , s:t3 , '' , 'none' , '' ) + +" highlighted background +cal h('ColorColumn' , '' , s:g1 , '' , s:t1 , 'none' , '' ) +cal h('CursorColumn' , '' , s:g1 , '' , s:t1 , 'none' , '' ) +cal h('CursorLine' , '' , s:g1 , '' , s:t1 , 'none' , '' ) +cal h('QuickFixLine' , '' , s:g1 , '' , s:t1 , 'none' , '' ) +cal h('StatusLineNC' , s:g5 , s:g1 , s:t5 , s:t1 , 'none' , '' ) +cal h('StatusLineTermNC' , s:g5 , s:g1 , s:t5 , s:t1 , 'none' , '' ) +cal h('TabLineFill' , '' , s:g1 , '' , s:t1 , 'none' , '' ) +cal h('TermCursorNC' , '' , s:g1 , '' , s:t1 , 'none' , '' ) + +" muted text on highlighted background +cal h('DiffChange' , s:g4 , s:g1 , s:t4 , s:t1 , 'none' , '' ) +cal h('FoldColumn' , s:g4 , s:g1 , s:t4 , s:t1 , 'none' , '' ) +cal h('Folded' , s:g4 , s:g1 , s:t4 , s:t1 , 'none' , '' ) +cal h('SignColumn' , s:g4 , s:g1 , s:t4 , s:t1 , 'none' , '' ) +cal h('TabLine' , s:g4 , s:g1 , s:t4 , s:t1 , 'none' , '' ) +cal h('VisualNOS' , s:g4 , s:g1 , s:t4 , s:t1 , 'none' , '' ) + +" strongly highlighted background +cal h('MatchParen' , s:g6 , s:g2 , s:t6 , s:t2 , 'none' , '' ) +cal h('Pmenu' , s:g6 , s:g2 , s:t6 , s:t2 , 'none' , '' ) +cal h('Visual' , s:g6 , s:g2 , s:t6 , s:t2 , 'none' , '' ) + +" selected menu item +cal h('PmenuSel' , s:g0 , s:g5 , s:t0 , s:t5 , 'none' , '' ) +cal h('WildMenu' , s:g0 , s:g6 , s:t0 , s:t6 , 'none' , '' ) + +" solid lines +cal h('PmenuSbar' , s:g1 , s:g1 , s:t1 , s:t1 , 'none' , '' ) +cal h('PmenuThumb' , s:g4 , s:g4 , s:t4 , s:t4 , 'none' , '' ) +cal h('VertSplit' , s:g2 , s:g2 , s:t2 , s:t2 , 'none' , '' ) + + +"=== ALERT/SYNTAX HIGHLIGHTING ================================================ + +" RED for warning elements +cal h('DiffDelete' , s:g8 , s:g0 , s:t8 , s:t0 , 'reverse' , '' ) +cal h('Error' , s:g8 , s:g0 , s:t8 , s:t0 , 'reverse' , '' ) +cal h('ErrorMsg' , s:g8 , s:g0 , s:t8 , s:t0 , 'none' , '' ) +cal h('SpellBad' , '' , '' , s:t0 , s:t8 , 'undercurl' , s:g8) +cal h('TooLong' , s:g8 , '' , s:t8 , '' , 'none' , '' ) +cal h('WarningMsg' , s:g8 , s:g0 , s:t8 , s:t0 , 'none' , '' ) + +" ORANGE for preliminary elements +cal h('Define' , s:g9 , '' , s:t9 , '' , 'none' , '' ) +cal h('IncSearch' , s:g9 , s:g0 , s:t9 , s:t0 , 'reverse' , '' ) +cal h('Include' , s:g9 , '' , s:t9 , '' , 'none' , '' ) +cal h('Macro' , s:g9 , '' , s:t9 , '' , 'none' , '' ) +cal h('PreCondit' , s:g9 , '' , s:t9 , '' , 'none' , '' ) +cal h('PreProc' , s:g9 , '' , s:t9 , '' , 'none' , '' ) +cal h('SpellCap' , '' , '' , s:t0 , s:t9 , 'undercurl' , s:g9) +cal h('Title' , s:g9 , '' , s:t9 , '' , 'none' , '' ) + +" YELLOW for highlighted elements +cal h('DiffText' , s:gA , s:g6 , s:tA , s:t6 , 'reverse' , '' ) +cal h('Search' , s:gA , s:g6 , s:tA , s:t6 , 'reverse' , '' ) +cal h('Todo' , s:gA , s:g6 , s:tA , s:t6 , 'reverse' , '' ) + +" GREEN for action elements +cal h('Conditional' , s:gB , '' , s:tB , '' , 'none' , '' ) +cal h('DiffAdd' , s:gB , s:g0 , s:tB , s:t0 , 'reverse' , '' ) +cal h('Exception' , s:gB , '' , s:tB , '' , 'none' , '' ) +cal h('Keyword' , s:gB , '' , s:tB , '' , 'none' , '' ) +cal h('Label' , s:gB , '' , s:tB , '' , 'none' , '' ) +cal h('ModeMsg' , s:gB , '' , s:tB , '' , 'none' , '' ) +cal h('MoreMsg' , s:gB , '' , s:tB , '' , 'none' , '' ) +cal h('Operator' , s:gB , '' , s:tB , '' , 'none' , '' ) +cal h('Question' , s:gB , '' , s:tB , '' , 'none' , '' ) +cal h('Repeat' , s:gB , '' , s:tB , '' , 'none' , '' ) +cal h('Statement' , s:gB , '' , s:tB , '' , 'none' , '' ) + +" TEAL for object types +cal h('SpellLocal' , '' , '' , s:t0 , s:tC , 'undercurl' , s:gC) +cal h('StorageClass' , s:gC , '' , s:tC , '' , 'none' , '' ) +cal h('Structure' , s:gC , '' , s:tC , '' , 'none' , '' ) +cal h('Type' , s:gC , '' , s:tC , '' , 'none' , '' ) +cal h('Typedef' , s:gC , '' , s:tC , '' , 'none' , '' ) + +" BLUE for constants +cal h('Boolean' , s:gD , '' , s:tD , '' , 'none' , '' ) +cal h('Character' , s:gD , '' , s:tD , '' , 'none' , '' ) +cal h('Constant' , s:gD , '' , s:tD , '' , 'none' , '' ) +cal h('Float' , s:gD , '' , s:tD , '' , 'none' , '' ) +cal h('Number' , s:gD , '' , s:tD , '' , 'none' , '' ) +cal h('String' , s:gD , '' , s:tD , '' , 'none' , '' ) + +" PURPLE for special text +cal h('Debug' , s:gE , '' , s:tE , '' , 'none' , '' ) +cal h('Delimiter' , s:gE , '' , s:tE , '' , 'none' , '' ) +cal h('Special' , s:gE , '' , s:tE , '' , 'none' , '' ) +cal h('SpecialChar' , s:gE , '' , s:tE , '' , 'none' , '' ) +cal h('SpecialComment' , s:gE , '' , s:tE , '' , 'none' , '' ) +cal h('SpecialKey' , s:gE , '' , s:tE , '' , 'none' , '' ) +cal h('SpellRare' , '' , '' , s:t0 , s:tE , 'undercurl' , s:gE) +cal h('Tag' , s:gE , '' , s:tE , '' , 'none' , '' ) + +" PINK for object names +cal h('Function' , s:gF , '' , s:tF , '' , 'none' , '' ) +cal h('Identifier' , s:gF , '' , s:tF , '' , 'none' , '' ) + + +"=== OPTIONS ================================================================== + +" disable highlighted CursorLineNr +if exists('g:forgotten_light_CursorLineNr') +if g:forgotten_light_CursorLineNr == 'off' +cal h('CursorLineNr' , s:g4 , s:g1 , s:t4 , s:t1 , 'none' , '' ) +endif +endif + +" disable LineNr background altogether +if exists('g:forgotten_light_LineNr') +if g:forgotten_light_LineNr == 'off' +cal h('CursorLineNr' , s:g4 , s:g0 , s:t4 , s:t0 , 'none' , '' ) +cal h('LineNr' , s:g4 , s:g0 , s:t4 , s:t0 , 'none' , '' ) +endif +endif +