File tree Expand file tree Collapse file tree 3 files changed +42
-1
lines changed
Expand file tree Collapse file tree 3 files changed +42
-1
lines changed Original file line number Diff line number Diff line change @@ -304,8 +304,19 @@ static void detectOS(FFOSResult* os)
304304 parseOsRelease (FASTFETCH_TARGET_DIR_ETC "/os-release" , os );
305305 if (os -> id .length == 0 || os -> version .length == 0 || os -> prettyName .length == 0 || os -> codename .length == 0 )
306306 parseLsbRelease (FASTFETCH_TARGET_DIR_ETC "/lsb-release" , os );
307- if (os -> id .length == 0 || os -> name .length > 0 || os -> prettyName .length > 0 )
307+ if (os -> id .length == 0 || os -> name .length == 0 || os -> prettyName .length == 0 )
308308 parseOsRelease (FASTFETCH_TARGET_DIR_USR "/lib/os-release" , os );
309+ if (os -> id .length == 0 && os -> name .length == 0 && os -> prettyName .length == 0 )
310+ {
311+ // HarmonyOS has no os-release file
312+ if (ffStrbufEqualS (& instance .state .platform .sysinfo .name , "HarmonyOS" ))
313+ {
314+ ffStrbufSetS (& os -> id , "harmonyos" );
315+ ffStrbufSetS (& os -> idLike , "harmonyos" );
316+ ffStrbufSetS (& os -> name , "HarmonyOS" );
317+ ffStrbufSetS (& os -> prettyName , "HarmonyOS" );
318+ }
319+ }
309320}
310321
311322void ffDetectOSImpl (FFOSResult * os )
Original file line number Diff line number Diff line change 1+ ....-----....
2+ .-+##############+-..
3+ .+######################+..
4+ .########+- -++#######-.
5+ .+######- -######+.
6+ .######. .######..
7+ .+####+ +#####..
8+ .-####+. +####+.
9+ .+####+ -####+..
10+ ..+####+ -####+...
11+ $2......--$1+####+$2--.......................--$1+####+$2-.........
12+ ..$1--++++-$2...... ...$1-++++--$2..
13+ ..$1--+++--$2... ...$1-+++++-$2..
14+ .$1--+++--$2.... ....$1--+++-$2...
15+ ..$1-++++++--$2..... ......$1---+---$2...
16+ ...$1-+++++++++-----$2..$1----++++++--$2..
17+ ...$1---++++++----++++++++---$2...
18+ .....$1-----+++-----$2...
19+ ...$1---$2...
Original file line number Diff line number Diff line change @@ -2186,6 +2186,17 @@ static const FFlogo H[] = {
21862186 .colorKeys = FF_COLOR_FG_RED ,
21872187 .colorTitle = FF_COLOR_FG_RED ,
21882188 },
2189+ // HarmonyOS
2190+ {
2191+ .names = {"HarmonyOS" },
2192+ .lines = FASTFETCH_DATATEXT_LOGO_HARMONYOS ,
2193+ .colors = {
2194+ FF_COLOR_FG_WHITE ,
2195+ FF_COLOR_FG_BLUE ,
2196+ },
2197+ .colorKeys = FF_COLOR_FG_BLUE ,
2198+ .colorTitle = FF_COLOR_FG_BLUE ,
2199+ },
21892200 // Hash
21902201 {
21912202 .names = {"Hash" },
You can’t perform that action at this time.
0 commit comments