Skip to content

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

feat(domain): create `WindowRuleConfig` class; add list of window rules to `UserConfig`

Lars Berger0a59b01f8f88
diff --git a/LarsWM.Domain/UserConfigs/UserConfig.cs b/LarsWM.Domain/UserConfigs/UserConfig.cs
index 95f7f232..4d518e0d 100644
--- a/LarsWM.Domain/UserConfigs/UserConfig.cs
+++ b/LarsWM.Domain/UserConfigs/UserConfig.cs
@@ -14,7 +14,7 @@ namespace LarsWM.Domain.UserConfigs
"Shell_TrayWnd",
// Trays on secondary screens.
"Shell_SecondaryTrayWnd",
- // ??
+ // Task manager.
"TaskManagerWindow",
// Microsoft Text Framework service IME.
"MSCTFIME UI",
@@ -22,11 +22,11 @@ namespace LarsWM.Domain.UserConfigs
"SHELLDLL_DefView",
// Background for lock screen.
"LockScreenBackstopFrame",
- // ??
+ // Windows 10 shell.
"Progman",
// Windows 7 open Start Menu.
"DV2ControlHost",
- // Some Windows 8 thing.
+ // Windows 8 charm bar.
"Shell_CharmWindow",
/*
@@ -60,7 +60,9 @@ namespace LarsWM.Domain.UserConfigs
public BarConfig Bar { get; set; }
- public List<WorkspaceConfig> Workspaces { get; set; }
+ public List<WorkspaceConfig> Workspaces = new List<WorkspaceConfig>();
+
+ public List<WindowRuleConfig> WindowRules = new List<WindowRuleConfig>();
public List<KeybindingConfig> Keybindings = new List<KeybindingConfig>();
}
diff --git a/LarsWM.Domain/UserConfigs/WindowRuleConfig.cs b/LarsWM.Domain/UserConfigs/WindowRuleConfig.cs
new file mode 100644
index 00000000..86ad690e
--- /dev/null
+++ b/LarsWM.Domain/UserConfigs/WindowRuleConfig.cs
@@ -0,0 +1,17 @@
+using System;
+using System.ComponentModel.DataAnnotations;
+
+namespace LarsWM.Domain.UserConfigs
+{
+ public class WindowRuleConfig
+ {
+ public string MatchProcessName { get; set; } = String.Empty;
+
+ public string MatchClassName { get; set; } = String.Empty;
+
+ public string MatchTitle { get; set; } = String.Empty;
+
+ [Required]
+ public string Action { get; set; }
+ }
+}