mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Logo (Builtin): Add HarmonyOS support (#1804)
* Logo (Builtin): add HarmonyOS * OS (HarmonyOS): detect HarmonyOS * Update src/detection/os/os_linux.c Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update os_linux.c --------- Co-authored-by: Carter Li <CarterLi@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
f1cc2d124c
commit
2e1ddcf9f8
@@ -304,8 +304,19 @@ static void detectOS(FFOSResult* os)
|
||||
parseOsRelease(FASTFETCH_TARGET_DIR_ETC "/os-release", os);
|
||||
if (os->id.length == 0 || os->version.length == 0 || os->prettyName.length == 0 || os->codename.length == 0)
|
||||
parseLsbRelease(FASTFETCH_TARGET_DIR_ETC "/lsb-release", os);
|
||||
if (os->id.length == 0 || os->name.length > 0 || os->prettyName.length > 0)
|
||||
if (os->id.length == 0 || os->name.length == 0 || os->prettyName.length == 0)
|
||||
parseOsRelease(FASTFETCH_TARGET_DIR_USR "/lib/os-release", os);
|
||||
if (os->id.length == 0 && os->name.length == 0 && os->prettyName.length == 0)
|
||||
{
|
||||
// HarmonyOS has no os-release file
|
||||
if (ffStrbufEqualS(&instance.state.platform.sysinfo.name, "HarmonyOS"))
|
||||
{
|
||||
ffStrbufSetS(&os->id, "harmonyos");
|
||||
ffStrbufSetS(&os->idLike, "harmonyos");
|
||||
ffStrbufSetS(&os->name, "HarmonyOS");
|
||||
ffStrbufSetS(&os->prettyName, "HarmonyOS");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ffDetectOSImpl(FFOSResult* os)
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
....-----....
|
||||
.-+##############+-..
|
||||
.+######################+..
|
||||
.########+- -++#######-.
|
||||
.+######- -######+.
|
||||
.######. .######..
|
||||
.+####+ +#####..
|
||||
.-####+. +####+.
|
||||
.+####+ -####+..
|
||||
..+####+ -####+...
|
||||
$2......--$1+####+$2--.......................--$1+####+$2-.........
|
||||
..$1--++++-$2...... ...$1-++++--$2..
|
||||
..$1--+++--$2... ...$1-+++++-$2..
|
||||
.$1--+++--$2.... ....$1--+++-$2...
|
||||
..$1-++++++--$2..... ......$1---+---$2...
|
||||
...$1-+++++++++-----$2..$1----++++++--$2..
|
||||
...$1---++++++----++++++++---$2...
|
||||
.....$1-----+++-----$2...
|
||||
...$1---$2...
|
||||
@@ -2186,6 +2186,17 @@ static const FFlogo H[] = {
|
||||
.colorKeys = FF_COLOR_FG_RED,
|
||||
.colorTitle = FF_COLOR_FG_RED,
|
||||
},
|
||||
// HarmonyOS
|
||||
{
|
||||
.names = {"HarmonyOS"},
|
||||
.lines = FASTFETCH_DATATEXT_LOGO_HARMONYOS,
|
||||
.colors = {
|
||||
FF_COLOR_FG_WHITE,
|
||||
FF_COLOR_FG_BLUE,
|
||||
},
|
||||
.colorKeys = FF_COLOR_FG_BLUE,
|
||||
.colorTitle = FF_COLOR_FG_BLUE,
|
||||
},
|
||||
// Hash
|
||||
{
|
||||
.names = {"Hash"},
|
||||
|
||||
Reference in New Issue
Block a user