GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.
feat(domain): add `UserConfigService` method for getting a workspace config by name
Lars Berger15fd6ca943d6
diff --git a/GlazeWM.Domain/UserConfigs/UserConfigService.cs b/GlazeWM.Domain/UserConfigs/UserConfigService.csindex 840be99f..c2d4f7dc 100644--- a/GlazeWM.Domain/UserConfigs/UserConfigService.cs+++ b/GlazeWM.Domain/UserConfigs/UserConfigService.cs@@ -1,6 +1,7 @@using System;using System.Collections.Generic;using System.IO;+using System.Linq;namespace GlazeWM.Domain.UserConfigs{@@ -83,5 +84,12 @@ namespace GlazeWM.Domain.UserConfigsreturn windowRules;}++ public WorkspaceConfig GetWorkspaceConfigByName(string workspaceName)+ {+ return UserConfig.Workspaces.FirstOrDefault(+ (workspaceConfig) => workspaceConfig.Name == workspaceName+ );+ }}}