Kill sxiv on script exit
This commit is contained in:
parent
e7adfcdec9
commit
2829688fe3
6
kunst
6
kunst
|
@ -148,6 +148,9 @@ update_cover() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pre_exit() {
|
||||||
|
kill -9 $(cat /tmp/kunst.pid)
|
||||||
|
}
|
||||||
|
|
||||||
main() {
|
main() {
|
||||||
|
|
||||||
|
@ -176,6 +179,7 @@ main() {
|
||||||
|
|
||||||
# display the album art using sxiv
|
# display the album art using sxiv
|
||||||
sxiv -g $SIZE -b $COVER -N "Kunst" &
|
sxiv -g $SIZE -b $COVER -N "Kunst" &
|
||||||
|
echo $! >/tmp/kunst.pid
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# waiting for an event from mpd; play/pause/next/previous
|
# waiting for an event from mpd; play/pause/next/previous
|
||||||
|
@ -185,5 +189,5 @@ main() {
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
trap pre_exit EXIT
|
||||||
main
|
main
|
||||||
|
|
Loading…
Reference in New Issue