mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-09 06:30:10 +01:00
Logo: adds option logo.position: auto
This commit is contained in:
+9
-2
@@ -854,9 +854,16 @@ static void writeConfigFile(FFdata* data) {
|
||||
} else if (data->genConfigInteractive) {
|
||||
if (instance.config.logo.type == FF_LOGO_TYPE_NONE) {
|
||||
yyjson_mut_obj_add_null(doc, root, "logo");
|
||||
} else if (instance.config.logo.type == FF_LOGO_TYPE_SMALL) {
|
||||
} else if (instance.config.logo.type == FF_LOGO_TYPE_SMALL && instance.config.logo.position == FF_LOGO_POSITION_LEFT) {
|
||||
yyjson_mut_obj_add_str(doc, root, "logo", "small");
|
||||
} else if (instance.config.logo.position != FF_LOGO_POSITION_LEFT || instance.config.logo.type == FF_LOGO_TYPE_SMALL) {
|
||||
yyjson_mut_val* logo = yyjson_mut_obj(doc);
|
||||
yyjson_mut_obj_add_str(doc, logo, "type", "small");
|
||||
if (instance.config.logo.type == FF_LOGO_TYPE_SMALL) {
|
||||
yyjson_mut_obj_add_str(doc, logo, "type", "small");
|
||||
}
|
||||
if (instance.config.logo.position != FF_LOGO_POSITION_LEFT) {
|
||||
yyjson_mut_obj_add_str(doc, logo, "position", ffLogoPositionToString(instance.config.logo.position));
|
||||
}
|
||||
yyjson_mut_obj_add_val(doc, root, "logo", logo);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user