feat(bar): add opts to show all icons on workspace widget

This commit adds 3 new display options on the komorebi workspace widget
to show all icons.
This commit is contained in:
Csaba
2025-02-23 17:45:27 +01:00
committed by LGUG2Z
parent 3a208b577c
commit d69dfeb715
4 changed files with 247 additions and 86 deletions
+9
View File
@@ -125,6 +125,15 @@ impl KomobarConfig {
}
}
}
pub fn show_all_icons_on_komorebi_workspace(widgets: &[WidgetConfig]) -> bool {
widgets
.iter()
.any(|w| matches!(w, WidgetConfig::Komorebi(config) if config.workspaces.is_some_and(|w| w.enable && w.display.is_some_and(|s| matches!(s,
WorkspacesDisplayFormat::AllIcons
| WorkspacesDisplayFormat::AllIconsAndText
| WorkspacesDisplayFormat::AllIconsAndTextOnSelected)))))
}
}
#[derive(Clone, Debug, Serialize, Deserialize, JsonSchema)]