mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-10 07:00:08 +01:00
Migration: finish modules support
This commit is contained in:
+9
-1
@@ -68,6 +68,14 @@ void ffParseWMJsonObject(FFWMOptions* options, yyjson_val* module)
|
||||
}
|
||||
}
|
||||
|
||||
void ffGenerateWMJsonConfig(FFWMOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
__attribute__((__cleanup__(ffDestroyWMOptions))) FFWMOptions defaultOptions;
|
||||
ffInitWMOptions(&defaultOptions);
|
||||
|
||||
ffJsonConfigGenerateModuleArgsConfig(doc, module, &defaultOptions.moduleArgs, &options->moduleArgs);
|
||||
}
|
||||
|
||||
void ffGenerateWMJsonResult(FF_MAYBE_UNUSED FFWMOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module)
|
||||
{
|
||||
const FFDisplayServerResult* result = ffConnectDisplayServer();
|
||||
@@ -102,7 +110,7 @@ void ffInitWMOptions(FFWMOptions* options)
|
||||
ffPrintWM,
|
||||
ffGenerateWMJsonResult,
|
||||
ffPrintWMHelpFormat,
|
||||
NULL
|
||||
ffGenerateWMJsonConfig
|
||||
);
|
||||
ffOptionInitModuleArg(&options->moduleArgs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user