From 5adbd419f0908c523601a49e91b0b235ac3a9eee Mon Sep 17 00:00:00 2001 From: Mason Date: Sat, 6 Jan 2024 02:07:46 -0700 Subject: [PATCH] check user template dir when exporting single file --- pywal/export.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pywal/export.py b/pywal/export.py index 479008e..c92d8a8 100644 --- a/pywal/export.py +++ b/pywal/export.py @@ -131,7 +131,12 @@ def color(colors, export_type, output_file=None): all_colors = flatten_colors(colors) template_name = get_export_type(export_type) - template_file = os.path.join(MODULE_DIR, "templates", template_name) + + if template_name == export_type: + template_file = os.path.join(CONF_DIR, "templates", template_name) + else: + template_file = os.path.join(MODULE_DIR, "templates", template_name) + output_file = output_file or os.path.join(CACHE_DIR, template_name) if os.path.isfile(template_file):