On Linux, I used i3 which has a nice way to support multiple displays. The key combination Super+Shift+H moves a window to the left in the tree. Usually, this would just swap the window with one that is further left on the same display. But if the window is already left most on the display, it moves the window over to the next display on the left.
I would like to replicate this behavior with yabai because I've found myself not use my displays on the side as much when I manually have to think about which workspace to send a window to.
If the provided display selectors are not enough you can use the script mentioned in this issue: https://github.com/koekeishiya/yabai/issues/225
yabai -m display --focus west should do what you want based on the original question.Thank you! I assume the correct way to do what I'm trying will be this?
alt - h : yabai -m window --focus west || yabai -m display --focus west
alt - j : yabai -m window --focus south || yabai -m display --focus south
alt - k : yabai -m window --focus north || yabai -m display --focus north
alt - l : yabai -m window --focus east || yabai -m display --focus east
Looking at previous releases, it seems like you prepare one about every two weeks. Will #225 and #459 be included in the next release?
As far as focusing goes, yeah, that does seem correct to me.
I noticed that you also mentioned swapping windows in your original question, and that would be something like yabai -m window --swap west || yabai -m window --display west.
They'll be in the next release, yeah. If you don't mind running from the master branch, it is usually very stable, except for when I decide to make breaking changes, but you can just look at the changelog before updating to see what changes have been made.
I don't have a set schedule for when a new release is made. It mostly depends on what changes have been made and if I think some of them are important enough to get out before any additional major changes. I suppose it also depends on how much I think I will be working on the project in the upcoming days/weeks.
If there has been a reasonable amount of changes and I don't think I'll be doing too much in the near future, I usually do a release.
I've updated to the master branch --- this is a huge improvement!
I'm still running into an issue with moving windows across displays and am wondering if you can think of a solution to this. I'm using this skhd configuration:
alt + shift - h : yabai -m window --swap west || $(yabai -m window --display west; yabai -m display --focus west)
alt + shift - j : yabai -m window --swap south || $(yabai -m window --display south; yabai -m display --focus south)
alt + shift - k : yabai -m window --swap north || $(yabai -m window --display north; yabai -m display --focus north)
alt + shift - l : yabai -m window --swap east || $(yabai -m window --display east; yabai -m display --focus east)
The windows move as expected within a display and also move over to the nearest display when expected. However, when a window moves to the next display, it doesn't necessarily end up on the nearest side of that new display. Can you think of a way this might be possible?
@koekeishiya Can you think of a solution to this?
You can focus the new display first and then set the the insertion point by using yabai -m window last --insert east or query the active space of the target display, retrieve the window_id from last-window and use that to set the insertion point on that space.
Alternatively if you don't mind some jumping around, the absolute simplest way is to simply move the window, follow focus, and then just yabai -m window --warp last.
Thanks! Would last work here? When moving a window to the west screen, it should take the east edge of that screen. When moving to the east screen, it should take the west edge of that screen.
For _east_ you can use _first_ instead of _last_, but same strategy as mentioned previously.
Sent from my iPhone
On 24 Jun 2020, at 16:51, Danijar Hafner notifications@github.com wrote:

Thanks! Would last work here? When moving a window to the west screen, it should take the east edge of that screen. When moving to the east screen, it should take the west edge of that screen.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/koekeishiya/yabai/issues/526#issuecomment-648869424, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ABPDZV6WT4GNCRX5SHDEATTRYIHGVANCNFSM4NDOPLEQ.
Most helpful comment
I've updated to the master branch --- this is a huge improvement!
I'm still running into an issue with moving windows across displays and am wondering if you can think of a solution to this. I'm using this skhd configuration:
The windows move as expected within a display and also move over to the nearest display when expected. However, when a window moves to the next display, it doesn't necessarily end up on the nearest side of that new display. Can you think of a way this might be possible?