From aa19db9c46cc2ca5bcdae4200d3a364625fd7653 Mon Sep 17 00:00:00 2001 From: spolakh Date: Sat, 27 Mar 2021 23:50:04 +0300 Subject: [PATCH] Pass socket as an argument if reloading kitty from outside --- pywal/reload.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pywal/reload.py b/pywal/reload.py index 24106c7..929990f 100644 --- a/pywal/reload.py +++ b/pywal/reload.py @@ -57,12 +57,17 @@ def bspwm(): def kitty(): """ Reload kitty colors. """ if (shutil.which("kitty") - and util.get_pid("kitty") - and os.getenv('TERM') == 'xterm-kitty'): - subprocess.call([ - "kitty", "@", "set-colors", "--all", - os.path.join(CACHE_DIR, "colors-kitty.conf") - ]) + and util.get_pid("kitty")): + if os.getenv('TERM') == 'xterm-kitty': + subprocess.call([ + "kitty", "@", "set-colors", "--all", + os.path.join(CACHE_DIR, "colors-kitty.conf") + ]) + else: + subprocess.call([ + "kitty", "@", "--to", "unix:/tmp/kitty_pywal", "set-colors", "--all", + os.path.join(CACHE_DIR, "colors-kitty.conf") + ]) def polybar():