Skip to content

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

refactor: renamed LarsWM project to LarsWM.Core

Lars1e2450e12563
diff --git a/LarsWM/AppState.cs b/LarsWM.Core/AppState.cs
similarity index 95%
rename from LarsWM/AppState.cs
rename to LarsWM.Core/AppState.cs
index 81a9c79d..22226c55 100644
--- a/LarsWM/AppState.cs
+++ b/LarsWM.Core/AppState.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace LarsWM
+namespace LarsWM.Core
{
public class AppState
{
diff --git a/LarsWM/Common/Models/ICommand.cs b/LarsWM.Core/Common/Models/ICommand.cs
similarity index 77%
rename from LarsWM/Common/Models/ICommand.cs
rename to LarsWM.Core/Common/Models/ICommand.cs
index bb9c4d3a..41614b0f 100644
--- a/LarsWM/Common/Models/ICommand.cs
+++ b/LarsWM.Core/Common/Models/ICommand.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.Common.Models
+namespace LarsWM.Core.Common.Models
{
public interface ICommand<out TResult> { }
}
diff --git a/LarsWM/Common/Models/ICommandHandler.cs b/LarsWM.Core/Common/Models/ICommandHandler.cs
similarity index 85%
rename from LarsWM/Common/Models/ICommandHandler.cs
rename to LarsWM.Core/Common/Models/ICommandHandler.cs
index 5c209568..27a9c3fb 100644
--- a/LarsWM/Common/Models/ICommandHandler.cs
+++ b/LarsWM.Core/Common/Models/ICommandHandler.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.Common.Models
+namespace LarsWM.Core.Common.Models
{
public interface ICommandHandler<in TCommand, out TResult> where TCommand : ICommand<TResult>
{
diff --git a/LarsWM/Common/Models/IEvent.cs b/LarsWM.Core/Common/Models/IEvent.cs
similarity index 74%
rename from LarsWM/Common/Models/IEvent.cs
rename to LarsWM.Core/Common/Models/IEvent.cs
index 06fda863..9de004de 100644
--- a/LarsWM/Common/Models/IEvent.cs
+++ b/LarsWM.Core/Common/Models/IEvent.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.Common.Models
+namespace LarsWM.Core.Common.Models
{
public interface IEvent { }
}
diff --git a/LarsWM/Common/Models/IEventHandler.cs b/LarsWM.Core/Common/Models/IEventHandler.cs
similarity index 84%
rename from LarsWM/Common/Models/IEventHandler.cs
rename to LarsWM.Core/Common/Models/IEventHandler.cs
index 9fedd633..9e9732ea 100644
--- a/LarsWM/Common/Models/IEventHandler.cs
+++ b/LarsWM.Core/Common/Models/IEventHandler.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.Common.Models
+namespace LarsWM.Core.Common.Models
{
public interface IEventHandler<in TEvent> where TEvent : IEvent
{
diff --git a/LarsWM/Common/Models/MovementDirection.cs b/LarsWM.Core/Common/Models/MovementDirection.cs
similarity index 83%
rename from LarsWM/Common/Models/MovementDirection.cs
rename to LarsWM.Core/Common/Models/MovementDirection.cs
index ab15e5b7..850664b2 100644
--- a/LarsWM/Common/Models/MovementDirection.cs
+++ b/LarsWM.Core/Common/Models/MovementDirection.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.Common.Models
+namespace LarsWM.Core.Common.Models
{
public enum MovementDirection
{
diff --git a/LarsWM/Common/Models/SetWindowPosFlags.cs b/LarsWM.Core/Common/Models/SetWindowPosFlags.cs
similarity index 99%
rename from LarsWM/Common/Models/SetWindowPosFlags.cs
rename to LarsWM.Core/Common/Models/SetWindowPosFlags.cs
index 18709baa..a06dae22 100644
--- a/LarsWM/Common/Models/SetWindowPosFlags.cs
+++ b/LarsWM.Core/Common/Models/SetWindowPosFlags.cs
@@ -1,6 +1,6 @@
using System;
-namespace LarsWM.WindowsApi
+namespace LarsWM.Core.WindowsApi
{
/// <summary>
/// Window sizing and positioning flags
diff --git a/LarsWM/Common/Models/WindowLocation.cs b/LarsWM.Core/Common/Models/WindowLocation.cs
similarity index 93%
rename from LarsWM/Common/Models/WindowLocation.cs
rename to LarsWM.Core/Common/Models/WindowLocation.cs
index 68147383..c23329b0 100644
--- a/LarsWM/Common/Models/WindowLocation.cs
+++ b/LarsWM.Core/Common/Models/WindowLocation.cs
@@ -1,4 +1,4 @@
-namespace LarsWM
+namespace LarsWM.Core
{
public class WindowLocation
{
diff --git a/LarsWM/Common/Models/WindowRect.cs b/LarsWM.Core/Common/Models/WindowRect.cs
similarity index 94%
rename from LarsWM/Common/Models/WindowRect.cs
rename to LarsWM.Core/Common/Models/WindowRect.cs
index bf870897..c8f192ff 100644
--- a/LarsWM/Common/Models/WindowRect.cs
+++ b/LarsWM.Core/Common/Models/WindowRect.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.WindowsApi.DataTypes
+namespace LarsWM.Core.WindowsApi.DataTypes
{
public struct WindowRect
{
diff --git a/LarsWM/Common/Services/WindowsApiFacade.cs b/LarsWM.Core/Common/Services/WindowsApiFacade.cs
similarity index 96%
rename from LarsWM/Common/Services/WindowsApiFacade.cs
rename to LarsWM.Core/Common/Services/WindowsApiFacade.cs
index f6089fa0..ec3006eb 100644
--- a/LarsWM/Common/Services/WindowsApiFacade.cs
+++ b/LarsWM.Core/Common/Services/WindowsApiFacade.cs
@@ -4,11 +4,11 @@ using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
-using static LarsWM.WindowsApi.WindowsApiService;
-using static LarsWM.UserConfig.UserConfigService;
-using LarsWM.WindowsApi.DataTypes;
+using static LarsWM.Core.WindowsApi.WindowsApiService;
+using static LarsWM.Core.UserConfig.UserConfigService;
+using LarsWM.Core.WindowsApi.DataTypes;
-namespace LarsWM.WindowsApi
+namespace LarsWM.Core.WindowsApi
{
class WindowsApiFacade
{
diff --git a/LarsWM/Common/Services/WindowsApiService.cs b/LarsWM.Core/Common/Services/WindowsApiService.cs
similarity index 98%
rename from LarsWM/Common/Services/WindowsApiService.cs
rename to LarsWM.Core/Common/Services/WindowsApiService.cs
index 9c875cc2..e65117a0 100644
--- a/LarsWM/Common/Services/WindowsApiService.cs
+++ b/LarsWM.Core/Common/Services/WindowsApiService.cs
@@ -1,10 +1,10 @@
-using LarsWM.WindowsApi.DataTypes;
+using LarsWM.Core.WindowsApi.DataTypes;
using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;
-namespace LarsWM.WindowsApi
+namespace LarsWM.Core.WindowsApi
{
class WindowsApiService
{
diff --git a/LarsWM/LarsWM.csproj b/LarsWM.Core/LarsWM.Core.csproj
similarity index 85%
rename from LarsWM/LarsWM.csproj
rename to LarsWM.Core/LarsWM.Core.csproj
index 401c148c..9b34636b 100644
--- a/LarsWM/LarsWM.csproj
+++ b/LarsWM.Core/LarsWM.Core.csproj
@@ -1,16 +1,20 @@
-<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
-
- <PropertyGroup>
- <OutputType>WinExe</OutputType>
- <TargetFramework>netcoreapp3.1</TargetFramework>
- <UseWindowsForms>true</UseWindowsForms>
- <ApplicationIcon />
- <StartupObject />
- </PropertyGroup>
-
- <ItemGroup>
- <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.1" />
- <PackageReference Include="System.Reactive" Version="4.3.2" />
- </ItemGroup>
-
-</Project>
+<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
+
+ <PropertyGroup>
+ <OutputType>WinExe</OutputType>
+ <TargetFramework>netcoreapp3.1</TargetFramework>
+ <UseWindowsForms>true</UseWindowsForms>
+ <ApplicationIcon />
+ <StartupObject />
+ </PropertyGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="3.1.1" />
+ <PackageReference Include="System.Reactive" Version="4.3.2" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <Folder Include="Monitors\CommandHandlers\" />
+ </ItemGroup>
+
+</Project>
diff --git a/LarsWM/LayoutService.cs b/LarsWM.Core/LayoutService.cs
similarity index 97%
rename from LarsWM/LayoutService.cs
rename to LarsWM.Core/LayoutService.cs
index 4e868069..bf39932d 100644
--- a/LarsWM/LayoutService.cs
+++ b/LarsWM.Core/LayoutService.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
-namespace LarsWM
+namespace LarsWM.Core
{
class LayoutService
{
diff --git a/LarsWM/Monitors/Commands/AddMonitorCommand.cs b/LarsWM.Core/Monitors/Commands/AddMonitorCommand.cs
similarity index 63%
rename from LarsWM/Monitors/Commands/AddMonitorCommand.cs
rename to LarsWM.Core/Monitors/Commands/AddMonitorCommand.cs
index 0ded0da1..2b8e360e 100644
--- a/LarsWM/Monitors/Commands/AddMonitorCommand.cs
+++ b/LarsWM.Core/Monitors/Commands/AddMonitorCommand.cs
@@ -1,9 +1,9 @@
-using LarsWM.Common.Models;
+using LarsWM.Core.Common.Models;
using System;
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.Monitors.Commands
+namespace LarsWM.Core.Monitors.Commands
{
class AddMonitorCommand : ICommand<Monitor>
{
diff --git a/LarsWM/Monitors/EventHandlers/MonitorAddedHandler.cs b/LarsWM.Core/Monitors/EventHandlers/MonitorAddedHandler.cs
similarity index 88%
rename from LarsWM/Monitors/EventHandlers/MonitorAddedHandler.cs
rename to LarsWM.Core/Monitors/EventHandlers/MonitorAddedHandler.cs
index bb1c6323..a763e00f 100644
--- a/LarsWM/Monitors/EventHandlers/MonitorAddedHandler.cs
+++ b/LarsWM.Core/Monitors/EventHandlers/MonitorAddedHandler.cs
@@ -1,10 +1,10 @@
-using LarsWM.Common.Models;
-using LarsWM.Monitors.Events;
+using LarsWM.Core.Common.Models;
+using LarsWM.Core.Monitors.Events;
using System;
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.Monitors.EventHandler
+namespace LarsWM.Core.Monitors.EventHandler
{
class MonitorAddedHandler : IEventHandler<MonitorAddedEvent>
{
diff --git a/LarsWM/Monitors/Events/MonitorAddedEvent.cs b/LarsWM.Core/Monitors/Events/MonitorAddedEvent.cs
similarity index 62%
rename from LarsWM/Monitors/Events/MonitorAddedEvent.cs
rename to LarsWM.Core/Monitors/Events/MonitorAddedEvent.cs
index eaf170ae..bfbad315 100644
--- a/LarsWM/Monitors/Events/MonitorAddedEvent.cs
+++ b/LarsWM.Core/Monitors/Events/MonitorAddedEvent.cs
@@ -1,9 +1,9 @@
-using LarsWM.Common.Models;
+using LarsWM.Core.Common.Models;
using System;
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.Monitors.Events
+namespace LarsWM.Core.Monitors.Events
{
class MonitorAddedEvent : IEvent
{
diff --git a/LarsWM/Monitors/Events/NewMonitorDetectedEvent.cs b/LarsWM.Core/Monitors/Events/NewMonitorDetectedEvent.cs
similarity index 63%
rename from LarsWM/Monitors/Events/NewMonitorDetectedEvent.cs
rename to LarsWM.Core/Monitors/Events/NewMonitorDetectedEvent.cs
index f15eed1f..61542645 100644
--- a/LarsWM/Monitors/Events/NewMonitorDetectedEvent.cs
+++ b/LarsWM.Core/Monitors/Events/NewMonitorDetectedEvent.cs
@@ -1,9 +1,9 @@
-using LarsWM.Common.Models;
+using LarsWM.Core.Common.Models;
using System;
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.Monitors.Events
+namespace LarsWM.Core.Monitors.Events
{
class NewMonitorDetectedEvent : IEvent
{
diff --git a/LarsWM/Monitors/Monitor.cs b/LarsWM.Core/Monitors/Monitor.cs
similarity index 97%
rename from LarsWM/Monitors/Monitor.cs
rename to LarsWM.Core/Monitors/Monitor.cs
index cf421fab..9f0d3430 100644
--- a/LarsWM/Monitors/Monitor.cs
+++ b/LarsWM.Core/Monitors/Monitor.cs
@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;
-namespace LarsWM
+namespace LarsWM.Core
{
public class Monitor
{
diff --git a/LarsWM/Program.cs b/LarsWM.Core/Program.cs
similarity index 93%
rename from LarsWM/Program.cs
rename to LarsWM.Core/Program.cs
index 9f8e1eb9..fa0d07c0 100644
--- a/LarsWM/Program.cs
+++ b/LarsWM.Core/Program.cs
@@ -1,28 +1,28 @@
-using System;
-using System.Diagnostics;
-using System.Runtime.InteropServices;
-using System.Windows.Forms;
-
-namespace LarsWM
-{
- class Program
- {
- /// <summary>
- /// The main entry point for the application.
- /// </summary>
- [STAThread]
- static void Main()
- {
- Debug.WriteLine("Application started");
-
- //Application.Run();
-
- new Startup();
-
- // TODO: Read config file and initialise UserConfig class with its values
- // TODO: Register windows hooks
- // TODO: Create a workspace and assign a workspace to each connected display
- // TODO: Force initial layout
- }
- }
-}
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using System.Windows.Forms;
+
+namespace LarsWM.Core
+{
+ class Program
+ {
+ /// <summary>
+ /// The main entry point for the application.
+ /// </summary>
+ [STAThread]
+ static void Main()
+ {
+ Debug.WriteLine("Application started");
+
+ //Application.Run();
+
+ new Startup();
+
+ // TODO: Read config file and initialise UserConfig class with its values
+ // TODO: Register windows hooks
+ // TODO: Create a workspace and assign a workspace to each connected display
+ // TODO: Force initial layout
+ }
+ }
+}
diff --git a/LarsWM/Startup.cs b/LarsWM.Core/Startup.cs
similarity index 96%
rename from LarsWM/Startup.cs
rename to LarsWM.Core/Startup.cs
index c5f35a85..1e552611 100644
--- a/LarsWM/Startup.cs
+++ b/LarsWM.Core/Startup.cs
@@ -4,12 +4,11 @@ using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Windows.Forms;
-using static LarsWM.WindowsApi.WindowsApiService;
-using static LarsWM.WindowsApi.WindowsApiFacade;
+using static LarsWM.Core.WindowsApi.WindowsApiService;
+using static LarsWM.Core.WindowsApi.WindowsApiFacade;
-namespace LarsWM
+namespace LarsWM.Core
{
-
class Startup
{
private IBus _bus;
diff --git a/LarsWM/UserConfigs/Commands/GetUserConfigCommand.cs b/LarsWM.Core/UserConfigs/Commands/GetUserConfigCommand.cs
similarity index 74%
rename from LarsWM/UserConfigs/Commands/GetUserConfigCommand.cs
rename to LarsWM.Core/UserConfigs/Commands/GetUserConfigCommand.cs
index 6532945b..ab824b94 100644
--- a/LarsWM/UserConfigs/Commands/GetUserConfigCommand.cs
+++ b/LarsWM.Core/UserConfigs/Commands/GetUserConfigCommand.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.UserConfig.Commands
+namespace LarsWM.Core.UserConfig.Commands
{
public class GetUserConfigCommand
{
diff --git a/LarsWM/UserConfigs/SampleUserConfig.json b/LarsWM.Core/UserConfigs/SampleUserConfig.json
similarity index 100%
rename from LarsWM/UserConfigs/SampleUserConfig.json
rename to LarsWM.Core/UserConfigs/SampleUserConfig.json
diff --git a/LarsWM/UserConfigs/UserConfig.cs b/LarsWM.Core/UserConfigs/UserConfig.cs
similarity index 90%
rename from LarsWM/UserConfigs/UserConfig.cs
rename to LarsWM.Core/UserConfigs/UserConfig.cs
index 7c50aa00..f99e58a9 100644
--- a/LarsWM/UserConfigs/UserConfig.cs
+++ b/LarsWM.Core/UserConfigs/UserConfig.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.UserConfigs
+namespace LarsWM.Core.UserConfigs
{
class UserConfig
{
diff --git a/LarsWM/UserConfigs/UserConfigService.cs b/LarsWM.Core/UserConfigs/UserConfigService.cs
similarity index 98%
rename from LarsWM/UserConfigs/UserConfigService.cs
rename to LarsWM.Core/UserConfigs/UserConfigService.cs
index 828f9fb3..db34178a 100644
--- a/LarsWM/UserConfigs/UserConfigService.cs
+++ b/LarsWM.Core/UserConfigs/UserConfigService.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM.UserConfig
+namespace LarsWM.Core.UserConfig
{
public class UserConfigService
{
diff --git a/LarsWM/Windows/Window.cs b/LarsWM.Core/Windows/Window.cs
similarity index 92%
rename from LarsWM/Windows/Window.cs
rename to LarsWM.Core/Windows/Window.cs
index cc69df86..6508fcb4 100644
--- a/LarsWM/Windows/Window.cs
+++ b/LarsWM.Core/Windows/Window.cs
@@ -1,11 +1,11 @@
-using LarsWM.WindowsApi.DataTypes;
+using LarsWM.Core.WindowsApi.DataTypes;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text;
-using static LarsWM.WindowsApi.WindowsApiFacade;
+using static LarsWM.Core.WindowsApi.WindowsApiFacade;
-namespace LarsWM
+namespace LarsWM.Core
{
public class Window
{
diff --git a/LarsWM/Workspaces/Workspace.cs b/LarsWM.Core/Workspaces/Workspace.cs
similarity index 95%
rename from LarsWM/Workspaces/Workspace.cs
rename to LarsWM.Core/Workspaces/Workspace.cs
index 65078a83..9ff165a6 100644
--- a/LarsWM/Workspaces/Workspace.cs
+++ b/LarsWM.Core/Workspaces/Workspace.cs
@@ -2,7 +2,7 @@
using System.Collections.Generic;
using System.Text;
-namespace LarsWM
+namespace LarsWM.Core
{
public class Workspace
{
diff --git a/LarsWM.sln b/LarsWM.sln
index 6bb5433b..e41967e4 100644
--- a/LarsWM.sln
+++ b/LarsWM.sln
@@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29613.14
MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LarsWM", "LarsWM\LarsWM.csproj", "{D7741551-9A1D-4357-9571-991C6FDB1906}"
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "LarsWM.Core", "LarsWM.Core\LarsWM.Core.csproj", "{D7741551-9A1D-4357-9571-991C6FDB1906}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution