[FEAT]: Focus HWND #352

Closed
opened 2026-01-05 14:49:57 +01:00 by adam · 1 comment
Owner

Originally created by @midrare on GitHub (Apr 24, 2024).

Is your feature request related to a problem? Please describe.
In AutoHotkey, focusing a window based on HWND doesn't work when the window is stacked or in another (not current) workspace.

Describe the solution you'd like
komorebic focus-hwnd 3113648 switches to the relevant workspace and automatically cycles the stack so that the window is visible.

Describe alternatives you've considered
A workaround is to run komorebic state, parse it, and switch workspace and cycle the stack, then activate it. But AutoHotkey is not designed for this sort of work (can't parse JSON, can't capture stdout). You can switch to e.g. Python, but this adds startup lag.

Additional context
There seems to be no command for switching to a specific index in a stack e.g. komorebic focus-stack-index 3.

Originally created by @midrare on GitHub (Apr 24, 2024). **Is your feature request related to a problem? Please describe.** In AutoHotkey, focusing a window based on HWND doesn't work when the window is stacked or in another (not current) workspace. **Describe the solution you'd like** `komorebic focus-hwnd 3113648` switches to the relevant workspace and automatically cycles the stack so that the window is visible. **Describe alternatives you've considered** A workaround is to run `komorebic state`, parse it, and switch workspace and cycle the stack, then activate it. But AutoHotkey is not designed for this sort of work (can't parse JSON, can't capture stdout). You can switch to e.g. Python, but this adds startup lag. **Additional context** There seems to be no command for switching to a specific index in a stack e.g. `komorebic focus-stack-index 3`.
adam added the enhancement label 2026-01-05 14:49:57 +01:00
adam closed this issue 2026-01-05 14:49:57 +01:00
Author
Owner

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

There is now komorebic eager-focus which will operate correctly on container stacks to bring the desired window to the front.

@LGUG2Z commented on GitHub (Jan 23, 2025): There is now `komorebic eager-focus` which will operate correctly on container stacks to bring the desired window to the front.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/komorebi#352