refactor desktop notification plugin