koekeishiya / yabai

A tiling window manager for macOS based on binary space partitioning
MIT License
24.18k stars 646 forks source link

Workspace numbers getting mixed when connecting/disconnecting external display. #1785

Closed OleksiiPylypcuk-cnic closed 9 months ago

OleksiiPylypcuk-cnic commented 1 year ago

I’m not sure if it is a bug.

I’m using yabai + skhd + sketchy bar as dock.

I have 19 workspaces configured SPACE_ICONS=("1." "2." "3." "4." "5." "6." "7." "8." "9." "10." "11." "12." "13." "14." "15." "16" "17" "18."** "19.»)

and frequently using external display with my MacBook.

By default, yabai placing workspaces 11-19 on the second display, when I’m connecting it. Which is exactly what I want.

But when I disconnect the external display - the windows numbers are getting mixed. The windows from WS11 jumps to WS1, and WS12 becomes WS11, WS13 becomes WS12 and so on. All programs that I have on WS12 appear on WS11 respectively.

So all my hotkeys leading the wrong direction. And if I plug external display back — they are going back, so windows from WS1 come back to WS11, from WS11 jumping to WS12 and so on.

This behaviour is unexpected, and as I just recently switch to yabai I’m not sure, where this is coming from and how to prevent windows from jumping around when I plug/unplug a display.

executionByFork commented 1 year ago

Having this issue on Monterery 12.6, without any external displays connected. It seems to happen randomly, possibly when I open or close windows, or swap workspaces. A workspace that used to be on WS2 might change to be WS5, and I have to search around for where that workspace lives now. This has been happening rather frequently, and seems more prominent the more windows I have open. It seems yabai is getting the order of the workspaces mixed up.

koekeishiya commented 9 months ago

This is a macOS thing.

System Preferences > Mission Control > "Automatically rearragange Spaces based on recent use".

OleksiiPylypcuk-cnic commented 9 months ago

This is a macOS thing.

System Preferences > Mission Control > "Automatically rearragange Spaces based on recent use".

No, this setting has nothing to do with the workspace numbers getting mixed. Disregarding it is on or off, when I plug or unplug an external display - all windows that are on 10 workspace and above losing their original number.

koekeishiya commented 9 months ago

It might not be that setting, but this is still a macOS thing. Yabai does not move your windows when you connect or disconnect a monitor.