mirror of
https://github.com/Llewellynvdm/starship.git
synced 2024-11-24 21:57:41 +00:00
style(battery): add space between icon and text for better visual (#2547)
* style(battery): add space between icon and text for better visual * docs(battery): update docs Co-authored-by: LitoMore <litomore@gmail.com>
This commit is contained in:
parent
dbb6885724
commit
e19f79bfd3
@ -325,11 +325,11 @@ The module is only visible when the device's battery is below 10%.
|
||||
|
||||
| Option | Default | Description |
|
||||
| -------------------- | --------------------------------- | --------------------------------------------------- |
|
||||
| `full_symbol` | `""` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `""` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `""` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `""` | The symbol shown when the battery state is empty. |
|
||||
| `full_symbol` | `" "` | The symbol shown when the battery is full. |
|
||||
| `charging_symbol` | `" "` | The symbol shown when the battery is charging. |
|
||||
| `discharging_symbol` | `" "` | The symbol shown when the battery is discharging. |
|
||||
| `unknown_symbol` | `" "` | The symbol shown when the battery state is unknown. |
|
||||
| `empty_symbol` | `" "` | The symbol shown when the battery state is empty. |
|
||||
| `format` | `"[$symbol$percentage]($style) "` | The format for the module. |
|
||||
| `display` | [link](#battery-display) | Display threshold and style for the module. |
|
||||
| `disabled` | `false` | Disables the `battery` module. |
|
||||
@ -340,9 +340,9 @@ The module is only visible when the device's battery is below 10%.
|
||||
# ~/.config/starship.toml
|
||||
|
||||
[battery]
|
||||
full_symbol = "🔋"
|
||||
charging_symbol = "⚡️"
|
||||
discharging_symbol = "💀"
|
||||
full_symbol = "🔋 "
|
||||
charging_symbol = "⚡️ "
|
||||
discharging_symbol = "💀 "
|
||||
```
|
||||
|
||||
### Battery Display
|
||||
|
@ -18,11 +18,11 @@ pub struct BatteryConfig<'a> {
|
||||
impl<'a> Default for BatteryConfig<'a> {
|
||||
fn default() -> Self {
|
||||
BatteryConfig {
|
||||
full_symbol: "",
|
||||
charging_symbol: "",
|
||||
discharging_symbol: "",
|
||||
unknown_symbol: "",
|
||||
empty_symbol: "",
|
||||
full_symbol: " ",
|
||||
charging_symbol: " ",
|
||||
discharging_symbol: " ",
|
||||
unknown_symbol: " ",
|
||||
empty_symbol: " ",
|
||||
format: "[$symbol$percentage]($style) ",
|
||||
display: vec![BatteryDisplayConfig {
|
||||
threshold: 10,
|
||||
|
Loading…
Reference in New Issue
Block a user