diff --git a/colorschemes/_theme.py b/colorschemes/_theme.py
new file mode 100644
index 0000000..7e9dfcb
--- /dev/null
+++ b/colorschemes/_theme.py
@@ -0,0 +1,54 @@
+#!/usr/bin/env python
+
+# base16-eighties by Chris Kempson (http://chriskempson.com)
+base16_colors = [
+ "#2d2d2d", # 0
+ "#393939", # 1
+ "#515151", # 2
+ "#747369", # 3
+ "#a09f93", # 4
+ "#d3d0c8", # 5
+ "#e8e6df", # 6
+ "#f2f0ec", # 7
+ "#f2777a", # 8
+ "#f99157", # 9
+ "#ffcc66", # a
+ "#99cc99", # b
+ "#66cccc", # c
+ "#6699cc", # d
+ "#cc99cc", # e
+ "#d27b53", # f
+]
+
+bg = base16_colors[0x0]
+fg = base16_colors[0x5]
+
+cursor_bg = fg
+cursor_fg = bg
+
+selection_bg = base16_colors[0x2]
+selection_fg = fg
+
+ansi_colors = [
+ base16_colors[i]
+ for i in [
+ 0x0,
+ 0x8,
+ 0xB,
+ 0xA,
+ 0xD,
+ 0xE,
+ 0xC,
+ 0x5,
+ 0x3,
+ 0x8,
+ 0xB,
+ 0xA,
+ 0xD,
+ 0xE,
+ 0xC,
+ 0x7,
+ ]
+]
+
+link_color = ansi_colors[12]
diff --git a/colorschemes/build.sh b/colorschemes/build.sh
new file mode 100755
index 0000000..2b5891a
--- /dev/null
+++ b/colorschemes/build.sh
@@ -0,0 +1,20 @@
+#!/usr/bin/env bash
+
+set -e
+
+cd "$(dirname "${BASH_SOURCE[0]}")"
+
+mkdir -p out
+
+declare -A apps=(
+ [nvim]=vim
+ [iterm]=itermcolors
+ [kitty]=conf
+ [termux]=properties
+)
+
+for app in "${!apps[@]}"; do
+ output_file="$app.${apps[$app]}"
+ echo "$output_file"
+ ./"$app".py > ./out/"$output_file"
+done
diff --git a/colorschemes/iterm.py b/colorschemes/iterm.py
new file mode 100755
index 0000000..4931105
--- /dev/null
+++ b/colorschemes/iterm.py
@@ -0,0 +1,52 @@
+#!/usr/bin/env python
+
+import _theme as theme
+
+print(
+ """\
+
+
+
+\
+"""
+)
+
+
+def print_color(key_name, color):
+ r, g, b = [float(int(color[2 * i + 1 : 2 * i + 3], 16)) / 255 for i in range(3)]
+ print(
+ """\
+ {} Color
+
+ Color Space
+ sRGB
+ Red Component
+ {}
+ Green Component
+ {}
+ Blue Component
+ {}
+ \
+""".format(
+ key_name, r, g, b
+ )
+ )
+
+
+print_color("Background", theme.bg)
+print_color("Foreground", theme.fg)
+print_color("Bold", theme.fg)
+print_color("Cursor", theme.cursor_bg)
+print_color("Cursor Text", theme.cursor_fg)
+print_color("Selection Color", theme.selection_bg)
+print_color("Selected Text Color", theme.selection_fg)
+for index, color in enumerate(theme.ansi_colors):
+ print_color("Ansi " + str(index), color)
+print_color("Link", theme.link_color)
+
+print(
+ """\
+
+\
+"""
+)
diff --git a/colorschemes/kitty.py b/colorschemes/kitty.py
new file mode 100755
index 0000000..7740588
--- /dev/null
+++ b/colorschemes/kitty.py
@@ -0,0 +1,16 @@
+#!/usr/bin/env python
+
+import _theme as theme
+
+print("background", theme.bg)
+print("foreground", theme.fg)
+print("cursor", theme.cursor_bg)
+print("cursor_text_color", theme.cursor_fg)
+print("selection_background", theme.selection_bg)
+print("selection_foreground", theme.selection_fg)
+for index, color in enumerate(theme.ansi_colors):
+ print("color" + str(index), color)
+print("url_color", theme.link_color)
+print("active_border_color", theme.ansi_colors[2])
+print("inactive_border_color", theme.ansi_colors[8])
+print("bell_border_color", theme.ansi_colors[1])
diff --git a/colorschemes/nvim.py b/colorschemes/nvim.py
new file mode 100755
index 0000000..c7a6155
--- /dev/null
+++ b/colorschemes/nvim.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+import _theme as theme
+
+print("let colorscheme_base16_colors = [")
+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):
+ print("\\ {{'gui': '{}', 'cterm': '{:>02}'}},".format(*colors_pair))
+print("\\ ]")
+
+
+def print_terminal_color(key_name, color):
+ print("let terminal_color_{} = '{}'".format(key_name, color))
+
+
+print_terminal_color("background", theme.bg)
+print_terminal_color("foreground", theme.fg)
+for index, color in enumerate(theme.ansi_colors):
+ print_terminal_color(str(index), color)
diff --git a/colorschemes/out/iterm.itermcolors b/colorschemes/out/iterm.itermcolors
new file mode 100644
index 0000000..1d03f1c
--- /dev/null
+++ b/colorschemes/out/iterm.itermcolors
@@ -0,0 +1,270 @@
+
+
+
+
+ Background Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.17647058823529413
+ Green Component
+ 0.17647058823529413
+ Blue Component
+ 0.17647058823529413
+
+ Foreground Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.8274509803921568
+ Green Component
+ 0.8156862745098039
+ Blue Component
+ 0.7843137254901961
+
+ Bold Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.8274509803921568
+ Green Component
+ 0.8156862745098039
+ Blue Component
+ 0.7843137254901961
+
+ Cursor Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.8274509803921568
+ Green Component
+ 0.8156862745098039
+ Blue Component
+ 0.7843137254901961
+
+ Cursor Text Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.17647058823529413
+ Green Component
+ 0.17647058823529413
+ Blue Component
+ 0.17647058823529413
+
+ Selection Color Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.3176470588235294
+ Green Component
+ 0.3176470588235294
+ Blue Component
+ 0.3176470588235294
+
+ Selected Text Color Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.8274509803921568
+ Green Component
+ 0.8156862745098039
+ Blue Component
+ 0.7843137254901961
+
+ Ansi 0 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.17647058823529413
+ Green Component
+ 0.17647058823529413
+ Blue Component
+ 0.17647058823529413
+
+ Ansi 1 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.9490196078431372
+ Green Component
+ 0.4666666666666667
+ Blue Component
+ 0.47843137254901963
+
+ Ansi 2 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.6
+ Green Component
+ 0.8
+ Blue Component
+ 0.6
+
+ Ansi 3 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 1.0
+ Green Component
+ 0.8
+ Blue Component
+ 0.4
+
+ Ansi 4 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.4
+ Green Component
+ 0.6
+ Blue Component
+ 0.8
+
+ Ansi 5 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.8
+ Green Component
+ 0.6
+ Blue Component
+ 0.8
+
+ Ansi 6 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.4
+ Green Component
+ 0.8
+ Blue Component
+ 0.8
+
+ Ansi 7 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.8274509803921568
+ Green Component
+ 0.8156862745098039
+ Blue Component
+ 0.7843137254901961
+
+ Ansi 8 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.4549019607843137
+ Green Component
+ 0.45098039215686275
+ Blue Component
+ 0.4117647058823529
+
+ Ansi 9 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.9490196078431372
+ Green Component
+ 0.4666666666666667
+ Blue Component
+ 0.47843137254901963
+
+ Ansi 10 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.6
+ Green Component
+ 0.8
+ Blue Component
+ 0.6
+
+ Ansi 11 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 1.0
+ Green Component
+ 0.8
+ Blue Component
+ 0.4
+
+ Ansi 12 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.4
+ Green Component
+ 0.6
+ Blue Component
+ 0.8
+
+ Ansi 13 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.8
+ Green Component
+ 0.6
+ Blue Component
+ 0.8
+
+ Ansi 14 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.4
+ Green Component
+ 0.8
+ Blue Component
+ 0.8
+
+ Ansi 15 Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.9490196078431372
+ Green Component
+ 0.9411764705882353
+ Blue Component
+ 0.9254901960784314
+
+ Link Color
+
+ Color Space
+ sRGB
+ Red Component
+ 0.4
+ Green Component
+ 0.6
+ Blue Component
+ 0.8
+
+
+
diff --git a/colorschemes/out/kitty.conf b/colorschemes/out/kitty.conf
new file mode 100644
index 0000000..8db5b80
--- /dev/null
+++ b/colorschemes/out/kitty.conf
@@ -0,0 +1,26 @@
+background #2d2d2d
+foreground #d3d0c8
+cursor #d3d0c8
+cursor_text_color #2d2d2d
+selection_background #515151
+selection_foreground #d3d0c8
+color0 #2d2d2d
+color1 #f2777a
+color2 #99cc99
+color3 #ffcc66
+color4 #6699cc
+color5 #cc99cc
+color6 #66cccc
+color7 #d3d0c8
+color8 #747369
+color9 #f2777a
+color10 #99cc99
+color11 #ffcc66
+color12 #6699cc
+color13 #cc99cc
+color14 #66cccc
+color15 #f2f0ec
+url_color #6699cc
+active_border_color #99cc99
+inactive_border_color #747369
+bell_border_color #f2777a
diff --git a/colorschemes/out/nvim.vim b/colorschemes/out/nvim.vim
new file mode 100644
index 0000000..a7b1240
--- /dev/null
+++ b/colorschemes/out/nvim.vim
@@ -0,0 +1,36 @@
+let colorscheme_base16_colors = [
+\ {'gui': '#2d2d2d', 'cterm': '00'},
+\ {'gui': '#393939', 'cterm': '18'},
+\ {'gui': '#515151', 'cterm': '19'},
+\ {'gui': '#747369', 'cterm': '08'},
+\ {'gui': '#a09f93', 'cterm': '20'},
+\ {'gui': '#d3d0c8', 'cterm': '07'},
+\ {'gui': '#e8e6df', 'cterm': '21'},
+\ {'gui': '#f2f0ec', 'cterm': '15'},
+\ {'gui': '#f2777a', 'cterm': '01'},
+\ {'gui': '#f99157', 'cterm': '16'},
+\ {'gui': '#ffcc66', 'cterm': '03'},
+\ {'gui': '#99cc99', 'cterm': '02'},
+\ {'gui': '#66cccc', 'cterm': '06'},
+\ {'gui': '#6699cc', 'cterm': '04'},
+\ {'gui': '#cc99cc', 'cterm': '05'},
+\ {'gui': '#d27b53', 'cterm': '17'},
+\ ]
+let terminal_color_background = '#2d2d2d'
+let terminal_color_foreground = '#d3d0c8'
+let terminal_color_0 = '#2d2d2d'
+let terminal_color_1 = '#f2777a'
+let terminal_color_2 = '#99cc99'
+let terminal_color_3 = '#ffcc66'
+let terminal_color_4 = '#6699cc'
+let terminal_color_5 = '#cc99cc'
+let terminal_color_6 = '#66cccc'
+let terminal_color_7 = '#d3d0c8'
+let terminal_color_8 = '#747369'
+let terminal_color_9 = '#f2777a'
+let terminal_color_10 = '#99cc99'
+let terminal_color_11 = '#ffcc66'
+let terminal_color_12 = '#6699cc'
+let terminal_color_13 = '#cc99cc'
+let terminal_color_14 = '#66cccc'
+let terminal_color_15 = '#f2f0ec'
diff --git a/colorschemes/out/termux.properties b/colorschemes/out/termux.properties
new file mode 100644
index 0000000..70f5a30
--- /dev/null
+++ b/colorschemes/out/termux.properties
@@ -0,0 +1,19 @@
+background=#2d2d2d
+foreground=#d3d0c8
+cursor=#d3d0c8
+color0=#2d2d2d
+color1=#f2777a
+color2=#99cc99
+color3=#ffcc66
+color4=#6699cc
+color5=#cc99cc
+color6=#66cccc
+color7=#d3d0c8
+color8=#747369
+color9=#f2777a
+color10=#99cc99
+color11=#ffcc66
+color12=#6699cc
+color13=#cc99cc
+color14=#66cccc
+color15=#f2f0ec
diff --git a/colorschemes/termux.py b/colorschemes/termux.py
new file mode 100755
index 0000000..337cc4c
--- /dev/null
+++ b/colorschemes/termux.py
@@ -0,0 +1,14 @@
+#!/usr/bin/env python
+
+import _theme as theme
+
+
+def print_color(key_name, color):
+ print("{}={}".format(key_name, color))
+
+
+print_color("background", theme.bg)
+print_color("foreground", theme.fg)
+print_color("cursor", theme.cursor_bg)
+for index, color in enumerate(theme.ansi_colors):
+ print_color("color" + str(index), color)
diff --git a/kitty/kitty.conf b/kitty/kitty.conf
index bc34301..30b075e 100644
--- a/kitty/kitty.conf
+++ b/kitty/kitty.conf
@@ -1,4 +1,4 @@
-# vim:fileencoding=utf-8:ft=conf:foldmethod=marker
+include ../colorschemes/out/kitty.conf
#: Fonts {{{
@@ -6,7 +6,7 @@
#: individual font faces and even specify special fonts for particular
#: characters.
-font_family Ubuntu Mono derivative Powerline
+# font_family monospace
# bold_font auto
# italic_font auto
# bold_italic_font auto
@@ -59,11 +59,11 @@ font_family Ubuntu Mono derivative Powerline
#: Cursor customization {{{
-cursor #d3d0c8
+# cursor #cccccc
#: Default cursor color
-cursor_text_color #2d2d2d
+# cursor_text_color #111111
#: Choose the color of text under the cursor. If you want it rendered
#: with the background color of the cell underneath instead, use the
@@ -114,7 +114,7 @@ cursor_stop_blinking_after 0
#: Mouse {{{
-url_color #6699cc
+# url_color #0087bd
url_style single
#: The color and style for highlighting URLs on mouse-over. url_style
@@ -281,15 +281,15 @@ window_padding_width 2.0
#: The window padding (in pts) (blank area between the text and the
#: window border)
-active_border_color #99cc99
+# active_border_color #00ff00
#: The color for the border of the active window
-inactive_border_color #747369
+# inactive_border_color #cccccc
#: The color for the border of inactive windows
-bell_border_color #f2777a
+# bell_border_color #ff5a00
#: The color for the border of inactive windows in which a bell has
#: occurred
@@ -346,8 +346,8 @@ inactive_tab_font_style italic
#: Color scheme {{{
-foreground #d3d0c8
-background #2d2d2d
+# foreground #dddddd
+# background #000000
#: The foreground and background colors
@@ -375,8 +375,8 @@ background #2d2d2d
#: How much to dim text that has the DIM/FAINT attribute set. One
#: means no dimming and zero means fully dimmed (i.e. invisible).
-selection_foreground #d3d0c8
-selection_background #515151
+# selection_foreground #000000
+# selection_background #fffacd
#: The foreground and background for text selected with the mouse
@@ -385,43 +385,43 @@ selection_background #515151
#: dull and bright version. You can also set the remaining colors from
#: the 256 color table as color16 to color255.
-color0 #2d2d2d
-color8 #747369
+# color0 #000000
+# color8 #767676
#: black
-color1 #f2777a
-color9 #f2777a
+# color1 #cc0403
+# color9 #f2201f
#: red
-color2 #99cc99
-color10 #99cc99
+# color2 #19cb00
+# color10 #23fd00
#: green
-color3 #ffcc66
-color11 #ffcc66
+# color3 #cecb00
+# color11 #fffd00
#: yellow
-color4 #6699cc
-color12 #6699cc
+# color4 #0d73cc
+# color12 #1a8fff
#: blue
-color5 #cc99cc
-color13 #cc99cc
+# color5 #cb1ed1
+# color13 #fd28ff
#: magenta
-color6 #66cccc
-color14 #66cccc
+# color6 #0dcdcd
+# color14 #14ffff
#: cyan
-color7 #d3d0c8
-color15 #f2f0ec
+# color7 #dddddd
+# color15 #ffffff
#: white
diff --git a/nvim/init.vim b/nvim/init.vim
index 2a549bb..47384cb 100644
--- a/nvim/init.vim
+++ b/nvim/init.vim
@@ -1,11 +1,11 @@
-let s:my_config_dir = expand(':p:h')
+let g:nvim_dotfiles_dir = expand(':p:h')
let g:vim_ide = get(g:, 'vim_ide', 0)
for s:name in ['plugins', 'editing', 'interface', 'colorscheme', 'files', 'completion', 'terminal', 'git']
- execute 'source' fnameescape(s:my_config_dir.'/lib/'.s:name.'.vim')
+ execute 'source' fnameescape(g:nvim_dotfiles_dir.'/lib/'.s:name.'.vim')
endfor
-for s:path in globpath(s:my_config_dir.'/lib/languages', '*', 0, 1)
+for s:path in globpath(g:nvim_dotfiles_dir.'/lib/languages', '*', 0, 1)
execute 'source' fnameescape(s:path)
endfor
diff --git a/nvim/lib/colorscheme.vim b/nvim/lib/colorscheme.vim
index 2a6bc7f..09dde0b 100644
--- a/nvim/lib/colorscheme.vim
+++ b/nvim/lib/colorscheme.vim
@@ -5,31 +5,15 @@ let s:base16_theme_name = 'eighties'
" Color definitions {{{
- 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
else
" call system(shellescape(s:base16_shell_script))
endif
- " Eighties scheme by Chris Kempson (http://chriskempson.com)
- let s:colors = [
- \ {'gui': '#2d2d2d', 'cterm': '00'},
- \ {'gui': '#393939', 'cterm': '18'},
- \ {'gui': '#515151', 'cterm': '19'},
- \ {'gui': '#747369', 'cterm': '08'},
- \ {'gui': '#a09f93', 'cterm': '20'},
- \ {'gui': '#d3d0c8', 'cterm': '07'},
- \ {'gui': '#e8e6df', 'cterm': '21'},
- \ {'gui': '#f2f0ec', 'cterm': '15'},
- \ {'gui': '#f2777a', 'cterm': '01'},
- \ {'gui': '#f99157', 'cterm': '16'},
- \ {'gui': '#ffcc66', 'cterm': '03'},
- \ {'gui': '#99cc99', 'cterm': '02'},
- \ {'gui': '#66cccc', 'cterm': '06'},
- \ {'gui': '#6699cc', 'cterm': '04'},
- \ {'gui': '#cc99cc', 'cterm': '05'},
- \ {'gui': '#d27b53', 'cterm': '17'}
- \ ]
+ execute 'source' fnameescape(g:nvim_dotfiles_dir.'/../colorschemes/out/nvim.vim')
+ let s:colors = g:colorscheme_base16_colors
+ unlet g:colorscheme_base16_colors
" }}}