mirror of
https://github.com/starship/starship.git
synced 2024-12-23 23:58:51 +01: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:
parent
6625bd8fea
commit
2558c4588b
24
.github/config-schema.json
vendored
24
.github/config-schema.json
vendored
@ -30,7 +30,7 @@
|
||||
"format": "on [$symbol($subscription)]($style) ",
|
||||
"style": "blue bold",
|
||||
"subscription_aliases": {},
|
||||
"symbol": "ﴃ "
|
||||
"symbol": " "
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
@ -40,9 +40,9 @@
|
||||
},
|
||||
"battery": {
|
||||
"default": {
|
||||
"charging_symbol": " ",
|
||||
"charging_symbol": " ",
|
||||
"disabled": false,
|
||||
"discharging_symbol": " ",
|
||||
"discharging_symbol": " ",
|
||||
"display": [
|
||||
{
|
||||
"charging_symbol": null,
|
||||
@ -51,10 +51,10 @@
|
||||
"threshold": 10
|
||||
}
|
||||
],
|
||||
"empty_symbol": " ",
|
||||
"empty_symbol": " ",
|
||||
"format": "[$symbol$percentage]($style) ",
|
||||
"full_symbol": " ",
|
||||
"unknown_symbol": " "
|
||||
"full_symbol": " ",
|
||||
"unknown_symbol": " "
|
||||
},
|
||||
"allOf": [
|
||||
{
|
||||
@ -1864,7 +1864,7 @@
|
||||
"type": "string"
|
||||
},
|
||||
"symbol": {
|
||||
"default": "ﴃ ",
|
||||
"default": " ",
|
||||
"type": "string"
|
||||
},
|
||||
"style": {
|
||||
@ -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": {
|
||||
|
@ -14,7 +14,7 @@ symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[directory]
|
||||
read_only = " "
|
||||
read_only = " "
|
||||
|
||||
[docker_context]
|
||||
symbol = " "
|
||||
@ -59,13 +59,13 @@ symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[memory_usage]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[meson]
|
||||
symbol = "喝 "
|
||||
symbol = " "
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
|
||||
[nix_shell]
|
||||
symbol = " "
|
||||
@ -87,10 +87,10 @@ Emscripten = " "
|
||||
EndeavourOS = " "
|
||||
Fedora = " "
|
||||
FreeBSD = " "
|
||||
Garuda = " "
|
||||
Garuda = " "
|
||||
Gentoo = " "
|
||||
HardenedBSD = "ﲊ "
|
||||
Illumos = " "
|
||||
HardenedBSD = " "
|
||||
Illumos = " "
|
||||
Linux = " "
|
||||
Mabox = " "
|
||||
Macos = " "
|
||||
@ -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 = "🪺 "
|
||||
@ -124,7 +124,7 @@ symbol = "🪺 "
|
||||
symbol = " "
|
||||
|
||||
[rlang]
|
||||
symbol = "ﳒ "
|
||||
symbol = " "
|
||||
|
||||
[ruby]
|
||||
symbol = " "
|
||||
|
@ -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 = " "
|
||||
@ -123,7 +123,7 @@ style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
[nim]
|
||||
symbol = " "
|
||||
symbol = " "
|
||||
style = "bg:#86BBD8"
|
||||
format = '[ $symbol ($version) ]($style)'
|
||||
|
||||
|
@ -23,7 +23,7 @@ truncation_length = 3
|
||||
truncation_symbol = "…/"
|
||||
|
||||
[directory.substitutions]
|
||||
"Documents" = " "
|
||||
"Documents" = " "
|
||||
"Downloads" = " "
|
||||
"Music" = " "
|
||||
"Pictures" = " "
|
||||
@ -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)'
|
||||
|
||||
|
@ -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. |
|
||||
@ -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'
|
||||
```
|
||||
|
||||
@ -479,7 +479,7 @@ style = 'blue bold'
|
||||
[azure]
|
||||
disabled = false
|
||||
format = "on [$symbol($username)]($style) "
|
||||
symbol = "ﴃ "
|
||||
symbol = " "
|
||||
style = "blue bold"
|
||||
```
|
||||
|
||||
@ -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. |
|
||||
@ -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'
|
||||
|
@ -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(),
|
||||
|
@ -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,
|
||||
|
@ -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()
|
||||
@ -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()
|
||||
@ -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()
|
||||
@ -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()
|
||||
@ -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()
|
||||
@ -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()
|
||||
|
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
@ -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);
|
||||
}
|
||||
|
@ -189,10 +189,10 @@ mod tests {
|
||||
EndeavourOS = " "
|
||||
Fedora = " "
|
||||
FreeBSD = " "
|
||||
Garuda = " "
|
||||
Garuda = " "
|
||||
Gentoo = " "
|
||||
HardenedBSD = "ﲊ "
|
||||
Illumos = " "
|
||||
HardenedBSD = " "
|
||||
Illumos = " "
|
||||
Linux = " "
|
||||
Macos = " "
|
||||
Manjaro = " "
|
||||
@ -201,19 +201,19 @@ mod tests {
|
||||
Mint = " "
|
||||
NetBSD = " "
|
||||
NixOS = " "
|
||||
OpenBSD = " "
|
||||
OpenBSD = " "
|
||||
SUSE = " "
|
||||
OracleLinux = " "
|
||||
OracleLinux = " "
|
||||
Pop = " "
|
||||
Raspbian = " "
|
||||
Redhat = " "
|
||||
RedHatEnterprise = " "
|
||||
Redox = " "
|
||||
Solus = "ﴱ "
|
||||
Redox = " "
|
||||
Solus = " "
|
||||
openSUSE = " "
|
||||
Ubuntu = " "
|
||||
Unknown = " "
|
||||
Windows = " "
|
||||
Windows = " "
|
||||
};
|
||||
|
||||
let config = OSConfig::load(&config_toml);
|
||||
@ -230,10 +230,10 @@ mod tests {
|
||||
(Type::EndeavourOS, Some(" ")),
|
||||
(Type::Fedora, Some(" ")),
|
||||
(Type::FreeBSD, Some(" ")),
|
||||
(Type::Garuda, Some(" ")),
|
||||
(Type::Garuda, Some(" ")),
|
||||
(Type::Gentoo, Some(" ")),
|
||||
(Type::HardenedBSD, Some("ﲊ ")),
|
||||
(Type::Illumos, Some(" ")),
|
||||
(Type::HardenedBSD, Some(" ")),
|
||||
(Type::Illumos, Some(" ")),
|
||||
(Type::Linux, Some(" ")),
|
||||
(Type::Macos, Some(" ")),
|
||||
(Type::Manjaro, Some(" ")),
|
||||
@ -242,19 +242,19 @@ mod tests {
|
||||
(Type::Mint, Some(" ")),
|
||||
(Type::NetBSD, Some(" ")),
|
||||
(Type::NixOS, Some(" ")),
|
||||
(Type::OpenBSD, Some(" ")),
|
||||
(Type::OpenBSD, Some(" ")),
|
||||
(Type::SUSE, Some(" ")),
|
||||
(Type::OracleLinux, Some(" ")),
|
||||
(Type::OracleLinux, Some(" ")),
|
||||
(Type::Pop, Some(" ")),
|
||||
(Type::Raspbian, Some(" ")),
|
||||
(Type::Redhat, Some(" ")),
|
||||
(Type::RedHatEnterprise, Some(" ")),
|
||||
(Type::Redox, Some(" ")),
|
||||
(Type::Solus, Some("ﴱ ")),
|
||||
(Type::Redox, Some(" ")),
|
||||
(Type::Solus, Some(" ")),
|
||||
(Type::openSUSE, Some(" ")),
|
||||
(Type::Ubuntu, Some(" ")),
|
||||
(Type::Unknown, Some(" ")),
|
||||
(Type::Windows, Some(" ")),
|
||||
(Type::Windows, Some(" ")),
|
||||
];
|
||||
|
||||
for (t, e) in type_expected_pairs {
|
||||
|
Loading…
Reference in New Issue
Block a user