-
-
Notifications
You must be signed in to change notification settings - Fork 643
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
Directions appear relative to space rather than active window #301
Comments
also terminal.app has always tiled a bit weird (gaps at bottom and top), not sure if this is related |
This is happening because of the sizing issue with Terminal.app, yeah. The reason chunkwm didn't exhibit this behaviour is that it used the node region rather than the actual size of the window. I honestly don't remember the reason I made this change in yabai, but I did this specific change deliberately. I'll have to revisit this when I have time and see if I can recall why I made that decision. |
That's because it doesn't add padding around its content view, whose size always is a multiple of the cell size. iTerm2 has an option to add padding for smooth resizing.
I assume this is because yabai supports directional focus for floating windows. This should be quite easy to fix by taking the window center instead of the top left coordinate for this calculation. |
@koekeishiya Is this a viable solution? |
I did do that type of a calculation initially, but it does not exhibit the same behaviour. I preferred the way it currently works - might revisit this logic at some point to see if this can be resolved.. |
@ramblingenzyme posted in #225:
This directly relates to my post above:
|
Calculation using the center of the window does not work correctly, because of size constraints (tested this primarily with a combination Terminal, Finder and Kitty). I have however changed to using ordinary euclidean distance and it does seem to resolve the issue in an acceptable way. |
Thanks so much for this improvement and for yabai! Finally swapped from chunkwm yesterday and I did not think yabai would be as big an improvement as it is. Didn't realise how much of a performance impact chunkwm was having, and it was ruining plenty of my work days. |
@ramblingenzyme chunkwm was fairly slow to be honest. I wouldn't go as far as to say that yabai is fast by modern standards, but it is definitely less slow than most alternatives. Hopefully I'll find a decent profiler at some point that actually works. I'm sure there is a lot that could be sped up still. |
The time profiler in Instruments (bundled with Xcode) works quite well from my experience. It's by far the best on macOS. |
I'll try to give instruments another shot. Fairly certain I had issues when running yabai in it, that would cause AX features to not work properly and slow down the application, but I don't remember exactly which functionality I tried to use. What I really want is to instrument my code with performance counters that nest through function calls, showing the amount of cycles spent in each function through the graph, and the total accumulated cycles for the whole thing (for each function including their callee's). This would let me know how much the percentage of work of a certain path is taken up by which sub-functions, and since a lot of functions are called from multiple paths (event types in the case of yabai), I could get better information as to which functions are worth optimizing to increase performance as a whole. |
#562 for reference. |
To explain this further I have the following binds:
and a set of four windows on a single space like this:
Now if I select the bottom right window so it is active and press the keybind for focus west, it will not focus the window in the bottom left, it will focus the window in the top left, which is potentially "west" for the space but not "west" relative to the window I'm moving from, is this a regression or am I doing it wrong? (coming from chunkwm)
The text was updated successfully, but these errors were encountered: