1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-26 03:27:30 +00:00

fix: update of presets and default configuration to reflect changes in 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>
This commit is contained in:
Mick Hohmann 2023-05-10 14:36:56 +02:00 committed by GitHub
parent 6625bd8fea
commit 2558c4588b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 76 additions and 76 deletions

View File

@ -30,7 +30,7 @@
"format": "on [$symbol($subscription)]($style) ", "format": "on [$symbol($subscription)]($style) ",
"style": "blue bold", "style": "blue bold",
"subscription_aliases": {}, "subscription_aliases": {},
"symbol": " " "symbol": "󰠅 "
}, },
"allOf": [ "allOf": [
{ {
@ -40,9 +40,9 @@
}, },
"battery": { "battery": {
"default": { "default": {
"charging_symbol": " ", "charging_symbol": "󰂄 ",
"disabled": false, "disabled": false,
"discharging_symbol": " ", "discharging_symbol": "󰂃 ",
"display": [ "display": [
{ {
"charging_symbol": null, "charging_symbol": null,
@ -51,10 +51,10 @@
"threshold": 10 "threshold": 10
} }
], ],
"empty_symbol": " ", "empty_symbol": "󰂎 ",
"format": "[$symbol$percentage]($style) ", "format": "[$symbol$percentage]($style) ",
"full_symbol": " ", "full_symbol": "󰁹 ",
"unknown_symbol": " " "unknown_symbol": "󰁽 "
}, },
"allOf": [ "allOf": [
{ {
@ -1864,7 +1864,7 @@
"type": "string" "type": "string"
}, },
"symbol": { "symbol": {
"default": " ", "default": "󰠅 ",
"type": "string" "type": "string"
}, },
"style": { "style": {
@ -1889,23 +1889,23 @@
"type": "object", "type": "object",
"properties": { "properties": {
"full_symbol": { "full_symbol": {
"default": " ", "default": "󰁹 ",
"type": "string" "type": "string"
}, },
"charging_symbol": { "charging_symbol": {
"default": " ", "default": "󰂄 ",
"type": "string" "type": "string"
}, },
"discharging_symbol": { "discharging_symbol": {
"default": " ", "default": "󰂃 ",
"type": "string" "type": "string"
}, },
"unknown_symbol": { "unknown_symbol": {
"default": " ", "default": "󰁽 ",
"type": "string" "type": "string"
}, },
"empty_symbol": { "empty_symbol": {
"default": " ", "default": "󰂎 ",
"type": "string" "type": "string"
}, },
"display": { "display": {

View File

@ -14,7 +14,7 @@ symbol = " "
symbol = " " symbol = " "
[directory] [directory]
read_only = " " read_only = " 󰌾"
[docker_context] [docker_context]
symbol = " " symbol = " "
@ -59,13 +59,13 @@ symbol = " "
symbol = " " symbol = " "
[memory_usage] [memory_usage]
symbol = " " symbol = "󰍛 "
[meson] [meson]
symbol = " " symbol = "󰔷 "
[nim] [nim]
symbol = " " symbol = "󰆥 "
[nix_shell] [nix_shell]
symbol = " " symbol = " "
@ -87,10 +87,10 @@ Emscripten = " "
EndeavourOS = " " EndeavourOS = " "
Fedora = " " Fedora = " "
FreeBSD = " " FreeBSD = " "
Garuda = " " Garuda = "󰛓 "
Gentoo = " " Gentoo = " "
HardenedBSD = " " HardenedBSD = "󰞌 "
Illumos = " " Illumos = "󰈸 "
Linux = " " Linux = " "
Mabox = " " Mabox = " "
Macos = " " Macos = " "
@ -100,22 +100,22 @@ MidnightBSD = " "
Mint = " " Mint = " "
NetBSD = " " NetBSD = " "
NixOS = " " NixOS = " "
OpenBSD = " " OpenBSD = "󰈺 "
openSUSE = " " openSUSE = " "
OracleLinux = " " OracleLinux = "󰌷 "
Pop = " " Pop = " "
Raspbian = " " Raspbian = " "
Redhat = " " Redhat = " "
RedHatEnterprise = " " RedHatEnterprise = " "
Redox = " " Redox = "󰀘 "
Solus = " " Solus = "󰠳 "
SUSE = " " SUSE = " "
Ubuntu = " " Ubuntu = " "
Unknown = " " Unknown = " "
Windows = " " Windows = "󰍲 "
[package] [package]
symbol = " " symbol = "󰏗 "
[pijul_channel] [pijul_channel]
symbol = "🪺 " symbol = "🪺 "
@ -124,7 +124,7 @@ symbol = "🪺 "
symbol = " " symbol = " "
[rlang] [rlang]
symbol = " " symbol = "󰟔 "
[ruby] [ruby]
symbol = " " symbol = " "

View File

@ -54,15 +54,15 @@ truncation_symbol = "…/"
# Here is how you can shorten some long paths by text replacement # Here is how you can shorten some long paths by text replacement
# similar to mapped_locations in Oh My Posh: # similar to mapped_locations in Oh My Posh:
[directory.substitutions] [directory.substitutions]
"Documents" = " " "Documents" = "󰈙 "
"Downloads" = " " "Downloads" = " "
"Music" = " " "Music" = " "
"Pictures" = " " "Pictures" = " "
# Keep in mind that the order matters. For example: # Keep in mind that the order matters. For example:
# "Important Documents" = "  " # "Important Documents" = " 󰈙 "
# will not be replaced, because "Documents" was already substituted before. # will not be replaced, because "Documents" was already substituted before.
# So either put "Important Documents" before "Documents" or use the substituted version: # So either put "Important Documents" before "Documents" or use the substituted version:
# "Important  " = "  " # "Important 󰈙 " = " 󰈙 "
[c] [c]
symbol = " " symbol = " "
@ -123,7 +123,7 @@ style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)' format = '[ $symbol ($version) ]($style)'
[nim] [nim]
symbol = " " symbol = "󰆥 "
style = "bg:#86BBD8" style = "bg:#86BBD8"
format = '[ $symbol ($version) ]($style)' format = '[ $symbol ($version) ]($style)'

View File

@ -23,7 +23,7 @@ truncation_length = 3
truncation_symbol = "…/" truncation_symbol = "…/"
[directory.substitutions] [directory.substitutions]
"Documents" = " " "Documents" = "󰈙 "
"Downloads" = " " "Downloads" = " "
"Music" = " " "Music" = " "
"Pictures" = " " "Pictures" = " "
@ -48,7 +48,7 @@ style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
[golang] [golang]
symbol = "" symbol = ""
style = "bg:#212736" style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)' format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'

View File

@ -452,7 +452,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin
| Variable | Default | Description | | Variable | Default | Description |
| ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- | | ---------------------- | ---------------------------------------- | ------------------------------------------------------------------------------------- |
| `format` | `'on [$symbol($subscription)]($style) '` | The format for the Azure module to render. | | `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. | | `style` | `'blue bold'` | The style used in the format. |
| `disabled` | `true` | Disables the `azure` module. | | `disabled` | `true` | Disables the `azure` module. |
| `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. | | `subscription_aliases` | `{}` | Table of subscription name aliases to display in addition to Azure subscription name. |
@ -467,7 +467,7 @@ The `azure` module shows the current Azure Subscription. This is based on showin
[azure] [azure]
disabled = false disabled = false
format = 'on [$symbol($subscription)]($style) ' format = 'on [$symbol($subscription)]($style) '
symbol = ' ' symbol = '󰠅 '
style = 'blue bold' style = 'blue bold'
``` ```
@ -479,7 +479,7 @@ style = 'blue bold'
[azure] [azure]
disabled = false disabled = false
format = "on [$symbol($username)]($style) " format = "on [$symbol($username)]($style) "
symbol = " " symbol = "󰠅 "
style = "blue bold" style = "blue bold"
``` ```
@ -501,11 +501,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. |
@ -3746,7 +3746,7 @@ To enable it, set `disabled` to `false` in your configuration file.
# ~/.config/starship.toml # ~/.config/starship.toml
[shell] [shell]
fish_indicator = '' fish_indicator = '󰈺 '
powershell_indicator = '_' powershell_indicator = '_'
unknown_indicator = 'mystery shell' unknown_indicator = 'mystery shell'
style = 'cyan bold' style = 'cyan bold'

View File

@ -20,7 +20,7 @@ impl<'a> Default for AzureConfig<'a> {
fn default() -> Self { fn default() -> Self {
AzureConfig { AzureConfig {
format: "on [$symbol($subscription)]($style) ", format: "on [$symbol($subscription)]($style) ",
symbol: " ", symbol: "󰠅 ",
style: "blue bold", style: "blue bold",
disabled: true, disabled: true,
subscription_aliases: HashMap::new(), subscription_aliases: HashMap::new(),

View File

@ -22,11 +22,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::default()], display: vec![BatteryDisplayConfig::default()],
disabled: false, disabled: false,

View File

@ -196,7 +196,7 @@ mod tests {
.collect(); .collect();
let expected = Some(format!( let expected = Some(format!(
"on {} ", "on {} ",
Color::Blue.bold().paint(" Subscription 1") Color::Blue.bold().paint("󰠅 Subscription 1")
)); ));
assert_eq!(actual, expected); assert_eq!(actual, expected);
dir.close() dir.close()
@ -267,7 +267,7 @@ mod tests {
.collect(); .collect();
let expected = Some(format!( let expected = Some(format!(
"on {}", "on {}",
Color::Blue.bold().paint(" user@domain.com") Color::Blue.bold().paint("󰠅 user@domain.com")
)); ));
assert_eq!(actual, expected); assert_eq!(actual, expected);
dir.close() dir.close()
@ -338,7 +338,7 @@ mod tests {
.collect(); .collect();
let expected = Some(format!( let expected = Some(format!(
"on {}", "on {}",
Color::Blue.bold().paint(" :user@domain.com") Color::Blue.bold().paint("󰠅 :user@domain.com")
)); ));
assert_eq!(actual, expected); assert_eq!(actual, expected);
dir.close() dir.close()
@ -409,7 +409,7 @@ mod tests {
.collect(); .collect();
let expected = Some(format!( let expected = Some(format!(
"on {}", "on {}",
Color::Blue.bold().paint(" Subscription 1:") Color::Blue.bold().paint("󰠅 Subscription 1:")
)); ));
assert_eq!(actual, expected); assert_eq!(actual, expected);
dir.close() dir.close()
@ -614,7 +614,7 @@ mod tests {
.collect(); .collect();
let expected = Some(format!( let expected = Some(format!(
"on {}", "on {}",
Color::Blue.bold().paint(" Subscription 1:user@domain.com") Color::Blue.bold().paint("󰠅 Subscription 1:user@domain.com")
)); ));
assert_eq!(actual, expected); assert_eq!(actual, expected);
dir.close() dir.close()
@ -689,7 +689,7 @@ mod tests {
.collect(); .collect();
let expected = Some(format!( let expected = Some(format!(
"on {}", "on {}",
Color::Blue.bold().paint(" tllsn:user@domain.com") Color::Blue.bold().paint("󰠅 tllsn:user@domain.com")
)); ));
assert_eq!(actual, expected); assert_eq!(actual, expected);
dir.close() dir.close()

View File

@ -234,7 +234,7 @@ mod tests {
}) })
.battery_info_provider(&mock) .battery_info_provider(&mock)
.collect(); .collect();
let expected = Some(String::from(" 100% ")); let expected = Some(String::from("󰁹 100% "));
assert_eq!(expected, actual); assert_eq!(expected, actual);
} }
@ -259,7 +259,7 @@ mod tests {
}) })
.battery_info_provider(&mock) .battery_info_provider(&mock)
.collect(); .collect();
let expected = Some(String::from(" 80% ")); let expected = Some(String::from("󰂄 80% "));
assert_eq!(expected, actual); assert_eq!(expected, actual);
} }
@ -284,7 +284,7 @@ mod tests {
}) })
.battery_info_provider(&mock) .battery_info_provider(&mock)
.collect(); .collect();
let expected = Some(String::from(" 80% ")); let expected = Some(String::from("󰂃 80% "));
assert_eq!(expected, actual); assert_eq!(expected, actual);
} }
@ -309,7 +309,7 @@ mod tests {
}) })
.battery_info_provider(&mock) .battery_info_provider(&mock)
.collect(); .collect();
let expected = Some(String::from(" 0% ")); let expected = Some(String::from("󰁽 0% "));
assert_eq!(expected, actual); assert_eq!(expected, actual);
} }
@ -334,7 +334,7 @@ mod tests {
}) })
.battery_info_provider(&mock) .battery_info_provider(&mock)
.collect(); .collect();
let expected = Some(String::from(" 0% ")); let expected = Some(String::from("󰂎 0% "));
assert_eq!(expected, actual); assert_eq!(expected, actual);
} }
@ -384,7 +384,7 @@ mod tests {
}) })
.battery_info_provider(&mock) .battery_info_provider(&mock)
.collect(); .collect();
let expected = Some(format!("{} ", Color::Red.bold().paint(" 40%"))); let expected = Some(format!("{} ", Color::Red.bold().paint("󰂃 40%")));
assert_eq!(expected, actual); assert_eq!(expected, actual);
} }
@ -409,7 +409,7 @@ mod tests {
}) })
.battery_info_provider(&mock) .battery_info_provider(&mock)
.collect(); .collect();
let expected = Some(String::from(" 13% ")); let expected = Some(String::from("󰂃 13% "));
assert_eq!(expected, actual); assert_eq!(expected, actual);
} }

