Skip to content

Keep windows attached to spaces as displays are disconnected and reconnected? #238

Answered by dominiklohmann
chandlerc asked this question in Q&A
Discussion options

You must be logged in to vote

@chandlerc Now that we have persistent display uuids (#346), this can actually be achieved semi-reliably with yabai.

For this to work, you need to manually persist the display uuid for all windows and spaces regularly (e.g., on some signals), and save this state whenever a display is removed (signal event=display_removed) in a file associated with the removed displays uuid.

Then, when a display is connected (signal event=display_added), look for the save state for the added displays uuid, restore all spaces on the the target display / move all windows to the display by their window id.

Fullscreen spaces will be especially hard to get right, and split-fullscreen spaces cannot be restored u…

Replies: 6 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by dominiklohmann
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants
Converted from issue

This discussion was converted from issue #238 on December 11, 2020 13:34.