added better battery support for rprompt