mirror of
https://github.com/starship/starship.git
synced 2026-06-23 02:05:51 +07:00
feat(battery): Update default unknown_symbol (#7278)
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
"full_symbol": " ",
|
"full_symbol": " ",
|
||||||
"charging_symbol": " ",
|
"charging_symbol": " ",
|
||||||
"discharging_symbol": " ",
|
"discharging_symbol": " ",
|
||||||
"unknown_symbol": " ",
|
"unknown_symbol": " ",
|
||||||
"empty_symbol": " ",
|
"empty_symbol": " ",
|
||||||
"display": [
|
"display": [
|
||||||
{
|
{
|
||||||
@@ -1960,7 +1960,7 @@
|
|||||||
},
|
},
|
||||||
"unknown_symbol": {
|
"unknown_symbol": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"default": " "
|
"default": " "
|
||||||
},
|
},
|
||||||
"empty_symbol": {
|
"empty_symbol": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -527,7 +527,7 @@ The module is only visible when the device's battery is below 10%.
|
|||||||
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
| `full_symbol` | `' '` | The symbol shown when the battery is full. |
|
||||||
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
| `charging_symbol` | `' '` | The symbol shown when the battery is charging. |
|
||||||
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
| `discharging_symbol` | `' '` | The symbol shown when the battery is discharging. |
|
||||||
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
| `unknown_symbol` | `' '` | The symbol shown when the battery state is unknown. |
|
||||||
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
| `empty_symbol` | `' '` | The symbol shown when the battery state is empty. |
|
||||||
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
| `format` | `'[$symbol$percentage]($style) '` | The format for the module. |
|
||||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ impl Default for BatteryConfig<'_> {
|
|||||||
full_symbol: " ",
|
full_symbol: " ",
|
||||||
charging_symbol: " ",
|
charging_symbol: " ",
|
||||||
discharging_symbol: " ",
|
discharging_symbol: " ",
|
||||||
unknown_symbol: " ",
|
unknown_symbol: " ",
|
||||||
empty_symbol: " ",
|
empty_symbol: " ",
|
||||||
format: "[$symbol$percentage]($style) ",
|
format: "[$symbol$percentage]($style) ",
|
||||||
display: vec![BatteryDisplayConfig::default()],
|
display: vec![BatteryDisplayConfig::default()],
|
||||||
|
|||||||
@@ -313,7 +313,7 @@ mod tests {
|
|||||||
})
|
})
|
||||||
.battery_info_provider(&mock)
|
.battery_info_provider(&mock)
|
||||||
.collect();
|
.collect();
|
||||||
let expected = Some(String::from(" 0% "));
|
let expected = Some(String::from(" 0% "));
|
||||||
|
|
||||||
assert_eq!(expected, actual);
|
assert_eq!(expected, actual);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user