Open rmgpinto opened 1 month ago
Tried this on yabairc
but it doesn't work:
FIRST_WINDOW_ID=$(yabai -m query --spaces --space 4 | jq '."first-window"')
FIRST_WINDOW_NAME=$(yabai -m query --windows --window ${FIRST_WINDOW_ID} | jq -r '.app')
if [ "$FIRST_WINDOW_NAME" != "Mail" ]; then
yabai -m window ${FIRST_WINDOW_ID} --swap east
yabai -m space 1 --focus
fi
Sadly, yabai does not have a master layout. I am asking about it for two years. Someone made even a PR for it two years ago, with the needed code, still no luck. And scripting first/last window is highly unreliably as it is now.
But thanks! I just realized, by your script, that we have actually a window order when querying spaces! Was trying to script it with other methods. Update: which does not work reliably : )
I have a space with Mail (left window) and Calendar (right window) open. When I logout and tick
Reopen windows when logging in
sometimes the positions are swapped. Is there a way for yabai to put always Mail on the left and always Calendar on the right?