Hammerspoon / hammerspoon

Staggeringly powerful macOS desktop automation with Lua
http://www.hammerspoon.org
MIT License
11.86k stars 578 forks source link

hs.window.switcher slow showing switcher UI #1936

Open reestr opened 6 years ago

reestr commented 6 years ago

Hi - When using hs.window.switcher, even with a barebones configuration (below) I find it is very slow to list the switcher UI once triggered. I don't have an science in my measuring, but can feel it can take half a second or so to show available windows to switch to. Is there any way to speed it up so it is immediately reacting? I switch panes often and the latency is too much to bare.

I am using macbook pro 15 2017.

switcher = hs.window.switcher.new(hs.window.filter.new():setCurrentSpace(true):setDefaultFilter{})
switcher.ui.showTitles = true
switcher.ui.showThumbnails = false

hs.hotkey.bind('alt','tab','Next',function()switcher:next()end)
reestr commented 6 years ago

Since posting, I've been advised to set the following:

hs.window.animationDuration = 0

This brings a massive improvement, although its still not perfectly slick. Are there any other optimisations which can be made?

patrick-motard commented 3 years ago

I've noticed the same behavior. Takes almost two seconds for the initial 'Next Window' text to pop up, and another second after that for the menu that lists all of the applications that can be tabbed through. I am able to switch between apps quickly with the shortcut by not waiting for the UI to show up. However, being able to see the menu immediately would be much more usable.

patrick-motard commented 3 years ago

I should also note that hs.window.animationDuration = 0 makes no difference in my case. It only affects windows transitioning from one screen to another, window resizing, and window moving. Not tabbing through apps.

kimim commented 3 months ago

really slow to appear..