From 50e9e0120b8cbefeb0bcf1bfb944d010a0e44c91 Mon Sep 17 00:00:00 2001 From: Pranav Date: Sun, 26 Mar 2023 16:55:13 +0530 Subject: [PATCH] fix: script: do not fail if supplementing a theme name fixes #76 Signed-off-by: Pranav --- install.py | 2 +- scripts/create_theme.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/install.py b/install.py index e1d807a6..ff912f72 100644 --- a/install.py +++ b/install.py @@ -79,7 +79,7 @@ parser.add_argument("--zip", parser.add_argument("--recreate-asset", help="Recreate assets for xfwm4 and such", type=bool, - default=True, + default=False, action=argparse.BooleanOptionalAction, dest="rec_asset") diff --git a/scripts/create_theme.py b/scripts/create_theme.py index f2009583..e3c4032b 100644 --- a/scripts/create_theme.py +++ b/scripts/create_theme.py @@ -21,7 +21,7 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F for type in types: if recreate_assets: recreate_xfwm4_assets(type) - + for accent in accents: # Recolor colloid wrt our selection like mocha. latte recolor(ctp_colors[type], accent) @@ -39,8 +39,8 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F try: # Rename colloid generated files as per catppuccin new_filename = dest + \ - f"/{theme_name}-{type.capitalize()}-{size.capitalize()}-{accent.capitalize()}-{theme_style.title()}" - filename = f"{theme_name}" + f"/{name}-{type.capitalize()}-{size.capitalize()}-{accent.capitalize()}-{theme_style.title()}" + filename = f"{name}" if def_color_map[accent] != 'default': filename += f"-{def_color_map[accent].capitalize()}" filename += f"-{theme_style.capitalize()}"