Skip to content

Commit bbe2396

Browse files
committed
Logo (Builtin): add Windows Server 2025
Fix #1420
1 parent 77c0619 commit bbe2396

File tree

3 files changed

+49
-14
lines changed

3 files changed

+49
-14
lines changed

src/detection/displayserver/displayserver_windows.c

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -236,19 +236,24 @@ void ffConnectDisplayServerImpl(FFDisplayServerResult* ds)
236236

237237
//https://github.com/hykilpikonna/hyfetch/blob/master/neofetch#L2067
238238
const FFOSResult* os = ffDetectOS();
239-
if(
240-
ffStrbufEqualS(&os->version, "11") ||
241-
ffStrbufEqualS(&os->version, "10") ||
242-
ffStrbufEqualS(&os->version, "2022") ||
243-
ffStrbufEqualS(&os->version, "2019") ||
244-
ffStrbufEqualS(&os->version, "2016")
245-
) ffStrbufSetStatic(&ds->dePrettyName, "Fluent");
246-
else if(
247-
ffStrbufEqualS(&os->version, "8") ||
248-
ffStrbufEqualS(&os->version, "8.1") ||
249-
ffStrbufEqualS(&os->version, "2012 R2") ||
250-
ffStrbufEqualS(&os->version, "2012")
251-
) ffStrbufSetStatic(&ds->dePrettyName, "Metro");
239+
uint32_t ver = (uint32_t) ffStrbufToUInt(&os->version, 0);
240+
if (ver > 1000)
241+
{
242+
// Windows Server
243+
if (ver >= 2016)
244+
ffStrbufSetStatic(&ds->dePrettyName, "Fluent");
245+
else if (ver >= 2012)
246+
ffStrbufSetStatic(&ds->dePrettyName, "Metro");
247+
else
248+
ffStrbufSetStatic(&ds->dePrettyName, "Aero");
249+
}
252250
else
253-
ffStrbufSetStatic(&ds->dePrettyName, "Aero");
251+
{
252+
if (ver >= 10)
253+
ffStrbufSetStatic(&ds->dePrettyName, "Fluent");
254+
else if (ver >= 8)
255+
ffStrbufSetStatic(&ds->dePrettyName, "Metro");
256+
else
257+
ffStrbufSetStatic(&ds->dePrettyName, "Aero");
258+
}
254259
}

src/logo/ascii/windows_2025.txt

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
$1 ##%%%%%%%%% $2%%%%%%%%%##
2+
$1 ###%%%%%%%%%% $2%%%%%%%%%%###
3+
$1 ####%%%%%%%%%%% $2%%%%%%%%%%%####
4+
$1 ##%%%%%%%%%%%%%% $2%%%%%%%%%%%%%%##
5+
$1#%%%%%%%%%%%%%%%% $2%%%%%%%%%%%%%%%%#
6+
$1%%%%%%%%%%%%%%%%% $2%%%%%%%%%%%%%%%%%
7+
$1%%%%%%%%%%%%%%%%% $2%%%%%%%%%%%%%%%%%
8+
$1%%%%%%%%%%%%%%%%% $2#%%%%%%%%%%%%%%%%
9+
10+
$3%%%%%%%%%%%%%%%%% $4#%%%%%%%%%%%%%%%%
11+
$3%%%%%%%%%%%%%%%%% $4%%%%%%%%%%%%%%%%%
12+
$3%%%%%%%%%%%%%%%%% $4%%%%%%%%%%%%%%%%%
13+
$3%%%%%%%%%%%%%%%%% $4%%%%%%%%%%%%%%%%#
14+
$3 ###%%%%%%%%%%%%% $4%%%%%%%%%%%%%%%##
15+
$3 ####%%%%%%%%%%% $4%%%%%%%%%%%#%####
16+
$3 ##%#%%%%%%%%% $4%%%%%%%%%%%######
17+
$3 ##%%%%%%%%% $4%%%%%%%%%########

src/logo/builtin.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4820,6 +4820,19 @@ static const FFlogo W[] = {
48204820
FF_COLOR_FG_WHITE,
48214821
},
48224822
},
4823+
// Windows2025
4824+
{
4825+
.names = {"Windows Server 2025"},
4826+
.lines = FASTFETCH_DATATEXT_LOGO_WINDOWS_2025,
4827+
.colors = {
4828+
FF_COLOR_FG_BLUE,
4829+
FF_COLOR_FG_BLUE,
4830+
FF_COLOR_FG_BLUE,
4831+
FF_COLOR_FG_BLUE,
4832+
},
4833+
.colorKeys = FF_COLOR_FG_YELLOW,
4834+
.colorTitle = FF_COLOR_FG_CYAN,
4835+
},
48234836
// Windows11
48244837
{
48254838
.names = {"Windows 11", "Windows Server 2022"},

0 commit comments

Comments
 (0)