From 910ba413da5eb44d53bbd406e25ff6e1c80f847c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 20 Apr 2026 16:14:58 +0800 Subject: [PATCH] Modules: adds missing options when generating full config file --- src/modules/colors/colors.c | 12 ++++++++++++ src/modules/cpu/cpu.c | 2 ++ src/modules/physicaldisk/physicaldisk.c | 3 +++ 3 files changed, 17 insertions(+) diff --git a/src/modules/colors/colors.c b/src/modules/colors/colors.c index 481f59f62..168fc0fe7 100644 --- a/src/modules/colors/colors.c +++ b/src/modules/colors/colors.c @@ -264,6 +264,18 @@ void ffGenerateColorsJsonConfig(FFColorsOptions* options, yyjson_mut_doc* doc, y yyjson_mut_arr_add_uint(doc, range, options->block.range[i]); } } + + switch (options->brightness) { + case FF_COLORS_BRIGHTNESS_NORMAL: + yyjson_mut_obj_add_str(doc, module, "brightness", "normal"); + break; + case FF_COLORS_BRIGHTNESS_LIGHT: + yyjson_mut_obj_add_str(doc, module, "brightness", "light"); + break; + default: + yyjson_mut_obj_add_str(doc, module, "brightness", "default"); + break; + } } void ffInitColorsOptions(FFColorsOptions* options) { diff --git a/src/modules/cpu/cpu.c b/src/modules/cpu/cpu.c index c52c5e651..0d3803af3 100644 --- a/src/modules/cpu/cpu.c +++ b/src/modules/cpu/cpu.c @@ -150,6 +150,8 @@ void ffGenerateCPUJsonConfig(FFCPUOptions* options, yyjson_mut_doc* doc, yyjson_ ffTempsGenerateJsonConfig(doc, module, options->temp, options->tempConfig); yyjson_mut_obj_add_bool(doc, module, "showPeCoreCount", options->showPeCoreCount); + + yyjson_mut_obj_add_strbuf(doc, module, "tempSensor", &options->tempSensor); } bool ffGenerateCPUJsonResult(FFCPUOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module) { diff --git a/src/modules/physicaldisk/physicaldisk.c b/src/modules/physicaldisk/physicaldisk.c index 803e01442..b0b7c5860 100644 --- a/src/modules/physicaldisk/physicaldisk.c +++ b/src/modules/physicaldisk/physicaldisk.c @@ -178,6 +178,9 @@ void ffGeneratePhysicalDiskJsonConfig(FFPhysicalDiskOptions* options, yyjson_mut yyjson_mut_obj_add_strbuf(doc, module, "namePrefix", &options->namePrefix); ffTempsGenerateJsonConfig(doc, module, options->temp, options->tempConfig); + + yyjson_mut_obj_add_bool(doc, module, "hideVirtual", !!(options->hideType & FF_PHYSICALDISK_TYPE_VIRTUAL)); + yyjson_mut_obj_add_bool(doc, module, "hideUnused", !!(options->hideType & FF_PHYSICALDISK_TYPE_UNUSED)); } bool ffGeneratePhysicalDiskJsonResult(FFPhysicalDiskOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module) {