Skip to content
This repository has been archived by the owner on Jun 2, 2024. It is now read-only.

Commit

Permalink
feat: xfwm4 asset generation (#206)
Browse files Browse the repository at this point in the history
  • Loading branch information
nullishamy committed May 20, 2024
1 parent 44be6bb commit b508c0f
Show file tree
Hide file tree
Showing 21 changed files with 909 additions and 18,178 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ jobs:
run: sudo apt update && sudo apt install -y sassc inkscape optipng
- name: Generate themes
run: |
python patches/xfwm4/generate_assets.py
python ./build.py mocha --all-accents --zip -d $PWD/releases &&
python ./build.py macchiato --all-accents --zip -d $PWD/releases &&
python ./build.py frappe --all-accents --zip -d $PWD/releases &&
Expand Down
14 changes: 6 additions & 8 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -393,17 +393,16 @@ def make_assets(ctx: BuildContext):
f"{output_dir}/metacity-1/thumbnail.png",
)

# TODO: Make our own assets for this and patch them in with the patch system, then code it to be
# {src_dir}/assets/xfwm4/assets{light_suffix}-Catppuccin/
# where assets-Light-Catppuccin will have latte
# nad assets-Catppuccin will have mocha or something
for file in glob.glob(f"{SRC_DIR}/assets/xfwm4/assets{ctx.apply_suffix(IS_LIGHT)}/*.png"):
xfwm4_assets = f"{THIS_DIR}/patches/xfwm4/generated/assets-catppuccin-{ctx.flavor.identifier}"
for file in glob.glob(xfwm4_assets + '/*'):
shutil.copy(file, f"{output_dir}/xfwm4")

for file in glob.glob(f"{SRC_DIR}/assets/xfwm4/assets{ctx.apply_suffix(IS_LIGHT)}-hdpi/*.png"):
xfwm4_assets = xfwm4_assets + "-hdpi/*"
for file in glob.glob(xfwm4_assets):
shutil.copy(file, f"{output_dir}-hdpi/xfwm4")

for file in glob.glob(f"{SRC_DIR}/assets/xfwm4/assets{ctx.apply_suffix(IS_LIGHT)}-xhdpi/*.png"):
xfwm4_assets = xfwm4_assets + "-xhdpi/*"
for file in glob.glob(xfwm4_assets):
shutil.copy(file, f"{output_dir}-xhdpi/xfwm4")


Expand Down Expand Up @@ -491,7 +490,6 @@ def apply_colloid_patches():

logger.info("Patching finished.")


def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument(
Expand Down
2 changes: 2 additions & 0 deletions patches/xfwm4/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
generated/
patched/
Loading

0 comments on commit b508c0f

Please sign in to comment.