mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: broken komorebic state
#366
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @CtByte on GitHub (May 7, 2024).
Describe the bug
After the computer is woken from sleep, the
komorebic statechanges (using a laptop with 2 monitors).To Reproduce
At the time of writing, I am running version
871a538of KomorebiSteps to reproduce the behavior:
Expected behavior
When running 'komorebic state' after waking the computer from sleep, it gives the same result even with multiple monitors.
Proposed short term solution
I proposed the enhancement #803, that could lessen the issue
Screenshots, Videos and Logs
I am using Zebar to visualize the issue. The buttons represent the workspaces on the 2 monitors (MONITOR5 and MONITOR6).
The state goes from having 2 monitors (MONITOR6, MONITOR5) to listing 3 monitors (MONITOR5, MONITOR6, MONITOR5), ending up in a broken state.
Initial state (before sleep)
Output of 'komorebic state'
Broken state (after sleep)
Output of 'komorebic state'
Operating System
komorebic checkOutputAdditional context
I would be forever grateful if my issue can be verified by others, perhaps for PC as well. There can be connection race issues when a laptop is used with 2 monitors. I can also make a few more tests at requests to narrow down the bug.
@CtByte commented on GitHub (May 7, 2024):
I think it is also noteworthy, that after the state is broken (waking from the first sleep), the state stays the same even after another sleep.
@LGUG2Z commented on GitHub (May 14, 2024):
f6c59c5dfcI think this should fix a fair few monitor issues, but the code is a mess
@CtByte commented on GitHub (May 14, 2024):
@LGUG2Z I appreciate the honesty :) I will put the code to the test
@CtByte commented on GitHub (May 14, 2024):
@LGUG2Z I am running the "wip" commit you link above.
I have a global offset in my config that does not seem to be respected the same way anymore. I use the
UltrawideVerticalStacklayout.Single window

2 windows

Stacked windows

What I would expect is to have the offset on the "single window" and the "Stacked window" as well. Can this be related to this change?
As for the bug with the state, I need to do more testing. I could see you've been very busy with Komorebi lately, thank you very much for your hard work!
@CtByte commented on GitHub (May 14, 2024):
The same is true when I use the monitor offset. The setting is only respected if there are multiple unstacked windows on the workspace.
@LGUG2Z commented on GitHub (May 14, 2024):
Can you share the values recorded in
komorebic stateforwork_area_offset(at the top level),work_area_offset(at the monitor level) andsingle_window_work_area_offset(at the monitor level) for each of these 3 situations in the screenshots?wip is also updated with much nicer code now :)
952bc13c29@CtByte commented on GitHub (May 14, 2024):
I built the 952bc13 commit and executed the
komorebic statein the 3 window configurations. I decided to include a bit more code just to be sure.The summary is basically that the top level setting is present and both monitor level settings are
nullin all 3.komorebic.json
single window
2 windows
Stacked monitors
As for the broken state, the new commit seems to be working better, but I need a bit more time to test it properly.
@CtByte commented on GitHub (May 14, 2024):
Also, when I set the monitor level
work_area_offsetin the config then it is present in the state on the monitor level, but it is only respected when there are multiple windows on the workspace (same as the top level setting).The
single_window_work_area_offsetis alwaysnull.@LGUG2Z commented on GitHub (May 14, 2024):
Okay I have just reproduced this 🤞 Time to dig...
@LGUG2Z commented on GitHub (May 15, 2024):
Fixed the offsets bug on master (and rebased to the monitor-madness branch)
@LGUG2Z commented on GitHub (May 15, 2024):
d364b00b15This commit is getting closer to the desired state for monitor connection and reconnection
display_index_preferencesis set@CtByte commented on GitHub (May 15, 2024):
Really like the fitting branch name. I can confirm that as of the d364b00 commit, the offset issue has been fixed.
I will put Komorebi through a few sleeps to check the state.
The last couple of days has been busy for you, like a big spring cleaning. Take good care of yourself, my friend (if I may) :)
@CtByte commented on GitHub (May 15, 2024):
I found a few things while running the d364b00 commit, would you prefer I open new issues linking to the monitor-madness branch? I think it would make sense to keep this issue "clean".
@LGUG2Z commented on GitHub (May 15, 2024):
Yeah please add them in a separate issue if they are unrelated to monitors jumping around in the state 🙏
@CtByte commented on GitHub (May 15, 2024):
The state is the same after sleep.
Thank you very much for fixing it. 🎉