summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDario Vladović <d.vladimyr@gmail.com>2021-04-03 13:10:45 +0200
committerGitHub <noreply@github.com>2021-04-03 13:10:45 +0200
commite19f79bfd3f8c1ce2854be5e76e849966f711a5d (patch)
tree299ac600a37c31330d96e9e50cebab9a240ee7c8
parentdbb68857242b04549e7cc5be6c30b918ab314f92 (diff)
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>
-rw-r--r--docs/config/README.md16
-rw-r--r--src/configs/battery.rs10
2 files changed, 13 insertions, 13 deletions
diff --git a/docs/config/README.md b/docs/config/README.md
index bb40af9fa..06028bc37 100644
--- a/docs/config/README.md
+++ b/docs/config/README.md
@@ -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
diff --git a/src/configs/battery.rs b/src/configs/battery.rs
index db313daa7..56852546a 100644
--- a/src/configs/battery.rs
+++ b/src/configs/battery.rs
@@ -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,