feat: show live battery charge by default

This commit is contained in:
Valdemar Lorenzen
2026-10-12 12:02:10 +02:00
parent 0d3fbc01f8
commit 8c6a050171
11 changed files with 746 additions and 41 deletions
+7 -3
View File
@@ -47,8 +47,11 @@ impl ChromeLine {
Self {
left: vec!["tabs".into()],
center: Vec::new(),
right: Vec::new(),
segments: BTreeMap::from([("tabs".into(), default_segment("tabs"))]),
right: vec!["battery".into()],
segments: BTreeMap::from([
("tabs".into(), default_segment("tabs")),
("battery".into(), default_segment("battery")),
]),
}
}
@@ -114,7 +117,7 @@ impl ChromeLine {
fn default_segment(name: &str) -> SegmentConfig {
let mut segment = SegmentConfig::default();
if matches!(name, "tabs" | "position") {
if matches!(name, "tabs" | "position" | "battery") {
segment.leading_edge = "░▒▓".into();
}
if matches!(name, "tabs" | "mode") {
@@ -291,6 +294,7 @@ mod tests {
"count",
"language",
"position",
"battery",
"workspace",
];
let options = serde_json::json!({