From 954647c0e3d787b9d6ccf1af96b6fc0ffc77e020 Mon Sep 17 00:00:00 2001 From: bratekarate Date: Mon, 2 Nov 2020 18:31:34 +0100 Subject: [PATCH] kill kunst after sxiv has been closed --- kunst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kunst b/kunst index d195387..f757b7a 100755 --- a/kunst +++ b/kunst @@ -229,7 +229,9 @@ main() { FIRST_RUN=false # Display the album art using sxiv - sxiv -g "$SIZE$POSITION" -b "$COVER" -N "Kunst" & + # If sxiv is closed, kill the script as well with the trap at the and of + # the script (see issue #48). + (sxiv -g "$SIZE$POSITION" -b "$COVER" -N "Kunst"; kill -USR1 0) & # Save the process ID so that we can kill # sxiv when the user exits the script @@ -251,4 +253,6 @@ main() { trap "" SIGTSTP trap pre_exit EXIT +trap 'exit 1' TERM HUP INT +trap 'exit 0' USR1 main