[FEAT]: Handle multiple monitors being plugged / unplugged #136

Closed
opened 2026-01-05 14:48:30 +01:00 by adam · 2 comments
Owner

Originally created by @storvik on GitHub (Sep 4, 2022).

First of all, thank you for this amazing piece of software. It has helped a lot when trying to transition from Linux to Windows.

Is your feature request related to a problem? Please describe.
Often when I get back to my computer after taking a break all windows have moved to the main monitor. This is an issue in Windows where it disables the second monitor. When this happens it seems like windows that have moved are no longer handled by komorebi.

Describe the solution you'd like
One of these solutions would solve the problem:

  • Komorebi handles this automatically. Maybe by storing every window and position after each command and restoring after monitor is back.
  • Komorebic command to store every workspace with windows to file, and a corresponding load command. This way it's possible to have this run on screen lock and on login.

Not sure if any of the suggested solutions will work as it seems like komorebi does not handle windows that have moved. Usually I have to move windows around, minimize and maximize them etc in order to make komorebi take control of them again.

Originally created by @storvik on GitHub (Sep 4, 2022). First of all, thank you for this amazing piece of software. It has helped a lot when trying to transition from Linux to Windows. **Is your feature request related to a problem? Please describe.** Often when I get back to my computer after taking a break all windows have moved to the main monitor. This is an issue in Windows where it disables the second monitor. When this happens it seems like windows that have moved are no longer handled by komorebi. **Describe the solution you'd like** One of these solutions would solve the problem: - Komorebi handles this automatically. Maybe by storing every window and position after each command and restoring after monitor is back. - Komorebic command to store every workspace with windows to file, and a corresponding load command. This way it's possible to have this run on screen lock and on login. Not sure if any of the suggested solutions will work as it seems like komorebi does not handle windows that have moved. Usually I have to move windows around, minimize and maximize them etc in order to make komorebi take control of them again.
adam added the enhancement label 2026-01-05 14:48:30 +01:00
adam closed this issue 2026-01-05 14:48:30 +01:00
Author
Owner

@maxbane commented on GitHub (Oct 17, 2022):

Hey @storvik, you might be interested in my workaround here.

Edit: It doesn't handle restoring of window positions, but will at least prevent windows from becoming stranded and unmanaged by Komorebi. Maybe it would be possible to elaborate on my hack to save and restore layouts in response to WM_DISPLAYCHANGE events, getting closer to what you want.

@maxbane commented on GitHub (Oct 17, 2022): Hey @storvik, you might be interested in my workaround [here](https://github.com/LGUG2Z/komorebi/issues/267#issuecomment-1281296175). Edit: It doesn't handle restoring of window positions, but will at least prevent windows from becoming stranded and unmanaged by Komorebi. Maybe it would be possible to elaborate on my hack to save and restore layouts in response to `WM_DISPLAYCHANGE` events, getting closer to what you want.
Author
Owner

@LGUG2Z commented on GitHub (Jan 23, 2025):

This is now largely handled with display index preferences and state caching

@LGUG2Z commented on GitHub (Jan 23, 2025): This is now largely handled with display index preferences and state caching
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#136