Skip to content

Commit

Permalink
[LOGO] Adds official support for Armbian
Browse files Browse the repository at this point in the history
This patch is inspired from <armbian/build#2499>.

Due to Armbian "base-files", `Distro` entry will still show "Debian" on
this platform.
  • Loading branch information
HorlogeSkynet committed Apr 1, 2024
1 parent df61178 commit 0a970c0
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 1 deletion.
8 changes: 7 additions & 1 deletion archey/distributions.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class Distributions(Enum):
ALPINE = "alpine"
ANDROID = "android"
ARCH = "arch"
ARMBIAN = "armbian"
BUILDROOT = "buildroot"
BUNSENLABS = "bunsenlabs"
CENTOS = "centos"
Expand Down Expand Up @@ -67,7 +68,7 @@ def get_identifiers() -> List[str]:

@staticmethod
@lru_cache(maxsize=None) # Python < 3.9, `functools.cache` is not yet available.
def get_local() -> "Distributions":
def get_local() -> "Distributions": # pylint: disable=too-many-return-statements
"""Entry point of Archey distribution detection logic"""
distribution = Distributions._vendor_detection()

Expand Down Expand Up @@ -103,6 +104,11 @@ def get_local() -> "Distributions":
):
return Distributions.CRUNCHBANG

# Armbian is also detected as _regular_ Debian by `distro`, but going directly
# through release info gives us a proper id (see <python-distro/distro#366>).
if distro.distro_release_attr("id") == "armbian":
return Distributions.ARMBIAN

elif distribution == Distributions.UBUNTU:
# Older Pop!_OS releases (< 20.*) didn't ship their own `ID` (from `os-release`).
# Thus, they are detected as "regular" Ubuntu distributions.
Expand Down
50 changes: 50 additions & 0 deletions archey/logos/armbian.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
"""Armbian logo"""

from archey.colors import Colors

COLORS = [Colors.RED_BRIGHT, Colors.WHITE_NORMAL]

LOGO = [
"""{c[1]} .. """,
"""{c[1]} `:]x**j-,' """,
"""{c[1]} .,+t***********z\\<" """,
"""{c[1]} ?******************; """,
"""{c[1]} '*n` .'`^,;;,^`'. ,cc. """,
"""{c[1]} -<. .[l """,
"""{c[1]} // ^^ ^^ \\\\ """,
"""{c[1]} !^ {c[0]}^^{c[1]} ": """,
"""{c[1]} 'tt}}` {c[0]}!~]rj_{c[1]} ")t/. """,
"""{c[1]} Itttt?' {c[0]}~~]rr]{c[1]} `{{tttt, """,
"""{c[1]} \\tttttt!""I{c[0]}_]r({c[1]}\"\"\"~tttttt1 """,
"""{c[1]} '_tttttttttttt{c[0]})f{c[1]}tttttttttttti. """,
"""{c[1]} \\*ztttttttttttttttttttttttttf**[ """,
"""{c[1]} l**c)tttttttttttttttttttttttt(z**, """,
"""{c[1]} .z*x.`tttttttttttttttttttttttt.`u*n""",
"""{c[1]} >` (tttttttttttttttttttttt] "I """,
"""{c[1]} ,tttttttttttttttttttttt` """,
"""{c[1]} ./ttttt{c[0]}f{c[1]}tttttttt{c[0]}f{c[1]}ttttt( """,
"""{c[1]} 'I){c[0]}))(\\()({c[1]}tt{c[0]}))|\\()({c[1]}{{;' """,
"""{c[1]} {c[0]}.~~~~~~~|)~~~~~~~<{c[1]} """,
"""{c[1]} '{c[0]}[)))))1{c[1]}|({c[0]}))))))){c[1]}? """,
"""{c[1]} {c[0]}",,,"{c[1]} {c[0]}",,,^{c[1]} """,
]

# Taken from official patch for Neofetch (see <armbian/build#2499>).
COLORS_CHIPSET = COLORS

LOGO_CHIPSET = [
"""{c[0]} █ █ █ █ █ █ █ █ █ █ █ """,
"""{c[0]} ███████████████████████ """,
"""{c[0]} ▄▄██ ██▄▄""",
"""{c[0]} ▄▄██ ███████████ ██▄▄""",
"""{c[0]} ▄▄██ ██ ██ ██▄▄""",
"""{c[0]} ▄▄██ ██ ██ ██▄▄""",
"""{c[0]} ▄▄██ ██ ██ ██▄▄""",
"""{c[0]} ▄▄██ █████████████ ██▄▄""",
"""{c[0]} ▄▄██ ██ ██ ██▄▄""",
"""{c[0]} ▄▄██ ██ ██ ██▄▄""",
"""{c[0]} ▄▄██ ██ ██ ██▄▄""",
"""{c[0]} ▄▄██ ██▄▄""",
"""{c[0]} ███████████████████████ """,
"""{c[0]} █ █ █ █ █ █ █ █ █ █ █ """,
]

0 comments on commit 0a970c0

Please sign in to comment.