aboutsummaryrefslogtreecommitdiff
path: root/kitty/kitty-themes/.tools/convert.py
diff options
context:
space:
mode:
authorIndrajith K L2025-11-23 19:20:09 +0530
committerIndrajith K L2025-11-23 19:20:09 +0530
commit8453bb64d330ba4bbb268e2593e95a86477eec1c (patch)
treef9e829365139031dfa938e832f9a05e3536a8e36 /kitty/kitty-themes/.tools/convert.py
parent1ff9a983329b0e703511e78cd81dcbe81358733f (diff)
downloaddots-niri.tar.gz
dots-niri.tar.bz2
dots-niri.zip
Dot File for niri Desktopniri
Diffstat (limited to 'kitty/kitty-themes/.tools/convert.py')
-rw-r--r--kitty/kitty-themes/.tools/convert.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/kitty/kitty-themes/.tools/convert.py b/kitty/kitty-themes/.tools/convert.py
deleted file mode 100644
index 3599ddcf1..000000000
--- a/kitty/kitty-themes/.tools/convert.py
+++ /dev/null
@@ -1,30 +0,0 @@
-import json
-from jinja2 import FileSystemLoader, Environment
-import sys
-import os
-
-
-def removeAlpha(value):
- hex = value.lstrip("#")
- return "#" + hex[0:6]
-
-
-filename = sys.argv[1]
-
-kitty_configuration = os.path.splitext(filename)[0] + ".conf"
-
-with open(filename, "r") as configuration_file:
- configuration = json.load(configuration_file)
-
-loader = FileSystemLoader(".")
-env = Environment(loader=loader)
-
-env.filters['removeAlpha'] = removeAlpha
-env.trim_blocks = True
-
-template = env.get_template("template.conf.j2")
-
-output = template.render(**configuration)
-
-with open(kitty_configuration, "w") as fp:
- fp.write(output)