mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: Ignore window rule seemingly doesn't work as expected #621
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 @ThatAmuzak on GitHub (May 17, 2025).
Summary
tl;dr, setting an ignore rule to either title or path for "C:\WINDOWS\SYSTEM32\cmd.exe" doesn't seemingly stop the windows from resizing around a temporary headless window, despite setting kind to Path, id to "C:\WINDOWS\SYSTEM32\cmd.exe", and matching_strategy to Equals. The issue persists even if kind is set to Title.
Note: This is a low priority cosmetic issue and easy to ignore. Also I am relatively new to komorebi, not sure if I am doing something incorrect.
I'm using Vimtex with Sumatra, and the two way synctex requires a command on Sumatra's end as follows:
cmd /c start /min "" nvim --headless -c "VimtexInverseSearch %l '%f'"This effectively tells my editor to go to the position that I double click with my mouse at. However, it spawns a headless terminal for the same. This causes the window to temporarily resize.
After a few attempts to capture the data about this headless window (too lazy to set up a recurring script for this 😅)
Start-Sleep -Seconds 3; komorebic visible-windowsI received this
The offending window here is the third one on the dell monitor, with `"title": "C:\WINDOWS\SYSTEM32\cmd.exe".
I tried setting up a rule for it with
and also tried substituting Path with Title, but the momentary resizing effect continues to happen (I restarted komorebi after every change).
This is not specific to Sumatra PDF, as even if you swap horizontal, or swap the positions of the terminal and Sumatra, the column in which the next window is supposed to spawn always gets resized.
Please see the video recording below:
https://github.com/user-attachments/assets/98c4361f-5f7e-4dd8-bd3d-55b199190882
I'm not entirely sure if I have misunderstood how the ignore rules work, or if there is something else affecting Komorebi here that's not within the scope of this project. Any help would be appreciated, but it's also a small enough momentary issue that can be easily ignored.
Ps. Thank you for making this amazing software! It's genuinely one of the most satisfying workflow upgrades I've made in years!
Version Information
Windows Version:
OS Name: Microsoft Windows 11 Home
OS Version: 10.0.26100 N/A Build 26100
Komorebi Version:
komorebic 0.1.36
tag:v0.1.36
commit_hash:8ef1bcf2
build_time:2025-04-13 03:10:57 +00:00
build_env:rustc 1.86.0 (05f9846f8 2025-03-31),stable-x86_64-pc-windows-msvc
Komorebi Configuration
Hotkey Configuration
Output of komorebic check
@LGUG2Z commented on GitHub (May 17, 2025):
Imo this is a bug in Windows Terminal, check out these logs below:
When I launch
Command Promptfrom the start menu, it sendsObjectNameChangebefore sendingObjectShowto forcibly set the title to "Terminal", then, after theShowevent, the newly opened window is focused which triggers aSystemForegroundevent, and then there is finally anotherObjectNameChangewhen WT sets the title toCommand Prompt- I'm assuming that this "late rename" also happens with your later-reported title of "C:\WINDOWS\SYSTEM32\cmd.exe".This is generally not how Windows applications are supposed to behave - feel free to open a ticket on the WT tracker and share this information, maybe even backlink this ticket, but I'm going to close this for now because I don't see a way to hack around this (and we already have too many hacks in place for WT...) - ultimately this is (another) issue for the Trillion Dollar Company ™ and not for the independent solo developer.
@ThatAmuzak commented on GitHub (May 17, 2025):
Update: I think I may have solved it? Not sure if this is breaking something for the future.
Decided to properly log what's happening:
And in the output script, I get:
This matches with what you're seeing as well with the rename, so I simply tried
This stops the momentary resizing (although I see the temporary window flash of course, that's expected)
not sure if this is particularly dangerous or problematic? New powershell windows open and get placed properly and as expected. Let me know if this seems like a good fix or if there can some issues with this approach
@LGUG2Z commented on GitHub (May 17, 2025):
If it works it works 😅
Thanks for documenting this so that others can benefit if they have the same need in the future!