feat(bar): make explicit monitor config optional

This commit makes the monitor configuration option for the komorebi-bar
optional, defaulting to index 0.
This commit is contained in:
LGUG2Z
2026-01-04 19:15:24 -08:00
parent 1219c3d118
commit 8805fafa99
5 changed files with 18 additions and 10 deletions
+3 -2
View File
@@ -99,8 +99,9 @@ impl RenderExt for &KomobarConfig {
icon_font_id.size *= icon_scale.unwrap_or(1.4).clamp(1.0, 2.0);
let monitor_idx = match &self.monitor {
MonitorConfigOrIndex::MonitorConfig(monitor_config) => monitor_config.index,
MonitorConfigOrIndex::Index(idx) => *idx,
Some(MonitorConfigOrIndex::MonitorConfig(monitor_config)) => monitor_config.index,
Some(MonitorConfigOrIndex::Index(idx)) => *idx,
None => 0,
};
// check if any of the alignments have a komorebi widget with the workspace set to show all icons