Merge pull request #13 from mateossh/fix-11

Kill sxiv on script exit
This commit is contained in:
Siddharth Dushantha 2019-03-05 06:12:14 +01:00 committed by GitHub
commit d30f0ffd78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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