Skip to content

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

refactor(domain): remove unused `Id` property from entities

Lars Bergerb6f1171f7c70
diff --git a/GlazeWM.Domain/Monitors/Monitor.cs b/GlazeWM.Domain/Monitors/Monitor.cs
index 724bbf9a..726f8167 100644
--- a/GlazeWM.Domain/Monitors/Monitor.cs
+++ b/GlazeWM.Domain/Monitors/Monitor.cs
@@ -2,21 +2,19 @@
using GlazeWM.Domain.Workspaces;
using GlazeWM.Infrastructure;
using Microsoft.Extensions.DependencyInjection;
-using System;
using System.Windows.Forms;
namespace GlazeWM.Domain.Monitors
{
public class Monitor : Container
{
- public Guid Id = Guid.NewGuid();
public string Name => Screen.DeviceName;
public override int Width => Screen.WorkingArea.Width;
public override int Height => Screen.WorkingArea.Height;
public override int X => Screen.WorkingArea.X;
public override int Y => Screen.WorkingArea.Y;
public bool IsPrimary => Screen.Primary;
- public Workspace DisplayedWorkspace; // Alternatively add IsDisplayed/IsVisible property to Workspace instance
+ public Workspace DisplayedWorkspace;
public Screen Screen { get; }
diff --git a/GlazeWM.Domain/UserConfigs/UserConfig.cs b/GlazeWM.Domain/UserConfigs/UserConfig.cs
index eeae3eb0..70a77800 100644
--- a/GlazeWM.Domain/UserConfigs/UserConfig.cs
+++ b/GlazeWM.Domain/UserConfigs/UserConfig.cs
@@ -1,12 +1,9 @@
-using System;
-using System.Collections.Generic;
+using System.Collections.Generic;
namespace GlazeWM.Domain.UserConfigs
{
public class UserConfig
{
- public Guid Id = Guid.NewGuid();
-
public string ModKey { get; set; } = "Alt";
public double ResizePercentage { get; set; } = 5;
diff --git a/GlazeWM.Domain/Windows/Window.cs b/GlazeWM.Domain/Windows/Window.cs
index d55ac58d..8035414f 100644
--- a/GlazeWM.Domain/Windows/Window.cs
+++ b/GlazeWM.Domain/Windows/Window.cs
@@ -10,7 +10,6 @@ namespace GlazeWM.Domain.Windows
{
public class Window : Container
{
- public Guid Id = Guid.NewGuid();
public IntPtr Hwnd { get; }
/// <summary>
diff --git a/GlazeWM.Domain/Workspaces/Workspace.cs b/GlazeWM.Domain/Workspaces/Workspace.cs
index 259e90e3..55d5f8ca 100644
--- a/GlazeWM.Domain/Workspaces/Workspace.cs
+++ b/GlazeWM.Domain/Workspaces/Workspace.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Windows.Documents;
using GlazeWM.Domain.Containers;
using GlazeWM.Domain.Monitors;
using GlazeWM.Domain.UserConfigs;
@@ -13,7 +12,6 @@ namespace GlazeWM.Domain.Workspaces
{
public class Workspace : SplitContainer
{
- public Guid Id = Guid.NewGuid();
public string Name { get; set; }
private UserConfigService _userConfigService =