mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-01-09 23:48:35 +01:00
template: Add initial putty template.
This commit is contained in:
parent
35920c7164
commit
e92bce4fe9
@ -5,6 +5,7 @@ import os
|
|||||||
import pathlib
|
import pathlib
|
||||||
|
|
||||||
from pywal.settings import CACHE_DIR, TEMPLATE_DIR
|
from pywal.settings import CACHE_DIR, TEMPLATE_DIR
|
||||||
|
from pywal import util
|
||||||
|
|
||||||
|
|
||||||
def template(colors, input_file):
|
def template(colors, input_file):
|
||||||
@ -17,11 +18,8 @@ def template(colors, input_file):
|
|||||||
with open(template_file) as file:
|
with open(template_file) as file:
|
||||||
template_data = file.readlines()
|
template_data = file.readlines()
|
||||||
|
|
||||||
# Merge both dicts.
|
|
||||||
colors["colors"].update(colors["special"])
|
|
||||||
|
|
||||||
# Format the markers.
|
# Format the markers.
|
||||||
template_data = "".join(template_data).format(**colors["colors"])
|
template_data = "".join(template_data).format(**colors)
|
||||||
|
|
||||||
# Export the template.
|
# Export the template.
|
||||||
with open(export_file, "w") as file:
|
with open(export_file, "w") as file:
|
||||||
@ -30,5 +28,9 @@ def template(colors, input_file):
|
|||||||
|
|
||||||
def export_all_templates(colors):
|
def export_all_templates(colors):
|
||||||
"""Export all template files."""
|
"""Export all template files."""
|
||||||
|
# Merge both dicts.
|
||||||
|
colors["colors"].update(colors["special"])
|
||||||
|
|
||||||
# pylint: disable=W0106
|
# pylint: disable=W0106
|
||||||
[template(colors, file.name) for file in os.scandir(TEMPLATE_DIR)]
|
[template(colors["colors"], file.name)
|
||||||
|
for file in os.scandir(TEMPLATE_DIR)]
|
||||||
|
19
pywal/templates/colors-putty.reg
Normal file
19
pywal/templates/colors-putty.reg
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
Windows Registry Editor Version 5.00
|
||||||
|
|
||||||
|
[HKEY_CURRENT_USER\Software\SimonTatham\PuTTY\Sessions\Default%20Settings]]
|
||||||
|
"colour0"="{color0}"
|
||||||
|
"colour1"="{color1}"
|
||||||
|
"colour2"="{color2}"
|
||||||
|
"colour3"="{color3}"
|
||||||
|
"colour4"="{color4}"
|
||||||
|
"colour5"="{color5}"
|
||||||
|
"colour6"="{color6}"
|
||||||
|
"colour7"="{color7}"
|
||||||
|
"colour8"="{color8}"
|
||||||
|
"colour9"="{color9}"
|
||||||
|
"colour10"="{color10}"
|
||||||
|
"colour11"="{color11}"
|
||||||
|
"colour12"="{color12}"
|
||||||
|
"colour13"="{color13}"
|
||||||
|
"colour14"="{color14}"
|
||||||
|
"colour15"="{color15}"
|
Loading…
Reference in New Issue
Block a user