mirror of
https://github.com/keanuplayz/dotfiles.git
synced 2024-08-15 02:33:12 +00:00
[colorschemes] add name
This commit is contained in:
parent
54455cbd00
commit
92c335b627
4 changed files with 16 additions and 10 deletions
|
@ -1,6 +1,8 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
|
||||||
# base16-eighties by Chris Kempson (http://chriskempson.com)
|
# base16-eighties by Chris Kempson (http://chriskempson.com)
|
||||||
|
base16_name = "eighties"
|
||||||
|
name = "base16-" + base16_name
|
||||||
base16_colors = [
|
base16_colors = [
|
||||||
"#2d2d2d", # 0
|
"#2d2d2d", # 0
|
||||||
"#393939", # 1
|
"#393939", # 1
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
|
|
||||||
import _theme as theme
|
import _theme as theme
|
||||||
|
|
||||||
print("let colorscheme_base16_colors = [")
|
print("let my_colorscheme_name = '{}'".format(theme.name))
|
||||||
|
print("let my_colorscheme_base16_name = '{}'".format(theme.base16_name))
|
||||||
|
print("let my_colorscheme_base16_colors = [")
|
||||||
gui_to_cterm_mapping = [0, 18, 19, 8, 20, 7, 21, 15, 1, 16, 3, 2, 6, 4, 5, 17]
|
gui_to_cterm_mapping = [0, 18, 19, 8, 20, 7, 21, 15, 1, 16, 3, 2, 6, 4, 5, 17]
|
||||||
for colors_pair in zip(theme.base16_colors, gui_to_cterm_mapping):
|
for colors_pair in zip(theme.base16_colors, gui_to_cterm_mapping):
|
||||||
print("\\ {{'gui': '{}', 'cterm': '{:>02}'}},".format(*colors_pair))
|
print("\\ {{'gui': '{}', 'cterm': '{:>02}'}},".format(*colors_pair))
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
let colorscheme_base16_colors = [
|
let my_colorscheme_name = 'base16-eighties'
|
||||||
|
let my_colorscheme_base16_name = 'eighties'
|
||||||
|
let my_colorscheme_base16_colors = [
|
||||||
\ {'gui': '#2d2d2d', 'cterm': '00'},
|
\ {'gui': '#2d2d2d', 'cterm': '00'},
|
||||||
\ {'gui': '#393939', 'cterm': '18'},
|
\ {'gui': '#393939', 'cterm': '18'},
|
||||||
\ {'gui': '#515151', 'cterm': '19'},
|
\ {'gui': '#515151', 'cterm': '19'},
|
||||||
|
|
|
@ -1,20 +1,20 @@
|
||||||
" modified version of base16-vim (https://github.com/chriskempson/base16-vim)
|
" modified version of base16-vim (https://github.com/chriskempson/base16-vim)
|
||||||
" by Chris Kempson (http://chriskempson.com)
|
" by Chris Kempson (http://chriskempson.com)
|
||||||
|
|
||||||
let s:base16_theme_name = 'eighties'
|
|
||||||
|
|
||||||
" Color definitions {{{
|
" Color definitions {{{
|
||||||
|
|
||||||
|
execute 'source' fnameescape(g:nvim_dotfiles_dir.'/../colorschemes/out/nvim.vim')
|
||||||
|
let s:colors = g:my_colorscheme_base16_colors
|
||||||
|
let s:theme_name = g:my_colorscheme_name
|
||||||
|
let s:base16_theme_name = g:my_colorscheme_base16_name
|
||||||
|
unlet g:my_colorscheme_name g:my_colorscheme_base16_name g:my_colorscheme_base16_colors
|
||||||
|
|
||||||
if empty($BASE16_SHELL) || !filereadable($BASE16_SHELL.'/scripts/base16-'.s:base16_theme_name.'.sh') || &termguicolors
|
if empty($BASE16_SHELL) || !filereadable($BASE16_SHELL.'/scripts/base16-'.s:base16_theme_name.'.sh') || &termguicolors
|
||||||
set termguicolors
|
set termguicolors
|
||||||
else
|
else
|
||||||
" call system(shellescape(s:base16_shell_script))
|
" call system(shellescape($BASE16_SHELL.'/scripts/base16-'.s:base16_theme_name.'.sh'))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
execute 'source' fnameescape(g:nvim_dotfiles_dir.'/../colorschemes/out/nvim.vim')
|
|
||||||
let s:colors = g:colorscheme_base16_colors
|
|
||||||
unlet g:colorscheme_base16_colors
|
|
||||||
|
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Neovim terminal colors {{{
|
" Neovim terminal colors {{{
|
||||||
|
@ -32,7 +32,7 @@ let s:base16_theme_name = 'eighties'
|
||||||
" Theme setup {{{
|
" Theme setup {{{
|
||||||
hi clear
|
hi clear
|
||||||
syntax reset
|
syntax reset
|
||||||
let g:colors_name = 'base16-' . s:base16_theme_name
|
let g:colors_name = s:theme_name
|
||||||
" }}}
|
" }}}
|
||||||
|
|
||||||
" Highlighting function {{{
|
" Highlighting function {{{
|
||||||
|
|
Loading…
Reference in a new issue