summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2017-06-29 18:12:41 +1000
committerDylan Araps <dylan.araps@gmail.com>2017-06-29 18:12:41 +1000
commite92bce4fe932ea9e13abb6c01a9685bb3bada73b (patch)
tree6dd5396e8c62294ba34477ee20a60fb561ce9324
parent35920c71640e30dd818db971890381f35705ef75 (diff)
template: Add initial putty template.
-rwxr-xr-xpywal/export_colors.py12
-rw-r--r--pywal/templates/colors-putty.reg19
2 files changed, 26 insertions, 5 deletions
diff --git a/pywal/export_colors.py b/pywal/export_colors.py
index 6d51ca6..9a3d958 100755
--- a/pywal/export_colors.py
+++ b/pywal/export_colors.py
@@ -5,6 +5,7 @@ import os
import pathlib
from pywal.settings import CACHE_DIR, TEMPLATE_DIR
+from pywal import util
def template(colors, input_file):
@@ -17,11 +18,8 @@ def template(colors, input_file):
with open(template_file) as file:
template_data = file.readlines()
- # Merge both dicts.
- colors["colors"].update(colors["special"])
-
# Format the markers.
- template_data = "".join(template_data).format(**colors["colors"])
+ template_data = "".join(template_data).format(**colors)
# Export the template.
with open(export_file, "w") as file:
@@ -30,5 +28,9 @@ def template(colors, input_file):
def export_all_templates(colors):
"""Export all template files."""
+ # Merge both dicts.
+ colors["colors"].update(colors["special"])
+
# 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)]
diff --git a/pywal/templates/colors-putty.reg b/pywal/templates/colors-putty.reg
new file mode 100644
index 0000000..e8a5b6c
--- /dev/null
+++ b/pywal/templates/colors-putty.reg
@@ -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}"