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 |
|
| Option | Default | Description |
|
||||||
| -------------------- | --------------------------------- | --------------------------------------------------- |
|
| -------------------- | --------------------------------- | --------------------------------------------------- |
|
||||||
| `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. |
|
||||||
| `disabled` | `false` | Disables the `battery` 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
|
# ~/.config/starship.toml
|
||||||
|
|
||||||
[battery]
|
[battery]
|
||||||
full_symbol = "🔋"
|
full_symbol = "🔋 "
|
||||||
charging_symbol = "⚡️"
|
charging_symbol = "⚡️ "
|
||||||
discharging_symbol = "💀"
|
discharging_symbol = "💀 "
|
||||||
```
|
```
|
||||||
|
|
||||||
### Battery Display
|
### Battery Display
|
||||||
|
@ -18,11 +18,11 @@ pub struct BatteryConfig<'a> {
|
|||||||
impl<'a> Default for BatteryConfig<'a> {
|
impl<'a> Default for BatteryConfig<'a> {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
BatteryConfig {
|
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 {
|
display: vec![BatteryDisplayConfig {
|
||||||
threshold: 10,
|
threshold: 10,
|
||||||
|
Loading…
Reference in New Issue
Block a user