From 0e0db43622f315106e9aa91ea86ff3d5edab51d7 Mon Sep 17 00:00:00 2001 From: Daniel Fichtinger Date: Tue, 22 Apr 2025 14:30:12 -0400 Subject: [PATCH] AutoYADM commit: 2025-04-22 14:30:12 --- .config/helix/scripts/typst-zathura.fish | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.config/helix/scripts/typst-zathura.fish b/.config/helix/scripts/typst-zathura.fish index 1e9fd186..b8e2299a 100755 --- a/.config/helix/scripts/typst-zathura.fish +++ b/.config/helix/scripts/typst-zathura.fish @@ -41,9 +41,16 @@ if test -z "$parent_pid" end echo $parent_pid +# opens zathura, watching for helix closing function zopen --wraps zathura - zathura "$argv[1]" &>/dev/null & - set zathura_pid $last_pid + begin + zathura "$argv[1]" &>/dev/null & + set zathura_pid $last_pid + notify-send "$zathura_pid" + inotifywait -qq -e delete_self /proc/$parent_pid + notify-send "Zathura killed" + kill $zathura_pid + end & end function find_pdf