Skip to content

GlazeWM is a tiling window manager for macOS and Windows inspired by i3wm.

feat: added method to WorkspaceService for getting a workspace by id

Lars5cbfdf4534d4
diff --git a/LarsWM.Core/Workspaces/WorkspaceService.cs b/LarsWM.Core/Workspaces/WorkspaceService.cs
index e970c0d6..5fbcf5cc 100644
--- a/LarsWM.Core/Workspaces/WorkspaceService.cs
+++ b/LarsWM.Core/Workspaces/WorkspaceService.cs
@@ -1,11 +1,16 @@
using System;
using System.Collections.Generic;
-using System.Text;
+using System.Linq;
namespace LarsWM.Core.Workspaces
{
class WorkspaceService
{
public List<Workspace> Workspaces { get; set; } = new List<Workspace>();
+
+ public Workspace GetWorkspaceById(Guid id)
+ {
+ return Workspaces.FirstOrDefault(m => m.Id == id);
+ }
}
}