mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-09 14:40:10 +01:00
Display: add option --ts-version to hide terminal and shell version
This commit is contained in:
@@ -189,10 +189,8 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va
|
||||
options->noBuffer = yyjson_get_bool(val);
|
||||
else if (ffStrEqualsIgnCase(key, "keyWidth"))
|
||||
options->keyWidth = (uint32_t) yyjson_get_uint(val);
|
||||
else if (ffStrStartsWithIgnCase(key, "percent"))
|
||||
return "Property `display.percentX` has been changed to `display.percent.x`";
|
||||
else if (ffStrStartsWithIgnCase(key, "size"))
|
||||
return "Property `display.sizeX` has been changed to `display.size.x`";
|
||||
else if (ffStrEndsWithIgnCase(key, "tsVersion"))
|
||||
options->tsVersion = yyjson_get_bool(val);
|
||||
else
|
||||
return "Unknown display property";
|
||||
}
|
||||
@@ -337,6 +335,8 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else if(ffStrEqualsIgnCase(key, "--ts-version"))
|
||||
options->tsVersion = ffOptionParseBoolean(value);
|
||||
else
|
||||
return false;
|
||||
return true;
|
||||
@@ -382,6 +382,8 @@ void ffOptionsInitDisplay(FFOptionsDisplay* options)
|
||||
ffStrbufInitStatic(&options->percentColorGreen, FF_COLOR_FG_GREEN);
|
||||
ffStrbufInitStatic(&options->percentColorYellow, FF_COLOR_FG_LIGHT_YELLOW);
|
||||
ffStrbufInitStatic(&options->percentColorRed, FF_COLOR_FG_LIGHT_RED);
|
||||
|
||||
options->tsVersion = true;
|
||||
}
|
||||
|
||||
void ffOptionsDestroyDisplay(FFOptionsDisplay* options)
|
||||
|
||||
@@ -50,6 +50,7 @@ typedef struct FFOptionsDisplay
|
||||
FFstrbuf percentColorRed;
|
||||
bool noBuffer;
|
||||
uint32_t keyWidth;
|
||||
bool tsVersion;
|
||||
} FFOptionsDisplay;
|
||||
|
||||
const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_val* root);
|
||||
|
||||
Reference in New Issue
Block a user