Skip to content

Commit

Permalink
feat(os): handle new os symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkna committed Mar 18, 2024
1 parent 7a30163 commit bfdf294
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 2 deletions.
6 changes: 6 additions & 0 deletions docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3172,7 +3172,9 @@ If you would like an operating system to be added, feel free to open a [feature
```toml
# This is the default symbols table.
[os.symbols]
AIX = ""
Alpaquita = "🔔 "
AlmaLinux = "💠 "
Alpine = "🏔️ "
Amazon = "🙂 "
Android = "🤖 "
Expand All @@ -3189,6 +3191,7 @@ Garuda = "🦅 "
Gentoo = "🗜️ "
HardenedBSD = "🛡️ "
Illumos = "🐦 "
Kali = "🐉 "
Linux = "🐧 "
Mabox = "📦 "
Macos = "🍎 "
Expand All @@ -3207,11 +3210,14 @@ Pop = "🍭 "
Raspbian = "🍓 "
Redhat = "🎩 "
RedHatEnterprise = "🎩 "
RockyLinux = "💠 "
Redox = "🧪 "
Solus = ""
SUSE = "🦎 "
Ubuntu = "🎯 "
Ultramarine = "🔷 "
Unknown = ""
Void = ""
Windows = "🪟 "
```

Expand Down
4 changes: 4 additions & 0 deletions docs/public/presets/toml/nerd-font-symbols.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ symbol = " "
[os.symbols]
Alpaquita = ""
Alpine = ""
AlmaLinux = ""
Amazon = ""
Android = ""
Arch = ""
Expand All @@ -103,6 +104,7 @@ Garuda = "󰛓 "
Gentoo = ""
HardenedBSD = "󰞌 "
Illumos = "󰈸 "
Kali = ""
Linux = ""
Mabox = ""
Macos = ""
Expand All @@ -119,11 +121,13 @@ Pop = " "
Raspbian = ""
Redhat = ""
RedHatEnterprise = ""
RockyLinux = ""
Redox = "󰀘 "
Solus = "󰠳 "
SUSE = ""
Ubuntu = ""
Unknown = ""
Void = ""
Windows = "󰍲 "

[package]
Expand Down
6 changes: 6 additions & 0 deletions docs/public/presets/toml/plain-text-symbols.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,9 @@ symbol = "ml "
symbol = "opa "

[os.symbols]
AIX = "aix "
Alpaquita = "alq "
AlmaLinux = "alma "
Alpine = "alp "
Amazon = "amz "
Android = "andr "
Expand All @@ -136,6 +138,7 @@ Garuda = "garu "
Gentoo = "gent "
HardenedBSD = "hbsd "
Illumos = "lum "
Kali = "kali "
Linux = "lnx "
Mabox = "mbox "
Macos = "mac "
Expand All @@ -154,11 +157,14 @@ Pop = "pop "
Raspbian = "rasp "
Redhat = "rhl "
RedHatEnterprise = "rhel "
Rocky = "rky "
Redox = "redox "
Solus = "sol "
SUSE = "suse "
Ubuntu = "ubnt "
Ultramarine = "ultm "
Unknown = "unk "
Void = "void "
Windows = "win "

[package]
Expand Down
7 changes: 6 additions & 1 deletion src/configs/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ impl<'a> Default for OSConfig<'a> {
format: "[$symbol]($style)",
style: "bold white",
symbols: indexmap! {
Type::AIX => "➿ ",
Type::Alpaquita => "🔔 ",
Type::AlmaLinux => "💠 ",
Type::Alpine => "🏔️ ",
Type::Amazon => "🙂 ",
Type::Android => "🤖 ",
Expand All @@ -45,6 +47,7 @@ impl<'a> Default for OSConfig<'a> {
Type::Gentoo => "🗜️ ",
Type::HardenedBSD => "🛡️ ",
Type::Illumos => "🐦 ",
Type::Kali => "🐉 ",
Type::Linux => "🐧 ",
Type::Mabox => "📦 ",
Type::Macos => "🍎 ",
Expand All @@ -63,11 +66,14 @@ impl<'a> Default for OSConfig<'a> {
Type::Raspbian => "🍓 ",
Type::Redhat => "🎩 ",
Type::RedHatEnterprise => "🎩 ",
Type::RockyLinux => "💠 ",
Type::Redox => "🧪 ",
Type::Solus => "⛵ ",
Type::SUSE => "🦎 ",
Type::Ubuntu => "🎯 ",
Type::Ultramarine => "🔷 ",
Type::Unknown => "❓ ",
Type::Void => " ",
Type::Windows => "🪟 ",
// Future symbols.
//aosc => " ",
Expand All @@ -79,7 +85,6 @@ impl<'a> Default for OSConfig<'a> {
//mandriva => " ",
//sabayon => " ",
//slackware => " ",
//void => " ",
//solaris => " ",
},
disabled: true,
Expand Down
6 changes: 5 additions & 1 deletion src/modules/os.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,13 @@ mod tests {
// - dosc/.vuepress/public/presets/toml/nerd-font-symbols.toml
// - .github/config-schema.json
let _ = |t: Type| match t {
Type::AIX => "➿ ",
Type::Alpaquita => "🔔 ",
Type::Alpine => "🏔️ ",
Type::Amazon => "🙂 ",
Type::Android => "🤖 ",
Type::Arch | Type::Artix => "🎗️ ",
Type::CentOS => "💠 ",
Type::CentOS | Type::AlmaLinux | Type::RockyLinux => "💠 ",
Type::Debian => "🌀 ",
Type::DragonFly => "🐉 ",
Type::Emscripten => "🔗 ",
Expand All @@ -347,6 +348,7 @@ mod tests {
Type::Gentoo => "🗜️ ",
Type::HardenedBSD => "🛡️ ",
Type::Illumos => "🐦 ",
Type::Kali => "🐉 ",
Type::Linux => "🐧 ",
Type::Mabox => "📦 ",
Type::Macos => "🍎 ",
Expand All @@ -369,7 +371,9 @@ mod tests {
Type::Solus => "⛵ ",
Type::SUSE => "🦎 ",
Type::Ubuntu => "🎯 ",
Type::Ultramarine => "🔷 ",
Type::Unknown => "❓ ",
Type::Void => " ",
Type::Windows => "🪟 ",
_ => "",
};
Expand Down

0 comments on commit bfdf294

Please sign in to comment.