1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-25 11:20:01 +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:
Dario Vladović 2021-04-03 13:10:45 +02:00 committed by GitHub
parent dbb6885724
commit e19f79bfd3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 13 deletions

View File

@ -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

View File

@ -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,