diff --git a/src/detection/os/os_linux.c b/src/detection/os/os_linux.c index bc27c6957..a7150cda8 100644 --- a/src/detection/os/os_linux.c +++ b/src/detection/os/os_linux.c @@ -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) diff --git a/src/logo/ascii/harmonyos.txt b/src/logo/ascii/harmonyos.txt new file mode 100644 index 000000000..cc3b7a4da --- /dev/null +++ b/src/logo/ascii/harmonyos.txt @@ -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... \ No newline at end of file diff --git a/src/logo/builtin.c b/src/logo/builtin.c index 56a44d894..141f69f50 100644 --- a/src/logo/builtin.c +++ b/src/logo/builtin.c @@ -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"},