fix: allow all accents to be generated in 1 task
This commit is contained in:
46
build.py
46
build.py
@@ -562,6 +562,7 @@ def parse_args():
|
|||||||
"sapphire",
|
"sapphire",
|
||||||
"blue",
|
"blue",
|
||||||
"lavender",
|
"lavender",
|
||||||
|
"all"
|
||||||
],
|
],
|
||||||
help="Accent of the theme.",
|
help="Accent of the theme.",
|
||||||
)
|
)
|
||||||
@@ -597,13 +598,54 @@ def parse_args():
|
|||||||
|
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
args = parse_args()
|
args = parse_args()
|
||||||
|
|
||||||
apply_colloid_patches()
|
apply_colloid_patches()
|
||||||
|
|
||||||
palette = getattr(PALETTE, args.flavor)
|
palette = getattr(PALETTE, args.flavor)
|
||||||
|
accents=[
|
||||||
|
"rosewater",
|
||||||
|
"flamingo",
|
||||||
|
"pink",
|
||||||
|
"mauve",
|
||||||
|
"red",
|
||||||
|
"maroon",
|
||||||
|
"peach",
|
||||||
|
"yellow",
|
||||||
|
"green",
|
||||||
|
"teal",
|
||||||
|
"sky",
|
||||||
|
"sapphire",
|
||||||
|
"blue",
|
||||||
|
"lavender",
|
||||||
|
]
|
||||||
|
|
||||||
|
if args.accent == 'all':
|
||||||
|
for accent in accents:
|
||||||
|
accent = getattr(palette.colors, accent)
|
||||||
|
|
||||||
|
tweaks = Tweaks(tweaks=args.tweaks)
|
||||||
|
|
||||||
|
if args.zip:
|
||||||
|
output_format = 'zip'
|
||||||
|
else:
|
||||||
|
output_format = 'dir'
|
||||||
|
|
||||||
|
ctx = BuildContext(
|
||||||
|
build_root=args.dest,
|
||||||
|
theme_name=args.name,
|
||||||
|
flavor=palette,
|
||||||
|
accent=accent,
|
||||||
|
size=args.size,
|
||||||
|
tweaks=tweaks,
|
||||||
|
output_format=output_format
|
||||||
|
)
|
||||||
|
|
||||||
|
tweaks_temp()
|
||||||
|
gnome_shell_version()
|
||||||
|
build_theme(ctx)
|
||||||
|
logger.info("Done!")
|
||||||
|
else:
|
||||||
accent = getattr(palette.colors, args.accent)
|
accent = getattr(palette.colors, args.accent)
|
||||||
tweaks = Tweaks(tweaks=args.tweaks)
|
tweaks = Tweaks(tweaks=args.tweaks)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user