diff --git a/install.py b/install.py
index 55ca707a..e1d807a6 100644
--- a/install.py
+++ b/install.py
@@ -76,6 +76,13 @@ parser.add_argument("--zip",
action=argparse.BooleanOptionalAction,
dest="zip")
+parser.add_argument("--recreate-asset",
+ help="Recreate assets for xfwm4 and such",
+ type=bool,
+ default=True,
+ action=argparse.BooleanOptionalAction,
+ dest="rec_asset")
+
args = parser.parse_args()
if "all" in args.flavor:
@@ -99,4 +106,4 @@ if not os.listdir(work_dir):
subprocess.call("git submodule update --init --recursive", shell=True)
filename = create_theme(flavors, accents, dest,
- args.link, args.name, args.size, args.tweaks, args.zip)
+ args.link, args.name, args.size, args.tweaks, args.zip, args.rec_asset)
diff --git a/patches/xfwm4/assets-Catppuccin-frappe-Normal.svg b/patches/xfwm4/assets-Catppuccin-frappe-Normal.svg
new file mode 100644
index 00000000..05fa92f6
--- /dev/null
+++ b/patches/xfwm4/assets-Catppuccin-frappe-Normal.svg
@@ -0,0 +1,1543 @@
+
+
diff --git a/patches/xfwm4/assets-Catppuccin-frappe.svg b/patches/xfwm4/assets-Catppuccin-frappe.svg
new file mode 100644
index 00000000..ac47d7d8
--- /dev/null
+++ b/patches/xfwm4/assets-Catppuccin-frappe.svg
@@ -0,0 +1,1328 @@
+
+
diff --git a/patches/xfwm4/assets-Catppuccin-latte-Normal.svg b/patches/xfwm4/assets-Catppuccin-latte-Normal.svg
new file mode 100644
index 00000000..05fa92f6
--- /dev/null
+++ b/patches/xfwm4/assets-Catppuccin-latte-Normal.svg
@@ -0,0 +1,1543 @@
+
+
diff --git a/patches/xfwm4/assets-Catppuccin-latte.svg b/patches/xfwm4/assets-Catppuccin-latte.svg
new file mode 100644
index 00000000..ac47d7d8
--- /dev/null
+++ b/patches/xfwm4/assets-Catppuccin-latte.svg
@@ -0,0 +1,1328 @@
+
+
diff --git a/patches/xfwm4/assets-Catppuccin-macchiato-Normal.svg b/patches/xfwm4/assets-Catppuccin-macchiato-Normal.svg
new file mode 100644
index 00000000..848c5a45
--- /dev/null
+++ b/patches/xfwm4/assets-Catppuccin-macchiato-Normal.svg
@@ -0,0 +1,1543 @@
+
+
diff --git a/patches/xfwm4/assets-Catppuccin-macchiato.svg b/patches/xfwm4/assets-Catppuccin-macchiato.svg
new file mode 100644
index 00000000..f4025055
--- /dev/null
+++ b/patches/xfwm4/assets-Catppuccin-macchiato.svg
@@ -0,0 +1,1328 @@
+
+
diff --git a/patches/xfwm4/assets-Catppuccin-mocha-Normal.svg b/patches/xfwm4/assets-Catppuccin-mocha-Normal.svg
new file mode 100644
index 00000000..9ee2fec6
--- /dev/null
+++ b/patches/xfwm4/assets-Catppuccin-mocha-Normal.svg
@@ -0,0 +1,1543 @@
+
+
diff --git a/patches/xfwm4/assets-Catppuccin-mocha.svg b/patches/xfwm4/assets-Catppuccin-mocha.svg
new file mode 100644
index 00000000..b2f5ab2f
--- /dev/null
+++ b/patches/xfwm4/assets-Catppuccin-mocha.svg
@@ -0,0 +1,1328 @@
+
+
diff --git a/patches/xfwm4/assets-Light-Catppuccin-frappe-Normal.svg b/patches/xfwm4/assets-Light-Catppuccin-frappe-Normal.svg
new file mode 100644
index 00000000..f14a4527
--- /dev/null
+++ b/patches/xfwm4/assets-Light-Catppuccin-frappe-Normal.svg
@@ -0,0 +1,1546 @@
+
+
diff --git a/patches/xfwm4/assets-Light-Catppuccin-frappe.svg b/patches/xfwm4/assets-Light-Catppuccin-frappe.svg
new file mode 100644
index 00000000..8aaafe89
--- /dev/null
+++ b/patches/xfwm4/assets-Light-Catppuccin-frappe.svg
@@ -0,0 +1,1368 @@
+
+
diff --git a/patches/xfwm4/assets-Light-Catppuccin-latte-Normal.svg b/patches/xfwm4/assets-Light-Catppuccin-latte-Normal.svg
new file mode 100644
index 00000000..f14a4527
--- /dev/null
+++ b/patches/xfwm4/assets-Light-Catppuccin-latte-Normal.svg
@@ -0,0 +1,1546 @@
+
+
diff --git a/patches/xfwm4/assets-Light-Catppuccin-latte.svg b/patches/xfwm4/assets-Light-Catppuccin-latte.svg
new file mode 100644
index 00000000..8aaafe89
--- /dev/null
+++ b/patches/xfwm4/assets-Light-Catppuccin-latte.svg
@@ -0,0 +1,1368 @@
+
+
diff --git a/patches/xfwm4/assets-Light-Catppuccin-macchiato-Normal.svg b/patches/xfwm4/assets-Light-Catppuccin-macchiato-Normal.svg
new file mode 100644
index 00000000..f14a4527
--- /dev/null
+++ b/patches/xfwm4/assets-Light-Catppuccin-macchiato-Normal.svg
@@ -0,0 +1,1546 @@
+
+
diff --git a/patches/xfwm4/assets-Light-Catppuccin-macchiato.svg b/patches/xfwm4/assets-Light-Catppuccin-macchiato.svg
new file mode 100644
index 00000000..8aaafe89
--- /dev/null
+++ b/patches/xfwm4/assets-Light-Catppuccin-macchiato.svg
@@ -0,0 +1,1368 @@
+
+
diff --git a/patches/xfwm4/assets-Light-Catppuccin-mocha-Normal.svg b/patches/xfwm4/assets-Light-Catppuccin-mocha-Normal.svg
new file mode 100644
index 00000000..f14a4527
--- /dev/null
+++ b/patches/xfwm4/assets-Light-Catppuccin-mocha-Normal.svg
@@ -0,0 +1,1546 @@
+
+
diff --git a/patches/xfwm4/assets-Light-Catppuccin-mocha.svg b/patches/xfwm4/assets-Light-Catppuccin-mocha.svg
new file mode 100644
index 00000000..8aaafe89
--- /dev/null
+++ b/patches/xfwm4/assets-Light-Catppuccin-mocha.svg
@@ -0,0 +1,1368 @@
+
+
diff --git a/scripts/create_theme.py b/scripts/create_theme.py
index ff124cf4..fe5e8f58 100644
--- a/scripts/create_theme.py
+++ b/scripts/create_theme.py
@@ -4,13 +4,14 @@ import subprocess
from typing import List
from scripts.ctp_colors import ctp_colors
+from scripts.patches import recreate_xfwm4_assets
from scripts.recolor import recolor
from scripts.utils import zip_multiple_folders
from scripts.var import def_color_map, repo_dir, src_dir, theme_name, work_dir
def create_theme(types: List[str], accents: List[str], dest: str, link: bool = False,
- name: str = theme_name, size: str = "standard", tweaks=[], zip = False) -> None:
+ name: str = theme_name, size: str = "standard", tweaks=[], zip = False, recreate_assets = True) -> None:
try:
os.makedirs(dest) # Create our destination directory
@@ -21,6 +22,8 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
for accent in accents:
# Recolor colloid wrt our selection like mocha. latte
recolor(ctp_colors[type], accent)
+ if recreate_assets:
+ recreate_xfwm4_assets(type)
theme_style: str = "light" if type == "latte" else "dark"
install_cmd: str = f"./install.sh -c {theme_style} -s {size} -n {name} -d {dest} -t {def_color_map[accent]}"
if tweaks:
diff --git a/scripts/patches.py b/scripts/patches.py
new file mode 100644
index 00000000..9ccf7d6c
--- /dev/null
+++ b/scripts/patches.py
@@ -0,0 +1,32 @@
+import os
+import shutil
+import subprocess
+
+from scripts.var import src_dir, repo_dir, work_dir
+
+def recreate_xfwm4_assets(flavour):
+ """
+ Recolors xfwm4 assets based on the flavour
+
+ Args:
+ flavour (Flavour): The flavour to recolor
+ """
+
+ # Delete assets that already exists and copy new assets file
+ folders = ["assets", "assets-Light"]
+ variants = ["", "-Normal"]
+ sizes = ["", "-hdpi", "-xhdpi"]
+ assets_folder = f"{src_dir}/assets/xfwm4"
+
+ for folder in folders:
+ for variant in variants:
+ for size in sizes:
+ shutil.rmtree(f"{assets_folder}/{folder}{variant}{size}", ignore_errors=True)
+
+
+ patched_asset = f"{repo_dir}/patches/xfwm4/{folder}-Catppuccin-{flavour}{variant}.svg"
+ shutil.copy(patched_asset, f"{assets_folder}/{folder}{variant}.svg")
+
+ os.chdir(assets_folder)
+ subprocess.call(f"{assets_folder}/render-assets.sh", shell=True) # Rebuild all assets
+ os.chdir(work_dir)
\ No newline at end of file