diff --git a/komorebi/src/main.rs b/komorebi/src/main.rs index 695e6b83..81f6d5e0 100644 --- a/komorebi/src/main.rs +++ b/komorebi/src/main.rs @@ -386,14 +386,14 @@ fn main() -> Result<()> { let matched_procs: Vec<&Process> = system.processes_by_name("komorebi.exe").collect(); if matched_procs.len() > 1 { - let mut shim_is_active = false; + let mut len = matched_procs.len(); for proc in matched_procs { if proc.root().ends_with("shims") { - shim_is_active = true; + len -= 1; } } - if !shim_is_active { + if len > 1 { tracing::error!("komorebi.exe is already running, please exit the existing process before starting a new one"); std::process::exit(1); } diff --git a/komorebic.lib.sample.ahk b/komorebic.lib.sample.ahk index 56a7e3ed..f0466f14 100644 --- a/komorebic.lib.sample.ahk +++ b/komorebic.lib.sample.ahk @@ -188,8 +188,8 @@ WorkspaceCustomLayout(monitor, workspace, path) { Run, komorebic.exe workspace-custom-layout %monitor% %workspace% %path%, , Hide } -WorkspaceLayoutRule(monitor, workspace, at_container_count, default_layout) { - Run, komorebic.exe workspace-layout-rule %monitor% %workspace% %at_container_count% %default_layout%, , Hide +WorkspaceLayoutRule(monitor, workspace, at_container_count, layout) { + Run, komorebic.exe workspace-layout-rule %monitor% %workspace% %at_container_count% %layout%, , Hide } WorkspaceCustomLayoutRule(monitor, workspace, at_container_count, path) {