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;
@@ -46,14 +47,16 @@ pub struct Time {
pub format: TimeFormat,
}
impl BarWidget for Time {
impl Time {
fn output(&mut self) -> Vec<String> {
vec![chrono::Local::now()
.format(&self.format.fmt_string())
.to_string()]
}
}
fn render(&mut self, ui: &mut Ui) {
impl BarWidget for Time {
fn render(&mut self, _ctx: &Context, ui: &mut Ui) {
if self.enable {
for output in self.output() {
if ui