mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 00:03:58 +01:00
Migration: finish modules support
This commit is contained in:
@@ -92,6 +92,14 @@ void ffParseHostJsonObject(FFHostOptions* options, yyjson_val* module)
|
||||
}
|
||||
}
|
||||
|
||||
void ffGenerateHostJsonConfig(FFHostOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
__attribute__((__cleanup__(ffDestroyHostOptions))) FFHostOptions defaultOptions;
|
||||
ffInitHostOptions(&defaultOptions);
|
||||
|
||||
ffJsonConfigGenerateModuleArgsConfig(doc, module, &defaultOptions.moduleArgs, &options->moduleArgs);
|
||||
}
|
||||
|
||||
void ffGenerateHostJsonResult(FF_MAYBE_UNUSED FFHostOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
FFHostResult host;
|
||||
@@ -150,7 +158,7 @@ void ffInitHostOptions(FFHostOptions* options)
|
||||
ffPrintHost,
|
||||
ffGenerateHostJsonResult,
|
||||
ffPrintHostHelpFormat,
|
||||
NULL
|
||||
ffGenerateHostJsonConfig
|
||||
);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user