mirror of
https://github.com/dylanaraps/pywal.git
synced 2024-11-29 11:24:03 +01: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
|
||||
if args.i:
|
||||
image = str(get_image(args.i))
|
||||
colors = get_colors(image)
|
||||
|
||||
# Set the wallpaper.
|
||||
if not args.n:
|
||||
set_wallpaper(image)
|
||||
|
||||
colors = get_colors(image)
|
||||
return colors
|
||||
|
||||
|
||||
@ -449,7 +448,7 @@ def export_xrdb(colors, export_file):
|
||||
save_colors(colors, export_file, "xrdb colors")
|
||||
|
||||
# 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):
|
||||
@ -457,11 +456,6 @@ def export_colors(colors):
|
||||
export_plain(colors)
|
||||
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.
|
||||
ColorType.css.append("}\n")
|
||||
save_colors(ColorType.css, CACHE_DIR / "colors.css", "css variables")
|
||||
@ -470,6 +464,11 @@ def export_colors(colors):
|
||||
# Text editor based colors.
|
||||
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…
Reference in New Issue
Block a user