File: avoid.el.html
For those who are annoyed by the mouse pointer obscuring text, this mode moves the mouse pointer - either just a little out of the way, or all the way to the corner of the frame.
To use, type M-x mouse-avoidance-mode.
To set up permanently, put this in your .emacs:
(if (display-mouse-p) (mouse-avoidance-mode 'animate))
Other legitimate alternatives include
banish, exile, jump, cat-and-mouse, and proteus.
They do somewhat different things.
See the documentation for function mouse-avoidance-mode(var)/mouse-avoidance-mode(fun) for
details of the different modes.
For added silliness, make the animatee animate... put something similar to the following into your .emacs:
(if (eq window-system 'x)
(mouse-avoidance-set-pointer-shape
(seq-random-elt
(list x-pointer-man x-pointer-spider
x-pointer-gobbler x-pointer-gumby))))
For completely random pointer shape, replace the setq above with:
(setq x-pointer-shape (mouse-avoidance-random-shape))
Credits:
This code was helped by all those who contributed suggestions,
fixes, and additions
Joe Harrington (and his advisor), for the original inspiration.
Ken Manheimer, for dreaming up the Protean mode.
Richard Stallman, for the awful cat-and-mouse pun, among other things.
Mike Williams, Denis Howe, Bill Benedetto, Chris Moore, Don Morris,
Simon Marshall, and M.S. Ashton, for their feedback.
Defined variables (6)
mouse-avoidance-animation-delay | Delay between animation steps, in seconds. |
mouse-avoidance-banish-position | Position to which Mouse Avoidance mode ‘banish’ moves the mouse. |
mouse-avoidance-mode | Activate Mouse Avoidance mode. |
mouse-avoidance-nudge-dist | Average distance that mouse will be moved when approached by cursor. |
mouse-avoidance-nudge-var | Variability of ‘mouse-avoidance-nudge-dist’ (which see). |
mouse-avoidance-threshold | Mouse-pointer’s flight distance. |
Defined functions (10)
mouse-avoidance-banish-destination | () |
mouse-avoidance-banish-mouse | () |
mouse-avoidance-delta | (CUR DELTA DIST VAR MIN MAX) |
mouse-avoidance-mode | (&optional MODE) |
mouse-avoidance-nudge-mouse | () |
mouse-avoidance-point-position | () |
mouse-avoidance-random-shape | () |
mouse-avoidance-set-mouse-position | (POS) |
mouse-avoidance-set-pointer-shape | (SHAPE) |
mouse-avoidance-too-close-p | (MOUSE) |