mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-06 13:14:21 +01:00
e0eba8ce21
```bash find . -type f \( -name "*.c" -o -name "*.h" -o -name "*.cpp" -o -name "*.hpp" \) ! -path "src/3rdparty/*" -print0 | xargs -0 clang-format -i ```
23 lines
596 B
C
23 lines
596 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;
|
|
}
|