feat(bar): add komorebi widget (+config) and themes

This commit is contained in:
LGUG2Z
2024-09-08 11:41:29 -07:00
parent a1688691cf
commit 9f78739c3f
12 changed files with 330 additions and 151 deletions
+5 -2
View File
@@ -1,4 +1,5 @@
use crate::widget::BarWidget;
use eframe::egui::Context;
use eframe::egui::Label;
use eframe::egui::Sense;
use eframe::egui::Ui;
@@ -54,7 +55,7 @@ pub struct Battery {
last_updated: Instant,
}
impl BarWidget for Battery {
impl Battery {
fn output(&mut self) -> Vec<String> {
let mut outputs = self.last_state.clone();
@@ -81,8 +82,10 @@ impl BarWidget for Battery {
outputs
}
}
fn render(&mut self, ui: &mut Ui) {
impl BarWidget for Battery {
fn render(&mut self, _ctx: &Context, ui: &mut Ui) {
if self.enable {
let output = self.output();
if !output.is_empty() {