-
-
Notifications
You must be signed in to change notification settings - Fork 655
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
Issue when focusing most recent window on a space #544
Comments
The recently focused window id is just a global storage, and is not stored per space, but the lookup is only performed in the active space. This means that if you are on space 1 and have window A and B opened, moving the focus from A to B, will make A the recent window. Focusing the recent window will try to lookup A by ID in the active space, and in this case it will find and focus it, and make B the recent window. If you now switch to space 2, A will become the recent window, and if you try to focus recent now it will fail, because A is not located in the currently active space. So I agree that this a bug. Now the question is if we want recent to be space specific or global. My initial implementation was for this to be a global thing, but I think maybe the most recent in a space itself is more valuable, since we already have recent as both a space and display selector already. Note also that the recent selector only works for managed windows, and will ignore any floating window. |
Is there a way to fix this with the tools available in version 2.4.3? If recent were to become space specific I'd need to upgrade to have that functionality, but I really don't want to lose window borders. |
I don't think this is possible to do without code changes. For what it's worth I ported the yabai border functionality (with feature parity) into a standalone application: https://github.com/koekeishiya/limelight |
Actually after thinking some more, I think the recent selector in yabai should work the way it does, but it should work across all spaces. macOS already does track the most recent focused within a space and will automatically focus that window when you activate said space. |
Oh, didn't know that. I just built Btw, after upgrading to version 3.0.2 I'm having problems starting yabai as a service with homebrew. Even after installing the new scripting addition, I get a I tried removing yabai from the accessibility options hoping I'd get prompted to grant access again, but that's not happening. Any advice?
It doesn't for me, after focusing a space I have to manually focus a window in that space. That's why I added |
I found out the reason for that is I have unchecked the option That's Apple fault's though, there's a difference between not switching to a space with windows open for the focused application, and not focusing the most recent window when switching spaces. |
You'd have to port the window rules system from yabai to limelight I guess.
Does it work if you run it directly from the terminal? Are there any crash logs (check Console.app > Crash Reports). Does brew work if you install the --head version? |
Installing from head worked, but I think I just needed to manually add the yabai binary in the accessibility apps.
Is there a way to fix this? I'd like to leave that checked, but without losing the ability to focus the most recent window when I switch to a different space. |
After the space switch has occurred, you can call yabai -m query --windows --space and grab the id of the first entry in the list and pass it to yabai -m window --focus <id here> to focus the most recently focused window in that space.
… On 30 May 2020, at 14:56, n0ibe ***@***.***> wrote:
Installing from head worked, but I think I just needed to manually add the yabai binary in the accessibility apps.
That's Apple fault's though, there's a difference between not switching to a space with windows open for the focused application, and not focusing the most recent window when switching spaces.
Is there a way to fix this? I'd like to leave that checked, but without losing the ability to focus the most recent window when I switch to a different space.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#544 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ABPDZVYY4EQSKNCRIJC34UDRUD7AHANCNFSM4NNPGMUQ>.
|
I'm sorry to reopen this issue, but I'm still struggling with focusing the most recent window on a space when switching spaces. It's quite a bit annoying having to manually focus a window (with I tried the solution you suggested in your last reply, i.e.
but it doesn't seem to work. Btw, I still have |
Note: fixed in #719 |
I have the following commands to create a new space and move there the focused window, and to focus a space:
I would expect
--focus recent
to focus the most recent window on a space, however sometimes that doesn't work. There are various situations where it doesn't work, but the simplest one that I've been able to reproduce is the following.Start with 3 windows on space 1 (the only space for now), then issue the command bind to
alt + cmd - n
to create a second space, move the window there, focus the space and focus the window.Now go back to space 1 with
alt - 1
, switch focus from one window to the other, then go back to space 2 withalt - 2
. I find that the window is space 2 is now not focused, and if I go back to space 1 the focus switches between the two windows.Am I using the wrong commands in the bindings or is this a bug? I'm on version 2.4.3.
The text was updated successfully, but these errors were encountered: