copy from https://github.com/norio-nomura/usernotification