From 000ac0f6154f040eab27f73826b05a8f1dfd8814 Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 22 May 2025 16:32:59 +0200 Subject: [PATCH] kitty: Enable close_on_child_death MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Otherwise closing kitty takes forever on my system: > kitty -1 --instance-group no -o close_on_child_death=no & > kitty -1 --instance-group yes -o close_on_child_death=yes & > kitty_cmd="kitty -1 \ --wait-for-single-instance-window-close \ --instance-group" > zsh_cmd="zsh -ic exit" > hyperfine -N "$kitty_cmd no $zsh_cmd" \ "$kitty_cmd yes $zsh_cmd" \ "st -e $zsh_cmd" Benchmark 1: kitty -1 \ --wait-for-single-instance-window-close \ --instance-group no zsh -ic exit Time (mean ± σ): 5.543 s ± 0.023 s [User: 0.002 s, System: 0.005 s] Range (min … max): 5.486 s … 5.570 s 10 runs Benchmark 2: kitty -1 \ --wait-for-single-instance-window-close \ --instance-group yes zsh -ic exit Time (mean ± σ): 509.9 ms ± 29.4 ms [User: 1.0 ms, System: 2.2 ms] Range (min … max): 480.9 ms … 560.1 ms 10 runs Benchmark 3: st -e zsh -ic exit Time (mean ± σ): 475.0 ms ± 12.6 ms [User: 304.3 ms, System: 171.5 ms] Range (min … max): 455.6 ms … 495.7 ms 10 runs Summary st -e zsh -ic exit ran 1.07 ± 0.07 times faster than kitty -1 \ --wait-for-single-instance-window-close \ --instance-group yes zsh -ic exit 11.67 ± 0.31 times faster than kitty -1 \ --wait-for-single-instance-window-close \ --instance-group no zsh -ic exit Link: https://github.com/kovidgoyal/kitty/issues/378 TODO: Could the 500ms be decreased? (zsh related) --- .config/kitty/kitty.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/kitty/kitty.conf b/.config/kitty/kitty.conf index 5a03a41..21cdecc 100644 --- a/.config/kitty/kitty.conf +++ b/.config/kitty/kitty.conf @@ -1539,7 +1539,7 @@ background_opacity 0.5 #: kitty will cycle through various known editors (vim, emacs, etc.) #: and take the first one that exists on your system. -# close_on_child_death no +close_on_child_death yes #: Close the window when the child process (usually the shell) exits. #: With the default value no, the terminal will remain open when the