mirror of
https://github.com/wez/wezterm.git
synced 2024-11-22 22:42:48 +03:00
docs: format and wording tweak for color schemes
This commit is contained in:
parent
2c5275142a
commit
83c52ef27a
@ -47,12 +47,14 @@ class Gen(object):
|
||||
for page in children:
|
||||
idx.write(f" - [{page.title}]({page.title}.md)\n")
|
||||
|
||||
|
||||
def image_dimensions(filename):
|
||||
out = subprocess.check_output(["identify", filename])
|
||||
fields = out.split()
|
||||
while fields[0] != b'PNG':
|
||||
while fields[0] != b"PNG":
|
||||
fields = fields[1:]
|
||||
return [int(x) for x in fields[1].split(b'x')]
|
||||
return [int(x) for x in fields[1].split(b"x")]
|
||||
|
||||
|
||||
class GenColorScheme(object):
|
||||
def __init__(self, title, dirname, index=None):
|
||||
@ -78,16 +80,20 @@ class GenColorScheme(object):
|
||||
img = os.path.basename(img)
|
||||
title = os.path.basename(img).rsplit(".", 1)[0]
|
||||
idx.write(f"# {title}\n")
|
||||
idx.write(f"<img width=\"{width}\" height=\"{height}\" src=\"{img}\" alt=\"{title}\">\n\n")
|
||||
idx.write(
|
||||
f'<img width="{width}" height="{height}" src="{img}" alt="{title}">\n\n'
|
||||
)
|
||||
idx.write("To use this scheme, add this to your config:\n")
|
||||
idx.write(f"""
|
||||
idx.write(
|
||||
f"""
|
||||
```lua
|
||||
return {{
|
||||
color_scheme = "{title}",
|
||||
}}
|
||||
```
|
||||
|
||||
""")
|
||||
"""
|
||||
)
|
||||
|
||||
index_filename = f"{self.dirname}/index.md"
|
||||
index_page = Page(self.title, index_filename, children=children)
|
||||
@ -99,6 +105,7 @@ return {{
|
||||
upper = page.title.upper()
|
||||
idx.write(f" - [{upper}]({page.title}/index.md)\n")
|
||||
|
||||
|
||||
TOC = [
|
||||
Page(
|
||||
"wezterm",
|
||||
|
@ -10,7 +10,8 @@ return {
|
||||
}
|
||||
```
|
||||
|
||||
You can find a list of available color schemes in [The Color Schemes Section](../colorschemes/index.md).
|
||||
You can find a list of available color schemes and screenshots
|
||||
in [The Color Schemes Section](../colorschemes/index.md).
|
||||
|
||||
The `color_scheme` option takes precedence over the `colors` section below.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user