mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: Monitor Index Preferences Issue #431
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 @fin3ss3g0d on GitHub (Jul 12, 2024).
Describe the bug
I noticed if I start
Komorebiusingkomorebic.exe start, stop it usingkomorebic.exe stop, then try to start it again usingkomorebic.exe startand I have set specific monitor index preferences in mykomorebi.jsonfile that it will not start again. Only when I remove themonitor_index_preferencessection from mykomorebi.jsonfile is it able to start again. If I want to use my custommonitor_index_preferencessection inkomorebi.jsonI have to sign out of my Windows desktop session and sign back in again (pretty inconvenient). When looking atProcess Hackerafter runningkomorebic.exe startthe second time, thekomorebic.exeprocess has a high CPU usage and appears to be stuck in a loop.To Reproduce
Steps to reproduce the behavior:
Described above.
Expected behavior
You should be able to issue the
komorebic.exe start/stopcommands multiple times within the same desktop session while havingmonitor_index_preferencesset in yourkomorebi.jsonfile.Screenshots and Videos

Displays layout:
Operating System
komorebic checkOutputAdditional context
Output of
komorebic.exe monitor-information:Contents of
komorebi.json:@LGUG2Z commented on GitHub (Jul 13, 2024):
Can you run
komorebi.exedirectly and share the log output?@LGUG2Z commented on GitHub (Jul 13, 2024):
Also
display_index_preferenceswill probably suit you better here as all of your monitors have unique IDs:Edit: updated this snippet to match the monitor IDs you posted
@fin3ss3g0d commented on GitHub (Jul 13, 2024):
But if I start/stop Komorebi I get a different unique ID each time for each monitor. I just ran monitor information again in the same desktop session as yesterday and now I am getting the following:
Also, I just stopped and started Komorebi again today with the same configuration file settings and as you can see from above all of my monitor rectangle information is the same, but Komorebi is now saying that monitor 3 is monitor 2? It randomly flipped the order, and I cannot get it to go back to normal or respect my configuration.
@LGUG2Z commented on GitHub (Jul 13, 2024):
The output of the monitor-info command is an unordered map - to see the actual ordering you need to inspect the order in the
monitorsarray output by the state command.Example using
jq:komorebic state | jq '.monitors.elements[].device_id'@LGUG2Z commented on GitHub (Jul 13, 2024):
From your first post:
From your second post:
The monitor IDs themselves are the same ^
@fin3ss3g0d commented on GitHub (Jul 13, 2024):
I understand the output of
komorebic.exe monitor-informationis unordered. I'm saying I used the same configuration mapped to each monitor rectangle and when I issuedkomorebic focus-monitor 2after stopping and starting Komorebi, it went to the monitor labeled 2 here when before it was going to the monitor labeled 3 which is the desired behavior. Which is confusing to me because it is mathematically impossible as I mapped everything with the rectangle data.I mapped my monitors in
komorebi.jsonby unique ID with adisplay_index_preferencessection previously, but the monitor order was changing similarly to what I am experiencing now above so I thought I was getting different unique IDs. I just signed out and signed back in again with the same exactmonitor_index_preferencessection and now everything is back to normal and monitor 3 is where it is supposed to be. There is definitely some issue going on and it happens only if you stop and start Komorebi at least once within the same desktop session. The first launch has consistently always respected my config and has been accurate.@fin3ss3g0d commented on GitHub (Jul 13, 2024):
Updates:
display_index_preferencesis now working and is much easier. The index issues I was receiving when using this in my config was probably due to me turning off that monitor. Thank you for this tip! Thank you for thestatecommand trick as well!komorebi.exethat it would log everything in the terminal. If I am unable to trigger the bug in the next couple of days, I will close this out. Then if I end up being able to trigger it later, I will just reopen this. Thanks again!@fin3ss3g0d commented on GitHub (Jul 13, 2024):
If you are able to trigger the monitor power off/on bug and you want to track it here we can leave this open. That's if you consider it a bug for this project.