Predict where the cursor is going based on speed and direction it is moving

Since I got an MacBook Air with its teeny tiny screen, I have been trying to work out the best way to get the most out of it. Hiding the menu bar is one of them, but the default delay and slow animation Apple provides in system prefs ("Automatically hide and show the menu bar") us super slow. Sometimes I just want to see the time or wifi status.

I saw something done before in js used on websites, where it predicts where the user is moving the mouse to based on the speed and direction they are moving. Tried to find examples

premonish (turn debug view on)

GitHub - cudbg/mpredict.js: A JavaScript library for realtime mouse position prediction (demo Title)

https://jsfiddle.net/pfyruc14/34/ (from example on javascript - Predicting mouse position - Stack Overflow)

I wouldn't want to trigger something just by moving up, but if i was obviously heading towards to top with speed, then trigger before i actually got there.

Not sure if this is possible with what Apple let you do, it would of course require constant monitoring of the mouse position and speed, so performance might get a hit.

Just a thought, could be useful (i certainly have two uses for it (i would hide the dock and show it faster than sleepy mac os) :slight_smile: