diff options
| author | Dylan Araps <[email protected]> | 2017-06-22 13:53:57 +1000 |
|---|---|---|
| committer | Dylan Araps <[email protected]> | 2017-06-22 13:53:57 +1000 |
| commit | 59f058479a6599dd95031514bdb579b234ed6a75 (patch) | |
| tree | 28e48ab200a11533f1de3396f5b00a31d4cd59f2 | |
| parent | Colors: Fix rofi export (diff) | |
| download | pywal-59f058479a6599dd95031514bdb579b234ed6a75.tar.xz pywal-59f058479a6599dd95031514bdb579b234ed6a75.zip | |
colors: Reload i3 colors
| -rwxr-xr-x | wal | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -469,6 +469,15 @@ def export_xrdb(colors, 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): """Export colors in various formats.""" save_colors(ColorType.plain, CACHE_DIR / "colors", "plain hex colors") @@ -487,6 +496,9 @@ def export_colors(colors): export_emacs(colors) export_xrdb(ColorType.xrdb, CACHE_DIR / "xcolors") + # i3 colors. + reload_i3() + # }}} |