mirror of
https://github.com/LGUG2Z/komorebi.git
synced 2026-09-15 22:31:52 +02:00
feat(bar): add basic widget config opts
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
use crate::widget::BarWidget;
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub enum TimeFormat {
|
||||
TwelveHour,
|
||||
TwentyFourHour,
|
||||
@@ -21,15 +22,15 @@ impl TimeFormat {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, Debug)]
|
||||
pub struct Time {
|
||||
pub enable: bool,
|
||||
pub format: TimeFormat,
|
||||
}
|
||||
|
||||
impl Default for Time {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
format: TimeFormat::TwelveHour,
|
||||
}
|
||||
impl Time {
|
||||
pub fn new(enable: bool, format: TimeFormat) -> Self {
|
||||
Self { enable, format }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user