-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d9a6fd7
commit d93d603
Showing
10 changed files
with
316 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
font=Fira Code:size=11 | ||
font-bold=Fira Code:weight=bold:size=11 | ||
font-italic=IBM Plex Mono:slant=italic:size=11 | ||
font-bold-italic=IBM Plex Mono:weight=bold:slant=italic:size=11 | ||
line-height=18 | ||
vertical-letter-offset=2 | ||
dpi-aware=no | ||
pad=20x20 | ||
resize-delay-ms=500 | ||
|
||
[tweak] | ||
#render-timer=osd | ||
|
||
[colors] | ||
alpha=0.875 | ||
#cursor_text_color=073642 | ||
#cursor=839496 | ||
foreground=839496 | ||
background=002b36 | ||
#selection_foreground=93a1a1 | ||
#selection_background=073642 | ||
regular0=073642 | ||
regular1=dc322f | ||
regular2=859900 | ||
regular3=b58900 | ||
regular4=268bd2 | ||
regular5=d33682 | ||
regular6=2aa198 | ||
regular7=eee8d5 | ||
bright0=002b36 | ||
bright1=cb4b16 | ||
bright2=586e75 | ||
bright3=657b83 | ||
bright4=839496 | ||
bright5=6c71c4 | ||
bright6=93a1a1 | ||
bright7=fdf6e3 | ||
|
||
[csd] | ||
border-width=8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,138 @@ | ||
#!/usr/bin/env python | ||
|
||
import sys | ||
import re | ||
|
||
|
||
COLORSCHEMES = { | ||
"dark": { | ||
"theme": "solarized", | ||
"palette": "solarized", | ||
"cursor_text_color": "{base02}", | ||
"cursor": "{base0}", | ||
"foreground": "{base0}", | ||
"background": "{base03}", | ||
"selection_foreground": "{base1}", | ||
"selection_background": "{base02}", | ||
}, | ||
"light": { | ||
"theme": "solarized", | ||
"palette": "solarized", | ||
"cursor_text_color": "{base2}", | ||
"cursor": "{base00}", | ||
"foreground": "{base00}", | ||
"background": "{base3}", | ||
"selection_foreground": "{base01}", | ||
"selection_background": "{base2}", | ||
}, | ||
"greyscale-dark": { | ||
"theme": "solarized", | ||
"palette": "solarized-greyscale", | ||
"cursor_text_color": "{base02}", | ||
"cursor": "{base0}", | ||
"foreground": "{base0}", | ||
"background": "{base03}", | ||
"selection_foreground": "{base1}", | ||
"selection_background": "{base02}", | ||
}, | ||
"greyscale-light": { | ||
"theme": "solarized", | ||
"palette": "solarized-greyscale", | ||
"cursor_text_color": "{base2}", | ||
"cursor": "{base00}", | ||
"foreground": "{base00}", | ||
"background": "{base3}", | ||
"selection_foreground": "{base01}", | ||
"selection_background": "{base2}", | ||
}, | ||
} | ||
|
||
THEMES = { | ||
"solarized": { | ||
"color0": "{base02}", | ||
"color1": "{red}", | ||
"color2": "{green}", | ||
"color3": "{yellow}", | ||
"color4": "{blue}", | ||
"color5": "{magenta}", | ||
"color6": "{cyan}", | ||
"color7": "{base2}", | ||
"color8": "{base03}", | ||
"color9": "{orange}", | ||
"color10": "{base01}", | ||
"color11": "{base00}", | ||
"color12": "{base0}", | ||
"color13": "{violet}", | ||
"color14": "{base1}", | ||
"color15": "{base3}", | ||
}, | ||
} | ||
|
||
TABLE_HEADER = """ | ||
" SOLARIZED HEX 16/8 TERMCOL XTERM/HEX L*A*B sRGB HSB | ||
" --------- ------- ---- ------- ----------- ---------- ----------- ----------- | ||
""".strip().split( | ||
"\n" | ||
) | ||
|
||
|
||
def read_table(f): | ||
match_window = [] | ||
# Read until we find the table header | ||
for line in f: | ||
line = line.strip() | ||
match_window.append(line) | ||
if len(match_window) <= len(TABLE_HEADER): | ||
continue | ||
match_window.pop(0) | ||
if match_window == TABLE_HEADER: | ||
break | ||
# Read table | ||
for line in f: | ||
parts = [p for p in re.split("[ \"']+", line) if len(p) > 0] | ||
if len(parts) < 3: | ||
break | ||
yield (parts[0], parts[1]) | ||
|
||
|
||
def read_palette(filename): | ||
palette = {} | ||
with open(filename, "r") as f: | ||
for name, value in read_table(f): | ||
palette[name] = value | ||
return palette | ||
|
||
|
||
PALETTES = { | ||
"solarized": read_palette("../nvim/colors/solarized.vim"), | ||
"solarized-greyscale": { | ||
**read_palette("../nvim/colors/solarized.vim"), | ||
**{ | ||
"base03": "#202020", | ||
"base02": "#2d2d2d", | ||
"base01": "#606060", | ||
"base00": "#6d6d6d", | ||
"base0": "#969696", | ||
"base1": "#a0a0a0", | ||
"base2": "#eaeaea", | ||
"base3": "#f9f9f9", | ||
}, | ||
}, | ||
} | ||
|
||
|
||
for name, scheme in COLORSCHEMES.items(): | ||
theme = THEMES[scheme["theme"]] | ||
palette = PALETTES[scheme["palette"]] | ||
|
||
values = {} | ||
for key, value in scheme.items(): | ||
values[key] = value.format(**palette).replace("#", "") | ||
for key, value in theme.items(): | ||
values[key] = value.format(**palette).replace("#", "") | ||
|
||
tmpl: str | ||
with open("foot.ini.tmpl", "r") as f: | ||
tmpl = f.read() | ||
with open(f"foot.{name}.ini", "w") as f: | ||
f.write(tmpl.format(**values)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
font=Fira Code:size=11 | ||
font-bold=Fira Code:weight=bold:size=11 | ||
font-italic=IBM Plex Mono:slant=italic:size=11 | ||
font-bold-italic=IBM Plex Mono:weight=bold:slant=italic:size=11 | ||
line-height=18 | ||
vertical-letter-offset=2 | ||
dpi-aware=no | ||
pad=20x20 | ||
resize-delay-ms=500 | ||
|
||
[tweak] | ||
#render-timer=osd | ||
|
||
[colors] | ||
alpha=0.875 | ||
#cursor_text_color=2d2d2d | ||
#cursor=969696 | ||
foreground=969696 | ||
background=202020 | ||
#selection_foreground=a0a0a0 | ||
#selection_background=2d2d2d | ||
regular0=2d2d2d | ||
regular1=dc322f | ||
regular2=859900 | ||
regular3=b58900 | ||
regular4=268bd2 | ||
regular5=d33682 | ||
regular6=2aa198 | ||
regular7=eaeaea | ||
bright0=202020 | ||
bright1=cb4b16 | ||
bright2=606060 | ||
bright3=6d6d6d | ||
bright4=969696 | ||
bright5=6c71c4 | ||
bright6=a0a0a0 | ||
bright7=f9f9f9 | ||
|
||
[csd] | ||
border-width=8 |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
font=Fira Code:size=11 | ||
font-bold=Fira Code:weight=bold:size=11 | ||
font-italic=IBM Plex Mono:slant=italic:size=11 | ||
font-bold-italic=IBM Plex Mono:weight=bold:slant=italic:size=11 | ||
line-height=18 | ||
vertical-letter-offset=2 | ||
dpi-aware=no | ||
pad=20x20 | ||
resize-delay-ms=500 | ||
|
||
[tweak] | ||
#render-timer=osd | ||
|
||
[colors] | ||
alpha=0.875 | ||
#cursor_text_color={cursor_text_color} | ||
#cursor={cursor} | ||
foreground={foreground} | ||
background={background} | ||
#selection_foreground={selection_foreground} | ||
#selection_background={selection_background} | ||
regular0={color0} | ||
regular1={color1} | ||
regular2={color2} | ||
regular3={color3} | ||
regular4={color4} | ||
regular5={color5} | ||
regular6={color6} | ||
regular7={color7} | ||
bright0={color8} | ||
bright1={color9} | ||
bright2={color10} | ||
bright3={color11} | ||
bright4={color12} | ||
bright5={color13} | ||
bright6={color14} | ||
bright7={color15} | ||
|
||
[csd] | ||
border-width=8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
font=Fira Code:size=11 | ||
font-bold=Fira Code:weight=bold:size=11 | ||
font-italic=IBM Plex Mono:slant=italic:size=11 | ||
font-bold-italic=IBM Plex Mono:weight=bold:slant=italic:size=11 | ||
line-height=18 | ||
vertical-letter-offset=2 | ||
dpi-aware=no | ||
pad=20x20 | ||
resize-delay-ms=500 | ||
|
||
[tweak] | ||
#render-timer=osd | ||
|
||
[colors] | ||
alpha=0.875 | ||
#cursor_text_color=eee8d5 | ||
#cursor=657b83 | ||
foreground=657b83 | ||
background=fdf6e3 | ||
#selection_foreground=586e75 | ||
#selection_background=eee8d5 | ||
regular0=073642 | ||
regular1=dc322f | ||
regular2=859900 | ||
regular3=b58900 | ||
regular4=268bd2 | ||
regular5=d33682 | ||
regular6=2aa198 | ||
regular7=eee8d5 | ||
bright0=002b36 | ||
bright1=cb4b16 | ||
bright2=586e75 | ||
bright3=657b83 | ||
bright4=839496 | ||
bright5=6c71c4 | ||
bright6=93a1a1 | ||
bright7=fdf6e3 | ||
|
||
[csd] | ||
border-width=8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters