diff --git a/docs/neofetch.1 b/docs/neofetch.1 index 21288782..5fc4949b 100644 --- a/docs/neofetch.1 +++ b/docs/neofetch.1 @@ -343,8 +343,8 @@ Kubuntu, LainOS, LangitKetujuh, LaxerOS, LEDE, LibreELEC, Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old, LinuxFromScratch, Live Raizo, LMDE, Lubuntu, Lunar, mac, MacaroniOS, Mageia, Magix, MagpieOS, MainsailOS, Mandriva, Manjaro, MassOS, MatuusOS, Maui, -Mauna, Meowix, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS, Neptune, -NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, Nobara, NomadBSD, +Mauna, Meowix, Mer, MidOS, Minix, MIRACLE LINUX, MX, Namib, NekOS, +Neptune, NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, Nobara, NomadBSD, Nurunner, NuTyX, Obarun, OBRevenge, OmniOS, Open Source Media Center, OpenBSD, openEuler, OpenIndiana, openKylin, openmamba, OpenMandriva, OpenSolaris, OpenStage, openSUSE, openSUSE Leap, @@ -368,8 +368,8 @@ Venom, VNux, Void, VzLinux, wii\-linux\-ngx, Windows, Windows 10, Windows 11, Windows95, Wrt, Xenia, Xenia2, XFerience, Xray_OS, Xubuntu, yiffOS, Zirconium, Zorin have ascii logos. .TP -NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu, -void have 'old' logo variants, use {distro}_old to use them. +NOTE: arch, dragonfly, Fedora, LangitKetujuh, MidOS, nixos, redhat, +Ubuntu, void have 'old' logo variants, use {distro}_old to use them. .TP NOTE: alpine, android, arch, arcolinux, artix, CalinixOS, centos, cleanjaro, crux, debian, dragonfly, elementary, endeavouros, fedora, diff --git a/hyfetch/distros/distro_detector.py b/hyfetch/distros/distro_detector.py index e28413bc..2b1f45b3 100644 --- a/hyfetch/distros/distro_detector.py +++ b/hyfetch/distros/distro_detector.py @@ -18,7 +18,13 @@ def get_distros() -> list[AsciiArt]: if not distro_dir.exists(): return [] - for f in sorted(distro_dir.glob('*.ascii')): + # Match more specific variants such as *_old and *_small before their + # broader base distro patterns. + for f in sorted( + distro_dir.glob('*.ascii'), + key=lambda p: (len(str(p)), str(p)), + reverse=True, + ): try: content = f.read_text('utf-8') header_line, art = content.split('\n', 1) diff --git a/neofetch b/neofetch index 9c7a4438..e3ac9032 100755 --- a/neofetch +++ b/neofetch @@ -885,8 +885,9 @@ image_source="auto" # Kali, KaOS, KDE, Kibojoe, Kogaion, Korora, KrassOS, KSLinux, Kubuntu, LainOS, LangitKetujuh, # LaxerOS, LEDE, LibreELEC, Linspire, Linux, Linux Lite, Linux Mint, Linux Mint Old, # LinuxFromScratch, Live Raizo, LMDE, Lubuntu, Lunar, mac, MacaroniOS, Mageia, Magix, MagpieOS, -# MainsailOS, Mandriva, Manjaro, MassOS, MatuusOS, Maui, Mauna, Meowix, Mer, Minix, MIRACLE LINUX, -# MX, Namib, NekOS, Neptune, NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, Nobara, NomadBSD, +# MainsailOS, Mandriva, Manjaro, MassOS, MatuusOS, Maui, Mauna, Meowix, Mer, MidOS, Minix, +# MIRACLE LINUX, MX, Namib, NekOS, Neptune, NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, +# Nobara, NomadBSD, # Nurunner, NuTyX, Obarun, OBRevenge, OmniOS, Open Source Media Center, OpenBSD, openEuler, # OpenIndiana, openKylin, openmamba, OpenMandriva, OpenSolaris, OpenStage, openSUSE, openSUSE # Leap, openSUSE Tumbleweed, openSUSE Tumbleweed-Slowroll, OPNsense, Oracle, orchid, OS Elbrus, @@ -904,7 +905,7 @@ image_source="auto" # Void, VzLinux, wii-linux-ngx, Windows, Windows 10, Windows 11, Windows95, Wrt, Xenia, Xenia2, # XFerience, Xray_OS, Xubuntu, yiffOS, Zirconium, Zorin have ascii logos. -# NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu, void have 'old' logo +# NOTE: arch, dragonfly, Fedora, LangitKetujuh, MidOS, nixos, redhat, Ubuntu, void have 'old' logo # variants, use {distro}_old to use them. # NOTE: alpine, android, arch, arcolinux, artix, CalinixOS, centos, cleanjaro, crux, debian, @@ -6753,8 +6754,8 @@ ASCII: Linux, Linux Lite, Linux Mint, Linux Mint Old, LinuxFromScratch, Live Raizo, LMDE, Lubuntu, Lunar, mac, MacaroniOS, Mageia, Magix, MagpieOS, MainsailOS, Mandriva, Manjaro, MassOS, MatuusOS, Maui, - Mauna, Meowix, Mer, Minix, MIRACLE LINUX, MX, Namib, NekOS, Neptune, - NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, Nobara, NomadBSD, + Mauna, Meowix, Mer, MidOS, Minix, MIRACLE LINUX, MX, Namib, NekOS, + Neptune, NetBSD, Netrunner, Nitrux, NixOS, nixos_colorful, Nobara, NomadBSD, Nurunner, NuTyX, Obarun, OBRevenge, OmniOS, Open Source Media Center, OpenBSD, openEuler, OpenIndiana, openKylin, openmamba, OpenMandriva, OpenSolaris, OpenStage, openSUSE, openSUSE Leap, @@ -6779,8 +6780,8 @@ ASCII: Windows 11, Windows95, Wrt, Xenia, Xenia2, XFerience, Xray_OS, Xubuntu, yiffOS, Zirconium, Zorin have ascii logos. - NOTE: arch, dragonfly, Fedora, LangitKetujuh, nixos, redhat, Ubuntu, - void have 'old' logo variants, use {distro}_old to use them. + NOTE: arch, dragonfly, Fedora, LangitKetujuh, MidOS, nixos, redhat, + Ubuntu, void have 'old' logo variants, use {distro}_old to use them. NOTE: alpine, android, arch, arcolinux, artix, CalinixOS, centos, cleanjaro, crux, debian, dragonfly, elementary, endeavouros, fedora, @@ -11919,6 +11920,58 @@ ${c2} -sdhyo+:-` -/syymm: EOF ;; + "MidOS_old"*) + set_colors 8 7 + read -rd '' ascii_data <<'EOF' +${c1} .:=+*#%%@@@@@@%%#*+=:. + .=*%@@@@@@@@@@@@@@@@@@@@@@%*=: + .=%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%+. + :*@@@@@@@@@@@@@@@@@${c2}++${c1}%@@@@@@@@@@@@@@@@#- + .*@@@@@@@@@@@@@@@@@@%${c2}..${c1}#@@@@@@@@@@@@@@@@@@#. + -%@@@@@@@@@@@@@@@@@@@%${c2}..${c1}#@@@@@@@@@@@@@@@@@@@@- + -@@@@@@@@@@@@@@@@@@@@@%${c2}..${c1}#@@@@@@@@@@@@@@@@@@@@@= +:@@@@@@@@@@@@@@@@@%%@@@%${c2}..${c1}#@@@@#@@@@@@@@@@@@@@@@@: +*@@@@@@@@@@@@#${c2}*=:..${c1}*@@@%${c2}..${c1}#@@@#${c2}..:=+${c1}#@@@@@@@@@@@@* +%@@@@@@@#+${c2}=:...-+${c1}#@@@@@%${c2}..${c1}#@@@@@#${c2}+=:..:-${c1}+#@@@@@@@% +%@@@@@${c2}:..:=+-..-+${c1}#@@@@@%${c2}..${c1}#@@@@@%${c2}+-..-+=:..:${c1}@@@@@@ +*@@@@@${c2}*%${c1}@@@@@@%${c2}+-..${c1}#@@@%${c2}..${c1}#@@@%${c2}..-+${c1}#@@@@@@${c2}%*${c1}@@@@@* +:@@@@@@@@@@@@@@@@@${c2}#%${c1}@@@%${c2}..${c1}#@@@${c2}%#${c1}@@@@@@@@@@@@@@@@@: + =@@@@@@@@@@@@@@@@@@@@@%${c2}..${c1}#@@@@@@@@@@@@@@@@@@@@@= + -@@@@@@@@@@@@@@@@@@@@%${c2}..${c1}#@@@@@@@@@@@@@@@@@@@@= + .*@@@@@@@@@@@@@@@@@@%${c2}..${c1}#@@@@@@@@@@@@@@@@@@#: + :*@@@@@@@@@@@@@@@@@${c2}==${c1}%@@@@@@@@@@@@@@@@#-. + .+%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%+: + :=*%@@@@@@@@@@@@@@@@@@@@@@%*=:. + .-=+*#%%@@@@@@%%#*+=-. +EOF + ;; + + "MidOS"*) + set_colors 8 + read -rd '' ascii_data <<'EOF' +${c1} ▁▂▃▄▅▆▇▇████▇▇▆▅▄▃▂▁ + ▃▅▇████████████████████▇▅▃ + ▂▅████████████████████████████▅▁ + ▗▟██████████████▛▀▀▜██████████████▙▖ + ▗▟████████████████▌ ▐████████████████▙▖ + ▗██████████████████▌ ▐██████████████████▖ + ▗███████████████████▌ ▐███████████████████▖ +▕███████████████▀▘ ██▌ ▐██ ▝▀███████████████▏ +▐██████████▛▀▀ ▂██▌ ▐██▂ ▀▀▜██████████▌ +███████▀▀ ▁▄▆████▌ ▐████▆▄▁ ▀▀███████ +█████ ▂▄▂ ▔▀▜████▌ ▐████▛▀▔ ▂▄▂ █████ +▐████▄▄▆█████▄▂ ▔▀██▌ ▐██▀▔ ▂▄█████▆▄▄████▌ +▕██████████████▇▄▂ ██▌ ▐██ ▂▄▇██████████████▏ + ▝███████████████████▌ ▐███████████████████▘ + ▝██████████████████▌ ▐██████████████████▘ + ▝▜████████████████▌ ▐████████████████▛▘ + ▝▜██████████████▙▄▄▟██████████████▛▘ + ▔▀▜██████████████████████████▛▀▔ + ▔▀▜████████████████████▛▀▔ + ▔▔▀▀▀▜██████▛▀▀▀▔▔ +EOF + ;; + "MIRACLE LINUX"* | "MIRACLE_LINUX"*) set_colors 29 read -rd '' ascii_data <<'EOF'