From 172988ed81f78531036207942810aafa539cd284 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 8 Nov 2024 12:28:50 -0800 Subject: [PATCH 1/2] fix(wm): apply ws cfgs only to declared ws indices This commit ensures that when attempting to reload the static configuration file after the user has imperatively created new workspaces, the configuration reload logic will not attempt to load a workspace config for those imperatively created workspaces. --- komorebi/src/static_config.rs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/komorebi/src/static_config.rs b/komorebi/src/static_config.rs index 43eeed20..0f48ae90 100644 --- a/komorebi/src/static_config.rs +++ b/komorebi/src/static_config.rs @@ -1106,12 +1106,9 @@ impl StaticConfig { ); for (j, ws) in m.workspaces_mut().iter_mut().enumerate() { - ws.load_static_config( - monitor - .workspaces - .get(j) - .expect("no static workspace config"), - )?; + if let Some(workspace_config) = monitor.workspaces.get(j) { + ws.load_static_config(workspace_config)?; + } } } @@ -1169,12 +1166,9 @@ impl StaticConfig { ); for (j, ws) in m.workspaces_mut().iter_mut().enumerate() { - ws.load_static_config( - monitor - .workspaces - .get(j) - .expect("no static workspace config"), - )?; + if let Some(workspace_config) = monitor.workspaces.get(j) { + ws.load_static_config(workspace_config)?; + } } } From fd8cd4bb01c321e07003397a1df66672b36aa7f1 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 8 Nov 2024 12:34:29 -0800 Subject: [PATCH 2/2] docs(github): add pull request template --- .github/pull_request_template.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 00000000..3cc88278 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,7 @@ +