From f5a979d4b401076ab79c0c3be41369117a04ff35 Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Wed, 1 Oct 2025 13:55:42 -0700 Subject: [PATCH] fix(bar): calculate margin correctly --- komorebi-bar/src/bar.rs | 2 +- komorebi-bar/src/main.rs | 1 + komorebi-bar/src/widgets/date.rs | 2 +- komorebic/src/main.rs | 4 ++++ 4 files changed, 7 insertions(+), 2 deletions(-) diff --git a/komorebi-bar/src/bar.rs b/komorebi-bar/src/bar.rs index 30777e3d..a5649755 100644 --- a/komorebi-bar/src/bar.rs +++ b/komorebi-bar/src/bar.rs @@ -793,8 +793,8 @@ impl Komobar { pub fn position_bar(&self, ctx: &Context) { ctx.send_viewport_cmd(ViewportCommand::OuterPosition(Pos2::new( - self.size_rect.top as f32, self.size_rect.left as f32, + self.size_rect.top as f32, ))); ctx.send_viewport_cmd(ViewportCommand::InnerSize(Vec2::new( diff --git a/komorebi-bar/src/main.rs b/komorebi-bar/src/main.rs index 29a07c31..6ea376e8 100644 --- a/komorebi-bar/src/main.rs +++ b/komorebi-bar/src/main.rs @@ -247,6 +247,7 @@ fn main() -> eyre::Result<()> { let viewport_builder = ViewportBuilder::default() .with_decorations(false) .with_transparent(true) + .with_has_shadow(false) .with_taskbar(false); let native_options = eframe::NativeOptions { diff --git a/komorebi-bar/src/widgets/date.rs b/komorebi-bar/src/widgets/date.rs index 1922fd60..ddd80e9d 100644 --- a/komorebi-bar/src/widgets/date.rs +++ b/komorebi-bar/src/widgets/date.rs @@ -198,7 +198,7 @@ impl BarWidget for Date { let mut layout_job = LayoutJob::simple( match self.label_prefix { LabelPrefix::Icon | LabelPrefix::IconAndText => { - egui_phosphor::regular::CALENDAR_DOTS.to_string() + egui_phosphor::regular::CALENDAR.to_string() } LabelPrefix::None | LabelPrefix::Text => String::new(), }, diff --git a/komorebic/src/main.rs b/komorebic/src/main.rs index 39364751..20a23933 100644 --- a/komorebic/src/main.rs +++ b/komorebic/src/main.rs @@ -1254,6 +1254,8 @@ fn main() -> eyre::Result<()> { std::fs::create_dir_all(data_dir)?; let mut komorebi_json = include_str!("../../docs/komorebi.example.json").to_string(); + let komorebi_bar_json = + include_str!("../../docs/komorebi.bar.example.json").to_string(); if std::env::var("KOMOREBI_CONFIG_HOME").is_ok() { komorebi_json = @@ -1261,12 +1263,14 @@ fn main() -> eyre::Result<()> { } let komorebi_path = HOME_DIR.join("komorebi.json"); + let bar_path = HOME_DIR.join("komorebi.bar.json"); let applications_path = HOME_DIR.join("applications.json"); let skhdrc_path = HOME_DIR.join("skhdrc"); let mut written_files = Vec::new(); write_file_with_prompt(&komorebi_path, &komorebi_json, &mut written_files)?; + write_file_with_prompt(&bar_path, &komorebi_bar_json, &mut written_files)?; let applications_json = include_str!("../applications.json"); write_file_with_prompt(&applications_path, applications_json, &mut written_files)?;