mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-01-11 14:40:25 +01:00
[BUG]: closing and opening a window right after komorebi doesnt detect the new window #537
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 @jklasdjklasdc on GitHub (Dec 6, 2024).
Summary
if a window is closed and then a window is opened right after komorebi seems to be stuck working with the closing the window and misses the window open event
https://github.com/user-attachments/assets/c083b4e0-9578-4558-b30e-d0d7995e9c3d
Version Information
C:\Users\User>systeminfo | findstr /B /C:"OS Name" /B /C:"OS Version"
OS Name: Microsoft Windows 11 Home
OS Version: 10.0.22631 N/A Build 22631
C:\Users\User>d
'd' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\User>d:
D:>cd d:\programs\komerobi
d:\programs\komerobi>komorebic --version
komorebic 0.1.31
branch:master
commit_hash:40b32332
build_time:2024-12-01 00:59:06 +00:00
build_env:rustc 1.83.0 (90b35a623 2024-11-26),stable-x86_64-pc-windows-msvc
Komorebi Configuration
Hotkey Configuration
#Requires AutoHotkey v2.0.2
#SingleInstance Force
SetWorkingDir(A_ScriptDir)
#Include *i
#Include
#Include
try TraySetIcon(".\ico.ico")
#Include ./komorebic.lib.ahk
try FileDelete("lastStartup.txt")
ToolTip("komorebi loading...")
SetTimer(ToolTip.bind(""), -1000)
RunWait("cmd /c
"komorebic.exe stop --bar"", A_ScriptDir, "hide")Sleep(1000)
RunWait("cmd /c
"komorebic.exe start --bar --await-configuration > lastStartup.txt"", A_ScriptDir, "hide"); RunWait("cmd /c
"komorebic.exe start --bar --await-configuration > lastStartup.txt & start ./lastStartup.txt"", A_ScriptDir, "hide"); RunWait("cmd /c
"komorebic.exe stop --ahk --bar & komorebic.exe start & komorebic.exe start --bar"", A_ScriptDir, "hide"); RunWait("cmd /c
"komorebic.exe stop --ahk --bar & komorebic.exe start --bar --await-configuration"", A_ScriptDir, "hide"); RunWait("cmd /c
"komorebic.exe stop --ahk --bar & komorebic.exe start --bar --await-configuration --tcp-port 1554"", A_ScriptDir, "hide"); run("komorebi-bar.exe", A_ScriptDir, "hide")
Komorebic(cmd) {
RunWait(format("komorebic.exe {}", cmd), , "Hide")
}
; komorebic visible-windows
; komorebic state
; komorebic.exe stop --ahk --bar & komorebic.exe start --bar
+!^#q::{
RunWait("cmd /c
"komorebic.exe stop --bar"", A_ScriptDir, "hide")}
+!Q::{
Reload()
}
; RunWait("cmd /c
"komorebic clear-workspace-layout-rules 0 0"", A_WorkingDir, "hide"); RunWait("cmd /c
"komorebic clear-workspace-layout-rules 0 1"", A_WorkingDir, "hide"); RunWait("cmd /c
"komorebic clear-workspace-layout-rules 0 2"", A_WorkingDir, "hide"); RunWait("cmd /c
"komorebic clear-workspace-layout-rules 0 3"", A_WorkingDir, "hide")x; RunWait("cmd /c
"komorebic clear-workspace-layout-rules 0 4"", A_WorkingDir, "hide"); RunWait("cmd /c
"komorebic clear-workspace-layout-rules 0 5"", A_WorkingDir, "hide")WorkspaceCustomLayout(0, 0, "test1.json")
WorkspaceCustomLayout(0, 1, "test1.json")
WorkspaceCustomLayout(0, 2, "test1.json")
WorkspaceCustomLayout(0, 3, "test1.json")
WorkspaceCustomLayout(0, 4, "test1.json")
ActiveWindowBorderColour(255, 0, 150, "single")
ActiveWindowBorderColour(256, 165, 66, "stack")
ActiveWindowBorderColour(255, 51, 153, "monocle")
ActiveWindowBorderWidth(2)
; ContainerPadding(0, 0, 0)
; ContainerPadding(0, 1, 0)
; ContainerPadding(0, 2, 0)
; ContainerPadding(0, 3, 0)
; ContainerPadding(0, 4, 0)
CompleteConfiguration()
WinWait("komorebi-bar")
WinSetStyle("+E0x20", "komorebi-bar")
WinSetTransparent(200, "komorebi-bar")
WinMove(0, 0, A_ScreenWidth, 40, "ahk_exe komorebi-bar.exe")
; WinGetPos(&x, &y, &w, &h, "komorebi-bar")
; CoordMode("Mouse", "Screen")
; while 1 {
; MouseGetPos(&mx, &my)
; WinWaitActive("Program Manager ahk_exe explorer.exe")
; try WinMinimize("komorebi-bar")
; WinWaitNotActive("Program Manager ahk_exe explorer.exe")
; try WinRestore("komorebi-bar")
; ; if mx >= x && mx <= w - x && my >= y && my <= y + h {
; ; try WinHide("komorebi-bar")
; ; } else {
; ; try WinShow("komorebi-bar")
; ; }
; }
!F4::Komorebic("close")
; Focus windows
!j::Komorebic("focus left")
!k::Komorebic("focus down")
!i::Komorebic("focus up")
!l::Komorebic("focus right")
!+[::Komorebic("cycle-focus previous")
!+]::Komorebic("cycle-focus next")
; Move windows
!+j::Komorebic("move left")
!+k::Komorebic("move down")
!+i::Komorebic("move up")
!+l::Komorebic("move right")
; Stack windows
; !Left::Komorebic("stack left")
; !Down::Komorebic("stack down")
; !Up::Komorebic("stack up")
; !Right::Komorebic("stack right")
; !;::Komorebic("unstack")
![::Komorebic("cycle-stack previous")
!]::Komorebic("cycle-stack next")
; Resize
; !=::Komorebic("resize-axis horizontal increase")
; !-::Komorebic("resize-axis horizontal decrease")
; !+=::Komorebic("resize-axis vertical increase")
; !+_::Komorebic("resize-axis vertical decrease")
; Manipulate windows
+!Space::Komorebic("toggle-float")
+!Enter::Komorebic("toggle-monocle")
; Window manager options
!+z::Komorebic("retile")
!p::Komorebic("toggle-pause")
; Layouts
; !x::Komorebic("flip-layout horizontal")
; !y::Komorebic("flip-layout vertical")
; Workspaces
!a::Komorebic("focus-workspace 0")
!s::Komorebic("focus-workspace 1")
!d::Komorebic("focus-workspace 2")
!f::Komorebic("focus-workspace 3")
; !5::Komorebic("focus-workspace 4")
; !6::Komorebic("focus-workspace 5")
; !7::Komorebic("focus-workspace 6")
; !8::Komorebic("focus-workspace 7")
; ; Move windows across workspaces
!+a::Komorebic("move-to-workspace 0")
!+s::Komorebic("move-to-workspace 1")
!+d::Komorebic("move-to-workspace 2")
!+f::Komorebic("move-to-workspace 3")
; !+5::Komorebic("move-to-workspace 4")
; !+6::Komorebic("move-to-workspace 5")
; !+7::Komorebic("move-to-workspace 6")
; !+8::Komorebic("move-to-workspace 7")
Output of komorebic check
d:\programs\komerobi>komorebic check
KOMOREBI_CONFIG_HOME detected: D:\programs\komerobi
Looking for configuration files in D:\programs\komerobi
Found komorebi.json; this file can be passed to the start command with the --config flag
Found C:\Users\User.config\whkdrc; key bindings will be loaded from here when whkd is started, and you can start it automatically using the --whkd flag