Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delay in hs.window.filter #3709

Open
franzbu opened this issue Oct 24, 2024 · 3 comments
Open

delay in hs.window.filter #3709

franzbu opened this issue Oct 24, 2024 · 3 comments

Comments

@franzbu
Copy link

franzbu commented Oct 24, 2024

Due to Sequoia breaking Hammerspoon's dealing with macOS’s spaces, I have been developing an alternative (https://github.com/franzbu/EnhancedSpaces.spoon), in the process of which I have had to work around delays in hs.window.filter when reacting to event triggers.

In my short period of testing, I haven't encountered any issues when reducing the delay for ‘windowMoved’ from 0.5 to 0.01 seconds (local variable ‘WINDOWMOVED_DELAY’ in hs.window.filter). Can you think of reasons why this reduction should be avoided?

When using hs.window.switcher for cycling through the windows of the current mSpace, the filter-related delay of the switcher leads to an issue when cycling through the windows of the current mSpace right after switching over from another mSpace: as due to a delay the filter hasn't triggered the change yet, the switcher cycles through the windows of the previous mSpace. As a workaround, I have used hs.window.switcher’s ‘next’ and ‘previous’ methods for forwarding a table containing the windows I want to use the switcher for. How do you think about the general idea of adding the possibility of using window tables besides window filters to hs.window.switcher?

One last point: for implementing a substitute for macOS’s cmd-tab window switcher, it would be helpful if the hotkey cmd-tab could be overwritten. As other apps such as AltTab achieve this, maybe it can be done with Hammerspoon as well.

Thank you for your time.

@QuantumLibet
Copy link

This is great. Thank you.

That said - I wish you hadn't named it SpaceHammer, like the long-standing and well-respected Hammerspoon script named ... spacehammer by agzam. I agree that more knowledgable people could probably just fork it and rename it, but not me.

@franzbu
Copy link
Author

franzbu commented Oct 27, 2024

Thank you for your feedback; I've renamed it.

@QuantumLibet
Copy link

Thank you! This makes it so much easier for me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants