feat: show live battery charge by default
This commit is contained in:
+7
-3
@@ -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!({
|
||||
|
||||
Reference in New Issue
Block a user