sbmpost / AutoRaise

AutoRaise (and focus) a window when hovering over it with the mouse
GNU General Public License v3.0
1.42k stars 60 forks source link

Is it possible... #211

Open samholmes opened 3 months ago

samholmes commented 3 months ago

Is it possible to focus only before some events:

1) when the user has lifted their finger from the trackpad for some amount of time? This way after using the trackpad the focus shifts to where the cursor remains. The delay is to account for finger shifting to new location while continuing cursor movement.

2) Just before a keyboard key is pressed. This way the key is registered to the new focused window before the key press is sent to the application.

3) Just before a click event. This way the click registers in the window without a second click required?

This would minimize accidental focus without impacting the perceived performance time of the auto-focus. Right now I have this setup:

delay=0
focusDelay=2
mouseStop=true
warpX=0.5
warpY=0.5

Which means that only when the mouse has stopped in place will the focus trigger. I think the delay 2 is some number of milliseconds that must pass before the focus happens as well. With this setup, there is a slight perceived delay before focus happens, which makes the tool feel less responsive then instantly focusing wherever the cursor is.

In order to improve perceived performance, it would be ideal to trigger focus at the difference event specified above. Are the possible though?

sbmpost commented 3 months ago

@samholmes

Hi there. I took some time to respond because I wanted to give this some extra thought.

In order to improve perceived performance, it would be ideal to trigger focus at the difference event specified above. Are the possible though?

These things may or may not be possible. However I intented AutoRaise to be an as simple as possible add-on to MacOS to make its UI workable. The code is already way more complicated then I ever thought it was going to be. Adding support for trackpad events alone is quite a hassle with gestures and all. Then there is the user experience. AutoRaise started out with just 2 configurable options. By now we have around 15.

All in all, I have to draw a line somewhere between what can be included and what not. For this particular feature, I feel the extra amount of code is probably not worth it. Thanks for reporting though. Your feedback is appreciated and actually is the reason the focus only option was implemented ;-)

samholmes commented 3 months ago

Perhaps it will be worthwhile for me to fork this project and begin making the changes in order to achieve what I'm looking to do. My goal is to make the tool simple as well, so doing away with a lot of configs which don't seem necessary for my purposes which is to make an opinionated version of AutoRaise. Would you be interested in supporting me in this effort on occasion?

sbmpost commented 3 months ago

@samholmes

Would you be interested in supporting me in this effort on occasion?

My time is quite limited these days (full time job, child) so I won't be able to give much support. But yes of course you can fork the project and implement these features. The beauty of open source ;-)