From 4645e78fa723eb1a4830b12338b074a27646e5eb Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 7 Aug 2021 16:54:47 +0530 Subject: [PATCH] Reload config in parent kitty when running the themes kitten --- kittens/themes/collection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/kittens/themes/collection.py b/kittens/themes/collection.py index 11bf34d76..46cbb4218 100644 --- a/kittens/themes/collection.py +++ b/kittens/themes/collection.py @@ -8,6 +8,7 @@ import json import os import re import shutil +import signal import tempfile import zipfile from contextlib import suppress @@ -257,6 +258,8 @@ class Theme: with open(confpath + '.bak', 'w') as f: f.write(raw) atomic_save(nraw.encode('utf-8'), confpath) + if 'KITTY_PID' in os.environ: + os.kill(int(os.environ['KITTY_PID']), signal.SIGUSR1) class Themes: