feat(themes): add custom base16 theme variant

This commit adds a custom Base16 theme variant and plumbs it throughout
the komorebi and komorebi-bar packages.
This commit is contained in:
LGUG2Z
2025-03-31 19:06:27 -07:00
parent 2ee0bbc0c7
commit b4b400b236
10 changed files with 1893 additions and 50 deletions
+15 -1
View File
@@ -373,7 +373,7 @@ impl From<Position> for Pos2 {
}
}
#[derive(Copy, Clone, Debug, Serialize, Deserialize)]
#[derive(Clone, Debug, Serialize, Deserialize)]
#[cfg_attr(feature = "schemars", derive(schemars::JsonSchema))]
#[serde(tag = "palette")]
pub enum KomobarTheme {
@@ -389,6 +389,12 @@ pub enum KomobarTheme {
name: komorebi_themes::Base16,
accent: Option<komorebi_themes::Base16Value>,
},
/// A custom Base16 theme
Custom {
/// Colours of the custom Base16 theme palette
colours: Box<komorebi_themes::Base16ColourPalette>,
accent: Option<komorebi_themes::Base16Value>,
},
}
impl From<KomorebiTheme> for KomobarTheme {
@@ -406,6 +412,14 @@ impl From<KomorebiTheme> for KomobarTheme {
name,
accent: bar_accent,
},
KomorebiTheme::Custom {
colours,
bar_accent,
..
} => Self::Custom {
colours,
accent: bar_accent,
},
}
}
}