exit window for battery

add exit code and change window for battery event