Skip to content

Commit

Permalink
fix: update of presets and default configuration to reflect changes i…
Browse files Browse the repository at this point in the history
…n Nerd Fonts 3.0 (#5162)

* Updated nf-mdi-* to nf-md-* symbols

The following symbols where changed
- directory.read_only
- memory_usage
- meson
- nim
- os.symbols.Garuda
- os.symbols.HardenedBSD
- os.symbols.Illumos
- os.symbols.OpenBSD
- os.symbols.OracleLinux
- os.symbols.Redox
- os.symbols.Solus
- os.symbols.Windows
- package
- rlang

* Updated nf-mdi-* to nf-md-* symbols (for all other presets)

The following symbols where changed
for pastel-powerline:
- directory.substitutions.Documents
- nim
for tokyo-night
- directory.substitutions.Documents
- golang

* Updated nf-mdi-* to nf-md-* symbols for the default configuration in modules in src/configs/*.rs

The following symbols where changed
- azure
- battery.full_symbol
- battery.charging_symbol
- battery.discharging_symbol
- battery.unknown_symbol
- battery.empty_symbol

* Updated config-schema.json

* Updated src/modules/*.rs docs/config/README.md

and used `nerdfix` to check if I overlook anything

* Fixed the battery discharging symbol in the tests

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: jtrv <travershasemail@gmail.com>
  • Loading branch information
3 people committed May 10, 2023
1 parent 6625bd8 commit 2558c45
Show file tree
Hide file tree
Showing 10 changed files with 76 additions and 76 deletions.
24 changes: 12 additions & 12 deletions .github/config-schema.json
Expand Up @@ -30,7 +30,7 @@
"format": "on [$symbol($subscription)]($style) ",
"style": "blue bold",
"subscription_aliases": {},
"symbol": " "
"symbol": "󰠅 "
},
"allOf": [
{
Expand All @@ -40,9 +40,9 @@
},
"battery": {
"default": {
"charging_symbol": " ",
"charging_symbol": "󰂄 ",
"disabled": false,
"discharging_symbol": " ",
"discharging_symbol": "󰂃 ",
"display": [
{
"charging_symbol": null,
Expand All @@ -51,10 +51,10 @@
"threshold": 10
}
],
"empty_symbol": " ",
"empty_symbol": "󰂎 ",
"format": "[$symbol$percentage]($style) ",
"full_symbol": " ",
"unknown_symbol": " "
"full_symbol": "󰁹 ",
"unknown_symbol": "󰁽 "
},
"allOf": [
{
Expand Down Expand Up @@ -1864,7 +1864,7 @@
"type": "string"
},
"symbol": {
"default": " ",
"default": "󰠅 ",
"type": "string"
},
"style": {
Expand All @@ -1889,23 +1889,23 @@
"type": "object",
"properties": {
"full_symbol": {
"default": " ",
"default": "󰁹 ",
"type": "string"
},
"charging_symbol": {
"default": " ",
"default": "󰂄 ",
"type": "string"
},
"discharging_symbol": {
"default": " ",
"default": "󰂃 ",
"type": "string"
},
"unknown_symbol": {
"default": " ",
"default": "󰁽 ",
"type": "string"
},
"empty_symbol": {
"default": " ",
"default": "󰂎 ",
"type": "string"
},
"display": {
Expand Down
28 changes: 14 additions & 14 deletions docs/.vuepress/public/presets/toml/nerd-font-symbols.toml
Expand Up @@ -14,7 +14,7 @@ symbol = " "
symbol = ""

[directory]
read_only = " "
read_only = " 󰌾"

[docker_context]
symbol = ""
Expand Down Expand Up @@ -59,13 +59,13 @@ symbol = " "
symbol = ""

[memory_usage]
symbol = " "
symbol = "󰍛 "

[meson]
symbol = " "
symbol = "󰔷 "

[nim]
symbol = " "
symbol = "󰆥 "

[nix_shell]
symbol = ""
Expand All @@ -87,10 +87,10 @@ Emscripten = " "
EndeavourOS = ""
Fedora = ""
FreeBSD = ""
Garuda = " "
Garuda = "󰛓 "
Gentoo = ""
HardenedBSD = " "
Illumos = " "
HardenedBSD = "󰞌 "
Illumos = "󰈸 "
Linux = ""
Mabox = ""
Macos = ""
Expand All @@ -100,22 +100,22 @@ MidnightBSD = " "
Mint = ""
NetBSD = ""
NixOS = ""
OpenBSD = " "
OpenBSD = "󰈺 "
openSUSE = ""
OracleLinux = " "
OracleLinux = "󰌷 "
Pop = ""
Raspbian = ""
Redhat = ""
RedHatEnterprise = ""
Redox = " "
Solus = " "
Redox = "󰀘 "
Solus = "󰠳 "
SUSE = ""
Ubuntu = ""
Unknown = ""
Windows = " "
Windows = "󰍲 "

[package]
symbol = " "
symbol = "󰏗 "

[pijul_channel]
symbol = "🪺 "
Expand All @@ -124,7 +124,7 @@ symbol = "🪺 "
symbol = ""

[rlang]
symbol = " "
symbol = "󰟔 "

[ruby]
symbol = ""
Expand Down
8 changes: 4 additions & 4 deletions docs/.vuepress/public/presets/toml/pastel-powerline.toml
Expand Up @@ -54,15 +54,15 @@ truncation_symbol = "…/"
# Here is how you can shorten some long paths by text replacement
# similar to mapped_locations in Oh My Posh:
[directory.substitutions]
"Documents" = " "
"Documents" = "󰈙 "
"Downloads" = ""
"Music" = ""
"Pictures" = ""
# Keep in mind that the order matters. For example:
# "Important Documents" = "  "
# "Important Documents" = " 󰈙 "
# will not be replaced, because "Documents" was already substituted before.
# So either put "Important Documents" before "Documents" or use the substituted version:
# "Important " = "  "
# "Important 󰈙 " = " 󰈙 "

[c]
symbol = ""
Expand Down Expand Up @@ -123,7 +123,7 @@ style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'

[nim]
symbol = " "
symbol = "󰆥 "
style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)'

Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/public/presets/toml/tokyo-night.toml
Expand Up @@ -23,7 +23,7 @@ truncation_length = 3
truncation_symbol = "…/"

[directory.substitutions]
"Documents" = " "
"Documents" = "󰈙 "
"Downloads" = ""
"Music" = ""
"Pictures" = ""
Expand All @@ -48,7 +48,7 @@ style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'

[golang]
symbol = ""
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'

Expand Down
18 changes: 9 additions & 9 deletions docs/config/README.md
Expand Up @@ -452,7 +452,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin
| Variable | Default | Description |
| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- |
| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. |
| `symbol` | `' '` | The symbol used in the format. |
| `symbol` | `'󰠅 '` | The symbol used in the format. |
| `style` | `'blue bold'` | The style used in the format. |
| `disabled` | `true` | Disables the `azure` module. |
| `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. |
Expand All @@ -467,7 +467,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin
[azure]
disabled = false
format = 'on [$symbol($subscription)]($style) '
symbol = ' '
symbol = '󰠅 '
style = 'blue bold'
```

Expand All @@ -479,7 +479,7 @@ style = 'blue bold'
[azure]
disabled = false
format = "on [$symbol($username)]($style) "
symbol = " "
symbol = "󰠅 "
style = "blue bold"
```

Expand All @@ -501,11 +501,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. |
Expand Down Expand Up @@ -3746,7 +3746,7 @@ To enable it, set `disabled` to `false` in your configuration file.
# ~/.config/starship.toml

[shell]
fish_indicator = ''
fish_indicator = '󰈺 '
powershell_indicator = '_'
unknown_indicator = 'mystery shell'
style = 'cyan bold'
Expand Down
2 changes: 1 addition & 1 deletion src/configs/azure.rs
Expand Up @@ -20,7 +20,7 @@ impl<'a> Default for AzureConfig<'a> {
fn default() -> Self {
AzureConfig {
format: "on [$symbol($subscription)]($style) ",
symbol: " ",
symbol: "󰠅 ",
style: "blue bold",
disabled: true,
subscription_aliases: HashMap::new(),
Expand Down
10 changes: 5 additions & 5 deletions src/configs/battery.rs
Expand Up @@ -22,11 +22,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::default()],
disabled: false,
Expand Down
12 changes: 6 additions & 6 deletions src/modules/azure.rs
Expand Up @@ -196,7 +196,7 @@ mod tests {
.collect();
let expected = Some(format!(
"on {} ",
Color::Blue.bold().paint(" Subscription 1")
Color::Blue.bold().paint("󰠅 Subscription 1")
));
assert_eq!(actual, expected);
dir.close()
Expand Down Expand Up @@ -267,7 +267,7 @@ mod tests {
.collect();
let expected = Some(format!(
"on {}",
Color::Blue.bold().paint(" user@domain.com")
Color::Blue.bold().paint("󰠅 user@domain.com")
));
assert_eq!(actual, expected);
dir.close()
Expand Down Expand Up @@ -338,7 +338,7 @@ mod tests {
.collect();
let expected = Some(format!(
"on {}",
Color::Blue.bold().paint(" :user@domain.com")
Color::Blue.bold().paint("󰠅 :user@domain.com")
));
assert_eq!(actual, expected);
dir.close()
Expand Down Expand Up @@ -409,7 +409,7 @@ mod tests {
.collect();
let expected = Some(format!(
"on {}",
Color::Blue.bold().paint(" Subscription 1:")
Color::Blue.bold().paint("󰠅 Subscription 1:")
));
assert_eq!(actual, expected);
dir.close()
Expand Down Expand Up @@ -614,7 +614,7 @@ mod tests {
.collect();
let expected = Some(format!(
"on {}",
Color::Blue.bold().paint(" Subscription 1:user@domain.com")
Color::Blue.bold().paint("󰠅 Subscription 1:user@domain.com")
));
assert_eq!(actual, expected);
dir.close()
Expand Down Expand Up @@ -689,7 +689,7 @@ mod tests {
.collect();
let expected = Some(format!(
"on {}",
Color::Blue.bold().paint(" tllsn:user@domain.com")
Color::Blue.bold().paint("󰠅 tllsn:user@domain.com")
));
assert_eq!(actual, expected);
dir.close()
Expand Down
14 changes: 7 additions & 7 deletions src/modules/battery.rs
Expand Up @@ -234,7 +234,7 @@ mod tests {
})
.battery_info_provider(&mock)
.collect();
let expected = Some(String::from(" 100% "));
let expected = Some(String::from("󰁹 100% "));

assert_eq!(expected, actual);
}
Expand All @@ -259,7 +259,7 @@ mod tests {
})
.battery_info_provider(&mock)
.collect();
let expected = Some(String::from(" 80% "));
let expected = Some(String::from("󰂄 80% "));

assert_eq!(expected, actual);
}
Expand All @@ -284,7 +284,7 @@ mod tests {
})
.battery_info_provider(&mock)
.collect();
let expected = Some(String::from(" 80% "));
let expected = Some(String::from("󰂃 80% "));

assert_eq!(expected, actual);
}
Expand All @@ -309,7 +309,7 @@ mod tests {
})
.battery_info_provider(&mock)
.collect();
let expected = Some(String::from(" 0% "));
let expected = Some(String::from("󰁽 0% "));

assert_eq!(expected, actual);
}
Expand All @@ -334,7 +334,7 @@ mod tests {
})
.battery_info_provider(&mock)
.collect();
let expected = Some(String::from(" 0% "));
let expected = Some(String::from("󰂎 0% "));

assert_eq!(expected, actual);
}
Expand Down Expand Up @@ -384,7 +384,7 @@ mod tests {
})
.battery_info_provider(&mock)
.collect();
let expected = Some(format!("{} ", Color::Red.bold().paint(" 40%")));
let expected = Some(format!("{} ", Color::Red.bold().paint("󰂃 40%")));

assert_eq!(expected, actual);
}
Expand All @@ -409,7 +409,7 @@ mod tests {
})
.battery_info_provider(&mock)
.collect();
let expected = Some(String::from(" 13% "));
let expected = Some(String::from("󰂃 13% "));

assert_eq!(expected, actual);
}
Expand Down

0 comments on commit 2558c45

Please sign in to comment.