diff options
| author | Dylan Araps <dylan.araps@gmail.com> | 2018-01-08 19:00:30 +1100 |
|---|---|---|
| committer | Dylan Araps <dylan.araps@gmail.com> | 2018-01-08 19:00:30 +1100 |
| commit | 1d9925f45431198f5cda6e1e07f2f560ac3f983b (patch) | |
| tree | fef76212192c36702d95cf1c9ad10f09f315dbad /pywal | |
| parent | deffe200c5b664fd1b8c98c90d9e28e451eb136f (diff) | |
reload: Call oomox last.
Diffstat (limited to 'pywal')
| -rw-r--r-- | pywal/__main__.py | 4 | ||||
| -rw-r--r-- | pywal/reload.py | 8 |
2 files changed, 9 insertions, 3 deletions
diff --git a/pywal/__main__.py b/pywal/__main__.py index d9e43fc..978d5c9 100644 --- a/pywal/__main__.py +++ b/pywal/__main__.py @@ -143,6 +143,10 @@ def process_args(args): if args.o: util.disown([args.o]) + if not args.e: + reload.oomox() + reload.gtk() + def main(): """Main script function.""" diff --git a/pywal/reload.py b/pywal/reload.py index 31878f4..0724ea2 100644 --- a/pywal/reload.py +++ b/pywal/reload.py @@ -29,8 +29,8 @@ def xrdb(xrdb_files=None): subprocess.run(["xrdb", "-merge", "-nocpp", file]) -def gtk(): - """Move gtkrc files to the correct location.""" +def oomox(): + """Call oomox to generate a theme.""" oomox_file = os.path.join(CACHE_DIR, "colors-oomox") if shutil.which("oomox-cli"): @@ -38,6 +38,9 @@ def gtk(): subprocess.run(["oomox-cli", "-o", "wal", oomox_file], stdout=subprocess.DEVNULL) + +def gtk(): + """Reload GTK theme on the fly.""" # Here we call a Python 2 script to reload the GTK themes. # This is done because the Python 3 GTK/Gdk libraries don't # provide a way of doing this. @@ -81,7 +84,6 @@ def colors(cache_dir=CACHE_DIR): def env(xrdb_file=None): """Reload environment.""" xrdb(xrdb_file) - gtk() i3() sway() polybar() |
