komorebi icon indicating copy to clipboard operation
komorebi copied to clipboard

[FEAT]: Handle multiple monitors being plugged / unplugged

Open storvik opened this issue 3 years ago • 1 comments

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.

storvik avatar Sep 04 '22 08:09 storvik

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 avatar Oct 17 '22 18:10 maxbane