cycle through open windows on consecutive presses
fabiomcosta opened this issue · 1 comments
Hello, first of all, thank you very much for sharing your keyboard setup, this repo inspired me to customize my keyboard shortcuts in a way that I feel like I'm a lot more in control now and have the tooling to improve my workflow further on.
One thing that I adopted was the hyper key, using it to open applications.
But one thing that I noticed is that sometimes I would have Chrome open with more than 1 window, and in that case I wouldn't be able to focus the second window.
So I made some changes to the hyper function to focus the other app windows, when there are more on consecutive key presses.
For example, I have set "b" to open Google Chrome, so here is what happens:
- When I press hyper+b for the first time, Google Chrome opens, if it's not open, and focus on the last focused window if it was already opened
- pressing hyper+b when Google Chrome is already focused will focus on the next Google Chrome window
- and so on
If having this behavior is something that you and other folks think makes sense, I can try to create a pull request with those changes.
My hyper module is this one if anyone wants to just copy/paste that: https://github.com/fabiomcosta/keyboard/blob/73b22906b31dfc12cc834c382515e30c4450d0f5/hammerspoon/hyper.lua
👋 @fabiomcosta: Thanks for taking the time to share this customization.
It's awesome to see people building on top of this! ⚡
If having this behavior is something that you and other folks think makes sense, I can try to create a pull request with those changes.
I probably can't prioritize reviewing a contribution like this in the near-term, but I'm going to pay closer attention to how often I have to hit command+~ to cycle through an app's windows. If it's something that I notice myself doing regularly, I might try out this customization.
Thanks again for bringing this to my attention and for sharing it for others to see. 🙇