Skip to content

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

feat(domain): add `KeybindingConfig` getter for commands/bindings as lists

Lars Berger3e0cbc5db324
diff --git a/LarsWM.Domain/UserConfigs/KeybindingConfig.cs b/LarsWM.Domain/UserConfigs/KeybindingConfig.cs
index 57f38b0a..7070cf06 100644
--- a/LarsWM.Domain/UserConfigs/KeybindingConfig.cs
+++ b/LarsWM.Domain/UserConfigs/KeybindingConfig.cs
@@ -1,13 +1,21 @@
using System.Collections.Generic;
-using System.ComponentModel.DataAnnotations;
namespace LarsWM.Domain.UserConfigs
{
public class KeybindingConfig
{
- [Required]
- public string Command { get; set; }
- [Required]
+ public string Binding { get; set; }
+
public List<string> Bindings { get; set; }
+
+ public List<string> BindingList =>
+ Binding != null ? new List<string> { Binding } : Bindings;
+
+ public string Command { get; set; }
+
+ public List<string> Commands { get; set; }
+
+ public List<string> CommandList =>
+ Command != null ? new List<string> { Command } : Commands;
}
}