mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-07 21:50:08 +01:00
25 lines
600 B
C
25 lines
600 B
C
|
|
#include "theme.h"
|
||
|
|
|
||
|
|
#include "detection/os/os.h"
|
||
|
|
|
||
|
|
const char* ffDetectTheme(FFThemeResult* result)
|
||
|
|
{
|
||
|
|
const FFOSResult* os = ffDetectOS();
|
||
|
|
|
||
|
|
char* str_end;
|
||
|
|
const char* version = os->version.chars;
|
||
|
|
unsigned long osNum = strtoul(version, &str_end, 10);
|
||
|
|
if (str_end != version)
|
||
|
|
{
|
||
|
|
if (osNum > 15) { // Tahoe
|
||
|
|
ffStrbufSetStatic(&result->theme1, "Liquid Glass");
|
||
|
|
} else if (osNum < 10) {
|
||
|
|
ffStrbufSetStatic(&result->theme1, "Platinum");
|
||
|
|
} else {
|
||
|
|
ffStrbufSetStatic(&result->theme1, "Aqua");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
return NULL;
|
||
|
|
}
|