mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-05-30 07:20:43 +02:00
feat(bar): add komorebi widget (+config) and themes
This commit is contained in:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user