Compare commits

...

3 Commits

Author SHA1 Message Date
Pranav
7c470654a7 workflow: recreate assets
Signed-off-by: Pranav <npv12@iitbbs.ac.in>
2023-03-26 17:03:39 +05:30
Pranav
50e9e0120b fix: script: do not fail if supplementing a theme name
fixes #76

Signed-off-by: Pranav <npv12@iitbbs.ac.in>
2023-03-26 16:55:15 +05:30
Pranav
f2b5321c23 fix: Do not generate assets for all types.
Signed-off-by: Pranav <npv12@iitbbs.ac.in>
2023-03-26 16:43:20 +05:30
3 changed files with 8 additions and 7 deletions

View File

@@ -23,7 +23,7 @@ jobs:
- name: Install colloid specific dependencies
run: sudo apt update && sudo apt install -y sassc inkscape optipng
- name: Generate themes
run: python ./install.py all -a all --zip -d $PWD/releases
run: python ./install.py all -a all --zip -d $PWD/releases --recreate-asset
- name: Add zips to release
uses: softprops/action-gh-release@v1
with:

View File

@@ -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")

View File

@@ -11,7 +11,7 @@ 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, recreate_assets = True) -> None:
name: str = theme_name, size: str = "standard", tweaks=[], zip = False, recreate_assets = False) -> None:
try:
os.makedirs(dest) # Create our destination directory
@@ -19,11 +19,12 @@ def create_theme(types: List[str], accents: List[str], dest: str, link: bool = F
pass
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)
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:
@@ -38,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()}"