From df65b2155f92c03d07cabbcee6c92104a878c963 Mon Sep 17 00:00:00 2001 From: David Knaack Date: Thu, 21 Mar 2024 12:39:28 +0100 Subject: [PATCH] feat(os): add new os symbols (#5849) --- .github/config-schema.json | 12 ++++++++++++ docs/config/README.md | 6 ++++++ docs/public/presets/toml/nerd-font-symbols.toml | 4 ++++ docs/public/presets/toml/plain-text-symbols.toml | 6 ++++++ src/configs/os.rs | 7 ++++++- src/modules/os.rs | 6 +++++- 6 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.github/config-schema.json b/.github/config-schema.json index f1f9c86b..743f00ed 100644 --- a/.github/config-schema.json +++ b/.github/config-schema.json @@ -1165,6 +1165,8 @@ "format": "[$symbol]($style)", "style": "bold white", "symbols": { + "AIX": "โžฟ ", + "AlmaLinux": "๐Ÿ’  ", "Alpaquita": "๐Ÿ”” ", "Alpine": "๐Ÿ”๏ธ ", "Amazon": "๐Ÿ™‚ ", @@ -1182,6 +1184,7 @@ "Gentoo": "๐Ÿ—œ๏ธ ", "HardenedBSD": "๐Ÿ›ก๏ธ ", "Illumos": "๐Ÿฆ ", + "Kali": "๐Ÿ‰ ", "Linux": "๐Ÿง ", "Mabox": "๐Ÿ“ฆ ", "Macos": "๐ŸŽ ", @@ -1199,10 +1202,13 @@ "RedHatEnterprise": "๐ŸŽฉ ", "Redhat": "๐ŸŽฉ ", "Redox": "๐Ÿงช ", + "RockyLinux": "๐Ÿ’  ", "SUSE": "๐ŸฆŽ ", "Solus": "โ›ต ", "Ubuntu": "๐ŸŽฏ ", + "Ultramarine": "๐Ÿ”ท ", "Unknown": "โ“ ", + "Void": "๎Š™ ", "Windows": "๐ŸชŸ ", "openEuler": "๐Ÿฆ‰ ", "openSUSE": "๐ŸฆŽ " @@ -4670,6 +4676,8 @@ }, "symbols": { "default": { + "AIX": "โžฟ ", + "AlmaLinux": "๐Ÿ’  ", "Alpaquita": "๐Ÿ”” ", "Alpine": "๐Ÿ”๏ธ ", "Amazon": "๐Ÿ™‚ ", @@ -4687,6 +4695,7 @@ "Gentoo": "๐Ÿ—œ๏ธ ", "HardenedBSD": "๐Ÿ›ก๏ธ ", "Illumos": "๐Ÿฆ ", + "Kali": "๐Ÿ‰ ", "Linux": "๐Ÿง ", "Mabox": "๐Ÿ“ฆ ", "Macos": "๐ŸŽ ", @@ -4704,10 +4713,13 @@ "RedHatEnterprise": "๐ŸŽฉ ", "Redhat": "๐ŸŽฉ ", "Redox": "๐Ÿงช ", + "RockyLinux": "๐Ÿ’  ", "SUSE": "๐ŸฆŽ ", "Solus": "โ›ต ", "Ubuntu": "๐ŸŽฏ ", + "Ultramarine": "๐Ÿ”ท ", "Unknown": "โ“ ", + "Void": "๎Š™ ", "Windows": "๐ŸชŸ ", "openEuler": "๐Ÿฆ‰ ", "openSUSE": "๐ŸฆŽ " diff --git a/docs/config/README.md b/docs/config/README.md index 0719540f..e7c231fc 100644 --- a/docs/config/README.md +++ b/docs/config/README.md @@ -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 = "๐Ÿค– " @@ -3190,6 +3192,7 @@ Garuda = "๐Ÿฆ… " Gentoo = "๐Ÿ—œ๏ธ " HardenedBSD = "๐Ÿ›ก๏ธ " Illumos = "๐Ÿฆ " +Kali = "๐Ÿ‰ " Linux = "๐Ÿง " Mabox = "๐Ÿ“ฆ " Macos = "๐ŸŽ " @@ -3208,11 +3211,14 @@ Pop = "๐Ÿญ " Raspbian = "๐Ÿ“ " Redhat = "๐ŸŽฉ " RedHatEnterprise = "๐ŸŽฉ " +RockyLinux = "๐Ÿ’  " Redox = "๐Ÿงช " Solus = "โ›ต " SUSE = "๐ŸฆŽ " Ubuntu = "๐ŸŽฏ " +Ultramarine = "๐Ÿ”ท " Unknown = "โ“ " +Void = "๎Š™ " Windows = "๐ŸชŸ " ``` diff --git a/docs/public/presets/toml/nerd-font-symbols.toml b/docs/public/presets/toml/nerd-font-symbols.toml index 540a4fc3..704b39d1 100644 --- a/docs/public/presets/toml/nerd-font-symbols.toml +++ b/docs/public/presets/toml/nerd-font-symbols.toml @@ -88,6 +88,7 @@ symbol = "๎™บ " [os.symbols] Alpaquita = "๎ชข " Alpine = "๏Œ€ " +AlmaLinux = "๏Œ " Amazon = "๏‰ฐ " Android = "๏…ป " Arch = "๏Œƒ " @@ -103,6 +104,7 @@ Garuda = "๓ฐ›“ " Gentoo = "๏Œ " HardenedBSD = "๓ฐžŒ " Illumos = "๓ฐˆธ " +Kali = "๏Œง " Linux = "๏Œš " Mabox = "๎ฌฉ " Macos = "๏Œ‚ " @@ -119,11 +121,13 @@ Pop = "๏Œช " Raspbian = "๏Œ• " Redhat = "๏Œ– " RedHatEnterprise = "๏Œ– " +RockyLinux = "๏Œซ " Redox = "๓ฐ€˜ " Solus = "๓ฐ ณ " SUSE = "๏Œ” " Ubuntu = "๏Œ› " Unknown = "๏ˆญ " +Void = "๏Œฎ " Windows = "๓ฐฒ " [package] diff --git a/docs/public/presets/toml/plain-text-symbols.toml b/docs/public/presets/toml/plain-text-symbols.toml index 3574a289..90577451 100644 --- a/docs/public/presets/toml/plain-text-symbols.toml +++ b/docs/public/presets/toml/plain-text-symbols.toml @@ -119,7 +119,9 @@ symbol = "ml " symbol = "opa " [os.symbols] +AIX = "aix " Alpaquita = "alq " +AlmaLinux = "alma " Alpine = "alp " Amazon = "amz " Android = "andr " @@ -136,6 +138,7 @@ Garuda = "garu " Gentoo = "gent " HardenedBSD = "hbsd " Illumos = "lum " +Kali = "kali " Linux = "lnx " Mabox = "mbox " Macos = "mac " @@ -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] diff --git a/src/configs/os.rs b/src/configs/os.rs index 84a5e0e4..5742a835 100644 --- a/src/configs/os.rs +++ b/src/configs/os.rs @@ -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 => "๐Ÿค– ", @@ -45,6 +47,7 @@ impl<'a> Default for OSConfig<'a> { Type::Gentoo => "๐Ÿ—œ๏ธ ", Type::HardenedBSD => "๐Ÿ›ก๏ธ ", Type::Illumos => "๐Ÿฆ ", + Type::Kali => "๐Ÿ‰ ", Type::Linux => "๐Ÿง ", Type::Mabox => "๐Ÿ“ฆ ", Type::Macos => "๐ŸŽ ", @@ -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 => "๏Œ ", @@ -79,7 +85,6 @@ impl<'a> Default for OSConfig<'a> { //mandriva => "๏Œ‘ ", //sabayon => "๏Œ— ", //slackware => "๏Œ˜ ", - //void => "๎Š™ ", //solaris => "๏†… ", }, disabled: true, diff --git a/src/modules/os.rs b/src/modules/os.rs index cbc9d1e0..93b83dc7 100644 --- a/src/modules/os.rs +++ b/src/modules/os.rs @@ -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 => "๐Ÿ”— ", @@ -347,6 +348,7 @@ mod tests { Type::Gentoo => "๐Ÿ—œ๏ธ ", Type::HardenedBSD => "๐Ÿ›ก๏ธ ", Type::Illumos => "๐Ÿฆ ", + Type::Kali => "๐Ÿ‰ ", Type::Linux => "๐Ÿง ", Type::Mabox => "๐Ÿ“ฆ ", Type::Macos => "๐ŸŽ ", @@ -369,7 +371,9 @@ mod tests { Type::Solus => "โ›ต ", Type::SUSE => "๐ŸฆŽ ", Type::Ubuntu => "๐ŸŽฏ ", + Type::Ultramarine => "๐Ÿ”ท ", Type::Unknown => "โ“ ", + Type::Void => "๎Š™ ", Type::Windows => "๐ŸชŸ ", _ => "", };