View File

@ -189,10 +189,10 @@ mod tests {
EndeavourOS = "" EndeavourOS = ""
Fedora = "" Fedora = ""
FreeBSD = "" FreeBSD = ""
Garuda = " " Garuda = "󰛓 "
Gentoo = "" Gentoo = ""
HardenedBSD = " " HardenedBSD = "󰞌 "
Illumos = " " Illumos = "󰈸 "
Linux = "" Linux = ""
Macos = "" Macos = ""
Manjaro = "" Manjaro = ""
@ -201,19 +201,19 @@ mod tests {
Mint = "" Mint = ""
NetBSD = "" NetBSD = ""
NixOS = "" NixOS = ""
OpenBSD = " " OpenBSD = "󰈺 "
SUSE = "" SUSE = ""
OracleLinux = " " OracleLinux = "󰌷 "
Pop = "" Pop = ""
Raspbian = "" Raspbian = ""
Redhat = "" Redhat = ""
RedHatEnterprise = "" RedHatEnterprise = ""
Redox = " " Redox = "󰀘 "
Solus = " " Solus = "󰠳 "
openSUSE = "" openSUSE = ""
Ubuntu = "" Ubuntu = ""
Unknown = "" Unknown = ""
Windows = " " Windows = "󰍲 "
}; };
let config = OSConfig::load(&config_toml); let config = OSConfig::load(&config_toml);
@ -230,10 +230,10 @@ mod tests {
(Type::EndeavourOS, Some("")), (Type::EndeavourOS, Some("")),
(Type::Fedora, Some("")), (Type::Fedora, Some("")),
(Type::FreeBSD, Some("")), (Type::FreeBSD, Some("")),
(Type::Garuda, Some(" ")), (Type::Garuda, Some("󰛓 ")),
(Type::Gentoo, Some("")), (Type::Gentoo, Some("")),
(Type::HardenedBSD, Some(" ")), (Type::HardenedBSD, Some("󰞌 ")),
(Type::Illumos, Some(" ")), (Type::Illumos, Some("󰈸 ")),
(Type::Linux, Some("")), (Type::Linux, Some("")),
(Type::Macos, Some("")), (Type::Macos, Some("")),
(Type::Manjaro, Some("")), (Type::Manjaro, Some("")),
@ -242,19 +242,19 @@ mod tests {
(Type::Mint, Some("")), (Type::Mint, Some("")),
(Type::NetBSD, Some("")), (Type::NetBSD, Some("")),
(Type::NixOS, Some("")), (Type::NixOS, Some("")),
(Type::OpenBSD, Some(" ")), (Type::OpenBSD, Some("󰈺 ")),
(Type::SUSE, Some("")), (Type::SUSE, Some("")),
(Type::OracleLinux, Some(" ")), (Type::OracleLinux, Some("󰌷 ")),
(Type::Pop, Some("")), (Type::Pop, Some("")),
(Type::Raspbian, Some("")), (Type::Raspbian, Some("")),
(Type::Redhat, Some("")), (Type::Redhat, Some("")),
(Type::RedHatEnterprise, Some("")), (Type::RedHatEnterprise, Some("")),
(Type::Redox, Some(" ")), (Type::Redox, Some("󰀘 ")),
(Type::Solus, Some(" ")), (Type::Solus, Some("󰠳 ")),
(Type::openSUSE, Some("")), (Type::openSUSE, Some("")),
(Type::Ubuntu, Some("")), (Type::Ubuntu, Some("")),
(Type::Unknown, Some("")), (Type::Unknown, Some("")),
(Type::Windows, Some(" ")), (Type::Windows, Some("󰍲 ")),
]; ];
for (t, e) in type_expected_pairs { for (t, e) in type_expected_pairs {