diff --git a/espanso-config/src/config/mod.rs b/espanso-config/src/config/mod.rs index c8c0208..5e0e16a 100644 --- a/espanso-config/src/config/mod.rs +++ b/espanso-config/src/config/mod.rs @@ -196,7 +196,7 @@ pub enum ToggleKey { LeftMeta, } -#[derive(Debug, Clone)] +#[derive(Debug, Clone, Default)] pub struct RMLVOConfig { pub rules: Option, pub model: Option, @@ -205,6 +205,20 @@ pub struct RMLVOConfig { pub options: Option, } +impl std::fmt::Display for RMLVOConfig { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + write!( + f, + "[R={}, M={}, L={}, V={}, O={}]", + self.rules.as_deref().unwrap_or_default(), + self.model.as_deref().unwrap_or_default(), + self.layout.as_deref().unwrap_or_default(), + self.variant.as_deref().unwrap_or_default(), + self.options.as_deref().unwrap_or_default(), + ) + } +} + pub fn load_store(config_dir: &Path) -> Result<(impl ConfigStore, Vec)> { store::DefaultConfigStore::load(config_dir) }