mirror of
https://github.com/dylanaraps/pywal.git
synced 2025-06-21 18:11:29 +02:00
colors: Reload i3 colors
This commit is contained in:
parent
f1e0cf771c
commit
59f058479a
12
wal
12
wal
@ -469,6 +469,15 @@ def export_xrdb(colors, export_file):
|
|||||||
subprocess.call(["xrdb", "-merge", export_file])
|
subprocess.call(["xrdb", "-merge", export_file])
|
||||||
|
|
||||||
|
|
||||||
|
def reload_i3():
|
||||||
|
"""Reload i3 colors."""
|
||||||
|
if shutil.which("i3-msg"):
|
||||||
|
subprocess.Popen(["i3-msg", "reload"],
|
||||||
|
stdout=subprocess.DEVNULL,
|
||||||
|
stderr=subprocess.DEVNULL,
|
||||||
|
preexec_fn=os.setpgrp)
|
||||||
|
|
||||||
|
|
||||||
def export_colors(colors):
|
def export_colors(colors):
|
||||||
"""Export colors in various formats."""
|
"""Export colors in various formats."""
|
||||||
save_colors(ColorType.plain, CACHE_DIR / "colors", "plain hex colors")
|
save_colors(ColorType.plain, CACHE_DIR / "colors", "plain hex colors")
|
||||||
@ -487,6 +496,9 @@ def export_colors(colors):
|
|||||||
export_emacs(colors)
|
export_emacs(colors)
|
||||||
export_xrdb(ColorType.xrdb, CACHE_DIR / "xcolors")
|
export_xrdb(ColorType.xrdb, CACHE_DIR / "xcolors")
|
||||||
|
|
||||||
|
# i3 colors.
|
||||||
|
reload_i3()
|
||||||
|
|
||||||
|
|
||||||
# }}}
|
# }}}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user