Skip to content

Commit

Permalink
feat(os): add new os symbols (#5849)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkna authored Mar 21, 2024
1 parent d308e91 commit df65b21
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 2 deletions.
12 changes: 12 additions & 0 deletions .github/config-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,8 @@
"format": "[$symbol]($style)",
"style": "bold white",
"symbols": {
"AIX": "",
"AlmaLinux": "💠 ",
"Alpaquita": "🔔 ",
"Alpine": "🏔️ ",
"Amazon": "🙂 ",
Expand All @@ -1182,6 +1184,7 @@
"Gentoo": "🗜️ ",
"HardenedBSD": "🛡️ ",
"Illumos": "🐦 ",
"Kali": "🐉 ",
"Linux": "🐧 ",
"Mabox": "📦 ",
"Macos": "🍎 ",
Expand All @@ -1199,10 +1202,13 @@
"RedHatEnterprise": "🎩 ",
"Redhat": "🎩 ",
"Redox": "🧪 ",
"RockyLinux": "💠 ",
"SUSE": "🦎 ",
"Solus": "",
"Ubuntu": "🎯 ",
"Ultramarine": "🔷 ",
"Unknown": "",
"Void": "",
"Windows": "🪟 ",
"openEuler": "🦉 ",
"openSUSE": "🦎 "
Expand Down Expand Up @@ -4670,6 +4676,8 @@
},
"symbols": {
"default": {
"AIX": "",
"AlmaLinux": "💠 ",
"Alpaquita": "🔔 ",
"Alpine": "🏔️ ",
"Amazon": "🙂 ",
Expand All @@ -4687,6 +4695,7 @@
"Gentoo": "🗜️ ",
"HardenedBSD": "🛡️ ",
"Illumos": "🐦 ",
"Kali": "🐉 ",
"Linux": "🐧 ",
"Mabox": "📦 ",
"Macos": "🍎 ",
Expand All @@ -4704,10 +4713,13 @@
"RedHatEnterprise": "🎩 ",
"Redhat": "🎩 ",
"Redox": "🧪 ",
"RockyLinux": "💠 ",
"SUSE": "🦎 ",
"Solus": "",
"Ubuntu": "🎯 ",
"Ultramarine": "🔷 ",
"Unknown": "",
"Void": "",
"Windows": "🪟 ",
"openEuler": "🦉 ",
"openSUSE": "🦎 "
Expand Down
6 changes: 6 additions & 0 deletions docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3173,7 +3173,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 @@ -3190,6 +3192,7 @@ Garuda = "🦅 "
Gentoo = "🗜️ "
HardenedBSD = "🛡️ "
Illumos = "🐦 "
Kali = "🐉 "
Linux = "🐧 "
Mabox = "📦 "
Macos = "🍎 "
Expand All @@ -3208,11 +3211,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 df65b21

Please sign in to comment.