Kill sxiv on script exit

This commit is contained in:
Mateusz Ż 2019-03-04 18:49:53 +00:00
parent e7adfcdec9
commit 2829688fe3
1 changed files with 5 additions and 1 deletions

6
kunst
View File

@ -148,6 +148,9 @@ update_cover() {
}
pre_exit() {
kill -9 $(cat /tmp/kunst.pid)
}
main() {
@ -176,6 +179,7 @@ main() {
# display the album art using sxiv
sxiv -g $SIZE -b $COVER -N "Kunst" &
echo $! >/tmp/kunst.pid
fi
# waiting for an event from mpd; play/pause/next/previous
@ -185,5 +189,5 @@ main() {
done
}
trap pre_exit EXIT
main