mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-26 04:21:22 +02:00
export: Export a custom font.
This commit is contained in:
parent
36e1c9d402
commit
4f76548907
@ -45,6 +45,10 @@ def get_args(args):
|
|||||||
arg.add_argument("-f", metavar="\"/path/to/colorscheme/file\"",
|
arg.add_argument("-f", metavar="\"/path/to/colorscheme/file\"",
|
||||||
help="Which colorscheme file to use.")
|
help="Which colorscheme file to use.")
|
||||||
|
|
||||||
|
arg.add_argument("--font", metavar="\"font-name\"",
|
||||||
|
help="Which font to use in export files. \
|
||||||
|
(Must follow \"fc-list : family\" format.")
|
||||||
|
|
||||||
arg.add_argument("-n", action="store_true",
|
arg.add_argument("-n", action="store_true",
|
||||||
help="Skip setting the wallpaper.")
|
help="Skip setting the wallpaper.")
|
||||||
|
|
||||||
@ -129,6 +133,7 @@ def process_args(args):
|
|||||||
if not args.n:
|
if not args.n:
|
||||||
wallpaper.change(colors_plain["wallpaper"])
|
wallpaper.change(colors_plain["wallpaper"])
|
||||||
|
|
||||||
|
colors_plain["font"] = args.font or "None"
|
||||||
export.every(colors_plain)
|
export.every(colors_plain)
|
||||||
|
|
||||||
if not args.e:
|
if not args.e:
|
||||||
|
@ -20,6 +20,7 @@ def flatten_colors(colors):
|
|||||||
"""Prepare colors to be exported.
|
"""Prepare colors to be exported.
|
||||||
Flatten dicts and convert colors to util.Color()"""
|
Flatten dicts and convert colors to util.Color()"""
|
||||||
all_colors = {"wallpaper": colors["wallpaper"],
|
all_colors = {"wallpaper": colors["wallpaper"],
|
||||||
|
"font": colors["font"],
|
||||||
**colors["special"],
|
**colors["special"],
|
||||||
**colors["colors"]}
|
**colors["colors"]}
|
||||||
return {k: util.Color(v) for k, v in all_colors.items()}
|
return {k: util.Color(v) for k, v in all_colors.items()}
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
{{
|
{{
|
||||||
"wallpaper": "{wallpaper}",
|
"wallpaper": "{wallpaper}",
|
||||||
|
"font": "{font}",
|
||||||
|
|
||||||
"special": {{
|
"special": {{
|
||||||
"background": "{background}",
|
"background": "{background}",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user