utility to listen for mouse events
avoid side effects changing a function param
handle mouse & resize events
ignore .swp files