mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-18 23:56:37 +02:00
colors: Make the call to xrdb blocking
This commit is contained in:
parent
9c42c281d9
commit
f6a1a3964a
15
wal
15
wal
@ -94,12 +94,11 @@ def process_args(args):
|
|||||||
# -i
|
# -i
|
||||||
if args.i:
|
if args.i:
|
||||||
image = str(get_image(args.i))
|
image = str(get_image(args.i))
|
||||||
colors = get_colors(image)
|
|
||||||
|
|
||||||
# Set the wallpaper.
|
|
||||||
if not args.n:
|
if not args.n:
|
||||||
set_wallpaper(image)
|
set_wallpaper(image)
|
||||||
|
|
||||||
|
colors = get_colors(image)
|
||||||
return colors
|
return colors
|
||||||
|
|
||||||
|
|
||||||
@ -449,7 +448,7 @@ def export_xrdb(colors, export_file):
|
|||||||
save_colors(colors, export_file, "xrdb colors")
|
save_colors(colors, export_file, "xrdb colors")
|
||||||
|
|
||||||
# Merge the colors into the X db so new terminals use them.
|
# Merge the colors into the X db so new terminals use them.
|
||||||
subprocess.Popen(["xrdb", "-merge", export_file])
|
subprocess.call(["xrdb", "-merge", export_file])
|
||||||
|
|
||||||
|
|
||||||
def export_colors(colors):
|
def export_colors(colors):
|
||||||
@ -457,11 +456,6 @@ def export_colors(colors):
|
|||||||
export_plain(colors)
|
export_plain(colors)
|
||||||
save_colors(ColorType.shell, CACHE_DIR / "colors.sh", "shell variables")
|
save_colors(ColorType.shell, CACHE_DIR / "colors.sh", "shell variables")
|
||||||
|
|
||||||
# X based colors.
|
|
||||||
export_rofi(colors)
|
|
||||||
export_emacs(colors)
|
|
||||||
export_xrdb(ColorType.xrdb, CACHE_DIR / "xcolors")
|
|
||||||
|
|
||||||
# Web based colors.
|
# Web based colors.
|
||||||
ColorType.css.append("}\n")
|
ColorType.css.append("}\n")
|
||||||
save_colors(ColorType.css, CACHE_DIR / "colors.css", "css variables")
|
save_colors(ColorType.css, CACHE_DIR / "colors.css", "css variables")
|
||||||
@ -470,6 +464,11 @@ def export_colors(colors):
|
|||||||
# Text editor based colors.
|
# Text editor based colors.
|
||||||
save_colors(ColorType.putty, CACHE_DIR / "colors-putty.reg", "putty theme")
|
save_colors(ColorType.putty, CACHE_DIR / "colors-putty.reg", "putty theme")
|
||||||
|
|
||||||
|
# X based colors.
|
||||||
|
export_rofi(colors)
|
||||||
|
export_emacs(colors)
|
||||||
|
export_xrdb(ColorType.xrdb, CACHE_DIR / "xcolors")
|
||||||
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user