master ohmu/fastfetch-openbsd / src / common / apple / smc_temps.h
ohmu  ·  2026-10-15
 1#pragma once
 2
 3#include "fastfetch.h"
 4
 5typedef struct FFTempValue {
 6    FFstrbuf name;
 7    FFstrbuf deviceClass;
 8    double value;
 9} FFTempValue;
10
11enum FFTempType: uint8_t {
12    FF_TEMP_CPU_X64,
13    FF_TEMP_CPU_M1X,
14    FF_TEMP_CPU_M2X,
15    FF_TEMP_CPU_M3X,
16    FF_TEMP_CPU_M4X,
17    FF_TEMP_CPU_M5X,
18
19    FF_TEMP_GPU_INTEL,
20    FF_TEMP_GPU_AMD,
21    FF_TEMP_GPU_UNKNOWN,
22    FF_TEMP_GPU_M1X,
23    FF_TEMP_GPU_M2X,
24    FF_TEMP_GPU_M3X,
25    FF_TEMP_GPU_M4X,
26    FF_TEMP_GPU_M5X,
27
28    FF_TEMP_BATTERY,
29
30    FF_TEMP_MEMORY,
31};
32
33const char* ffDetectSmcSpecificTemp(const char* sensor, double* result);
34const char* ffDetectSmcTemps(enum FFTempType type, double* result);