mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-28 15:53:51 +01:00
Style: adds Cpp11BracedListStyle: Block
This commit is contained in:
@@ -236,8 +236,8 @@ bool ffGenerateBatteryJsonResult(FFBatteryOptions* options, yyjson_mut_doc* doc,
|
||||
void ffInitBatteryOptions(FFBatteryOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
options->temp = false;
|
||||
options->tempConfig = (FFColorRangeConfig) {60, 80};
|
||||
options->percent = (FFPercentageModuleConfig) {50, 20, 0};
|
||||
options->tempConfig = (FFColorRangeConfig) { 60, 80 };
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 20, 0 };
|
||||
|
||||
#ifdef _WIN32
|
||||
options->useSetupApi = false;
|
||||
@@ -258,20 +258,20 @@ FFModuleBaseInfo ffBatteryModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateBatteryJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateBatteryJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Battery manufacturer", "manufacturer"},
|
||||
{"Battery model name", "model-name"},
|
||||
{"Battery technology", "technology"},
|
||||
{"Battery capacity (percentage num)", "capacity"},
|
||||
{"Battery status", "status"},
|
||||
{"Battery temperature (formatted)", "temperature"},
|
||||
{"Battery cycle count", "cycle-count"},
|
||||
{"Battery serial number", "serial"},
|
||||
{"Battery manufactor date", "manufacture-date"},
|
||||
{"Battery capacity (percentage bar)", "capacity-bar"},
|
||||
{"Battery time remaining days", "time-days"},
|
||||
{"Battery time remaining hours", "time-hours"},
|
||||
{"Battery time remaining minutes", "time-minutes"},
|
||||
{"Battery time remaining seconds", "time-seconds"},
|
||||
{"Battery time remaining (formatted)", "time-formatted"},
|
||||
{ "Battery manufacturer", "manufacturer" },
|
||||
{ "Battery model name", "model-name" },
|
||||
{ "Battery technology", "technology" },
|
||||
{ "Battery capacity (percentage num)", "capacity" },
|
||||
{ "Battery status", "status" },
|
||||
{ "Battery temperature (formatted)", "temperature" },
|
||||
{ "Battery cycle count", "cycle-count" },
|
||||
{ "Battery serial number", "serial" },
|
||||
{ "Battery manufactor date", "manufacture-date" },
|
||||
{ "Battery capacity (percentage bar)", "capacity-bar" },
|
||||
{ "Battery time remaining days", "time-days" },
|
||||
{ "Battery time remaining hours", "time-hours" },
|
||||
{ "Battery time remaining minutes", "time-minutes" },
|
||||
{ "Battery time remaining seconds", "time-seconds" },
|
||||
{ "Battery time remaining (formatted)", "time-formatted" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -139,10 +139,10 @@ FFModuleBaseInfo ffBiosModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateBiosJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateBiosJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Bios date", "date"},
|
||||
{"Bios release", "release"},
|
||||
{"Bios vendor", "vendor"},
|
||||
{"Bios version", "version"},
|
||||
{"Firmware type", "type"},
|
||||
{ "Bios date", "date" },
|
||||
{ "Bios release", "release" },
|
||||
{ "Bios vendor", "vendor" },
|
||||
{ "Bios version", "version" },
|
||||
{ "Firmware type", "type" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -151,7 +151,7 @@ bool ffGenerateBluetoothJsonResult(FFBluetoothOptions* options, yyjson_mut_doc*
|
||||
void ffInitBluetoothOptions(FFBluetoothOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
options->showDisconnected = false;
|
||||
options->percent = (FFPercentageModuleConfig) {50, 20, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 20, 0 };
|
||||
}
|
||||
|
||||
void ffDestroyBluetoothOptions(FFBluetoothOptions* options) {
|
||||
@@ -168,11 +168,11 @@ FFModuleBaseInfo ffBluetoothModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateBluetoothJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateBluetoothJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Name", "name"},
|
||||
{"Address", "address"},
|
||||
{"Type", "type"},
|
||||
{"Battery percentage number", "battery-percentage"},
|
||||
{"Is connected", "connected"},
|
||||
{"Battery percentage bar", "battery-percentage-bar"},
|
||||
{ "Name", "name" },
|
||||
{ "Address", "address" },
|
||||
{ "Type", "type" },
|
||||
{ "Battery percentage number", "battery-percentage" },
|
||||
{ "Is connected", "connected" },
|
||||
{ "Battery percentage bar", "battery-percentage-bar" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -197,13 +197,13 @@ FFModuleBaseInfo ffBluetoothRadioModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateBluetoothRadioJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateBluetoothRadioJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Radio name for discovering", "name"},
|
||||
{"Address", "address"},
|
||||
{"LMP version", "lmp-version"},
|
||||
{"LMP subversion", "lmp-subversion"},
|
||||
{"Bluetooth version", "version"},
|
||||
{"Vendor", "vendor"},
|
||||
{"Discoverable", "discoverable"},
|
||||
{"Connectable / Pairable", "connectable"},
|
||||
{ "Radio name for discovering", "name" },
|
||||
{ "Address", "address" },
|
||||
{ "LMP version", "lmp-version" },
|
||||
{ "LMP subversion", "lmp-subversion" },
|
||||
{ "Bluetooth version", "version" },
|
||||
{ "Vendor", "vendor" },
|
||||
{ "Discoverable", "discoverable" },
|
||||
{ "Connectable / Pairable", "connectable" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -117,9 +117,9 @@ FFModuleBaseInfo ffBoardModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateBoardJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateBoardJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Board name", "name"},
|
||||
{"Board vendor", "vendor"},
|
||||
{"Board version", "version"},
|
||||
{"Board serial number", "serial"},
|
||||
{ "Board name", "name" },
|
||||
{ "Board vendor", "vendor" },
|
||||
{ "Board version", "version" },
|
||||
{ "Board serial number", "serial" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -112,10 +112,10 @@ FFModuleBaseInfo ffBootmgrModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateBootmgrJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateBootmgrJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Name / description", "name"},
|
||||
{"Firmware file path", "firmware-path"},
|
||||
{"Firmware file name", "firmware-name"},
|
||||
{"Is secure boot enabled", "secure-boot"},
|
||||
{"Boot order", "order"},
|
||||
{ "Name / description", "name" },
|
||||
{ "Firmware file path", "firmware-path" },
|
||||
{ "Firmware file name", "firmware-name" },
|
||||
{ "Is secure boot enabled", "secure-boot" },
|
||||
{ "Boot order", "order" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -173,7 +173,7 @@ void ffInitBrightnessOptions(FFBrightnessOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
|
||||
options->ddcciSleep = 10;
|
||||
options->percent = (FFPercentageModuleConfig) {100, 100, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 100, 100, 0 };
|
||||
options->compact = false;
|
||||
}
|
||||
|
||||
@@ -191,12 +191,12 @@ FFModuleBaseInfo ffBrightnessModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateBrightnessJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateBrightnessJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Screen brightness (percentage num)", "percentage"},
|
||||
{"Screen name", "name"},
|
||||
{"Maximum brightness value", "max"},
|
||||
{"Minimum brightness value", "min"},
|
||||
{"Current brightness value", "current"},
|
||||
{"Screen brightness (percentage bar)", "percentage-bar"},
|
||||
{"Is built-in screen", "is-builtin"},
|
||||
{ "Screen brightness (percentage num)", "percentage" },
|
||||
{ "Screen name", "name" },
|
||||
{ "Maximum brightness value", "max" },
|
||||
{ "Minimum brightness value", "min" },
|
||||
{ "Current brightness value", "current" },
|
||||
{ "Screen brightness (percentage bar)", "percentage-bar" },
|
||||
{ "Is built-in screen", "is-builtin" },
|
||||
}))
|
||||
};
|
||||
|
||||
+14
-14
@@ -190,7 +190,7 @@ bool ffGenerateBtrfsJsonResult(FF_MAYBE_UNUSED FFBtrfsOptions* options, yyjson_m
|
||||
|
||||
void ffInitBtrfsOptions(FFBtrfsOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
options->percent = (FFPercentageModuleConfig) {50, 80, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 80, 0 };
|
||||
}
|
||||
|
||||
void ffDestroyBtrfsOptions(FFBtrfsOptions* options) {
|
||||
@@ -207,18 +207,18 @@ FFModuleBaseInfo ffBtrfsModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateBtrfsJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateBtrfsJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Name / Label", "name"},
|
||||
{"UUID", "uuid"},
|
||||
{"Associated devices", "devices"},
|
||||
{"Enabled features", "features"},
|
||||
{"Size used", "used"},
|
||||
{"Size allocated", "allocated"},
|
||||
{"Size total", "total"},
|
||||
{"Used percentage num", "used-percentage"},
|
||||
{"Allocated percentage num", "allocated-percentage"},
|
||||
{"Used percentage bar", "used-percentage-bar"},
|
||||
{"Allocated percentage bar", "allocated-percentage-bar"},
|
||||
{"Node size", "node-size"},
|
||||
{"Sector size", "sector-size"},
|
||||
{ "Name / Label", "name" },
|
||||
{ "UUID", "uuid" },
|
||||
{ "Associated devices", "devices" },
|
||||
{ "Enabled features", "features" },
|
||||
{ "Size used", "used" },
|
||||
{ "Size allocated", "allocated" },
|
||||
{ "Size total", "total" },
|
||||
{ "Used percentage num", "used-percentage" },
|
||||
{ "Allocated percentage num", "allocated-percentage" },
|
||||
{ "Used percentage bar", "used-percentage-bar" },
|
||||
{ "Allocated percentage bar", "allocated-percentage-bar" },
|
||||
{ "Node size", "node-size" },
|
||||
{ "Sector size", "sector-size" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -124,11 +124,11 @@ FFModuleBaseInfo ffCameraModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateCameraJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateCameraJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Device name", "name"},
|
||||
{"Vendor", "vendor"},
|
||||
{"Color space", "colorspace"},
|
||||
{"Identifier", "id"},
|
||||
{"Width (in px)", "width"},
|
||||
{"Height (in px)", "height"},
|
||||
{ "Device name", "name" },
|
||||
{ "Vendor", "vendor" },
|
||||
{ "Color space", "colorspace" },
|
||||
{ "Identifier", "id" },
|
||||
{ "Width (in px)", "width" },
|
||||
{ "Height (in px)", "height" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -119,9 +119,9 @@ FFModuleBaseInfo ffChassisModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateChassisJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateChassisJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Chassis type", "type"},
|
||||
{"Chassis vendor", "vendor"},
|
||||
{"Chassis version", "version"},
|
||||
{"Chassis serial number", "serial"},
|
||||
{ "Chassis type", "type" },
|
||||
{ "Chassis vendor", "vendor" },
|
||||
{ "Chassis version", "version" },
|
||||
{ "Chassis serial number", "serial" },
|
||||
})),
|
||||
};
|
||||
|
||||
+11
-11
@@ -154,13 +154,13 @@ void ffParseColorsJsonObject(FFColorsOptions* options, yyjson_val* module) {
|
||||
if (unsafe_yyjson_equals_str(key, "symbol")) {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"block", FF_COLORS_SYMBOL_BLOCK},
|
||||
{"background", FF_COLORS_SYMBOL_BACKGROUND},
|
||||
{"circle", FF_COLORS_SYMBOL_CIRCLE},
|
||||
{"diamond", FF_COLORS_SYMBOL_DIAMOND},
|
||||
{"triangle", FF_COLORS_SYMBOL_TRIANGLE},
|
||||
{"square", FF_COLORS_SYMBOL_SQUARE},
|
||||
{"star", FF_COLORS_SYMBOL_STAR},
|
||||
{ "block", FF_COLORS_SYMBOL_BLOCK },
|
||||
{ "background", FF_COLORS_SYMBOL_BACKGROUND },
|
||||
{ "circle", FF_COLORS_SYMBOL_CIRCLE },
|
||||
{ "diamond", FF_COLORS_SYMBOL_DIAMOND },
|
||||
{ "triangle", FF_COLORS_SYMBOL_TRIANGLE },
|
||||
{ "square", FF_COLORS_SYMBOL_SQUARE },
|
||||
{ "star", FF_COLORS_SYMBOL_STAR },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -209,9 +209,9 @@ void ffParseColorsJsonObject(FFColorsOptions* options, yyjson_val* module) {
|
||||
if (unsafe_yyjson_equals_str(key, "brightness")) {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"default", FF_COLORS_BRIGHTNESS_DEFAULT},
|
||||
{"normal", FF_COLORS_BRIGHTNESS_NORMAL},
|
||||
{"light", FF_COLORS_BRIGHTNESS_LIGHT},
|
||||
{ "default", FF_COLORS_BRIGHTNESS_DEFAULT },
|
||||
{ "normal", FF_COLORS_BRIGHTNESS_NORMAL },
|
||||
{ "light", FF_COLORS_BRIGHTNESS_LIGHT },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -273,7 +273,7 @@ void ffInitColorsOptions(FFColorsOptions* options) {
|
||||
options->paddingLeft = 0;
|
||||
options->block = (FFBlockConfig) {
|
||||
.width = 3,
|
||||
.range = {0, 15},
|
||||
.range = { 0, 15 },
|
||||
};
|
||||
options->brightness = FF_COLORS_BRIGHTNESS_DEFAULT;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ bool ffPrintCommand(FFCommandOptions* options) {
|
||||
ffPrintLogoAndKey(FF_COMMAND_MODULE_NAME, ++index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
|
||||
puts(line);
|
||||
} else {
|
||||
FF_PRINT_FORMAT_CHECKED(FF_COMMAND_MODULE_NAME, ++index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) {FF_ARG(line, "result")}));
|
||||
FF_PRINT_FORMAT_CHECKED(FF_COMMAND_MODULE_NAME, ++index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { FF_ARG(line, "result") }));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -34,7 +34,7 @@ bool ffPrintCommand(FFCommandOptions* options) {
|
||||
ffPrintLogoAndKey(FF_COMMAND_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
|
||||
ffStrbufPutTo(&result, stdout);
|
||||
} else {
|
||||
FF_PRINT_FORMAT_CHECKED(FF_COMMAND_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) {FF_ARG(result, "result")}));
|
||||
FF_PRINT_FORMAT_CHECKED(FF_COMMAND_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { FF_ARG(result, "result") }));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -162,6 +162,6 @@ FFModuleBaseInfo ffCommandModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateCommandJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateCommandJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Command result", "result"},
|
||||
{ "Command result", "result" },
|
||||
}))
|
||||
};
|
||||
|
||||
+13
-13
@@ -225,7 +225,7 @@ void ffInitCPUOptions(FFCPUOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
ffStrbufInit(&options->tempSensor);
|
||||
options->temp = false;
|
||||
options->tempConfig = (FFColorRangeConfig) {60, 80};
|
||||
options->tempConfig = (FFColorRangeConfig) { 60, 80 };
|
||||
options->showPeCoreCount = false;
|
||||
}
|
||||
|
||||
@@ -244,17 +244,17 @@ FFModuleBaseInfo ffCPUModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateCPUJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateCPUJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Name", "name"},
|
||||
{"Vendor", "vendor"},
|
||||
{"Physical core count", "cores-physical"},
|
||||
{"Logical core count", "cores-logical"},
|
||||
{"Online core count", "cores-online"},
|
||||
{"Base frequency (formatted)", "freq-base"},
|
||||
{"Max frequency (formatted)", "freq-max"},
|
||||
{"Temperature (formatted)", "temperature"},
|
||||
{"Logical core count grouped by frequency", "core-types"},
|
||||
{"Processor package count", "packages"},
|
||||
{"CPU microarchitecture", "march"},
|
||||
{"NUMA node count", "numa-nodes"},
|
||||
{ "Name", "name" },
|
||||
{ "Vendor", "vendor" },
|
||||
{ "Physical core count", "cores-physical" },
|
||||
{ "Logical core count", "cores-logical" },
|
||||
{ "Online core count", "cores-online" },
|
||||
{ "Base frequency (formatted)", "freq-base" },
|
||||
{ "Max frequency (formatted)", "freq-max" },
|
||||
{ "Temperature (formatted)", "temperature" },
|
||||
{ "Logical core count grouped by frequency", "core-types" },
|
||||
{ "Processor package count", "packages" },
|
||||
{ "CPU microarchitecture", "march" },
|
||||
{ "NUMA node count", "numa-nodes" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -232,7 +232,7 @@ FFModuleBaseInfo ffCPUCacheModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateCPUCacheJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateCPUCacheJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Separate result", "result"},
|
||||
{"Sum result", "sum"},
|
||||
{ "Separate result", "result" },
|
||||
{ "Sum result", "sum" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -172,7 +172,7 @@ bool ffGenerateCPUUsageJsonResult(FFCPUUsageOptions* options, yyjson_mut_doc* do
|
||||
void ffInitCPUUsageOptions(FFCPUUsageOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
options->separate = false;
|
||||
options->percent = (FFPercentageModuleConfig) {50, 80, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 80, 0 };
|
||||
options->waitTime = 200;
|
||||
}
|
||||
|
||||
@@ -190,13 +190,13 @@ FFModuleBaseInfo ffCPUUsageModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateCPUUsageJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateCPUUsageJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"CPU usage (percentage num, average)", "avg"},
|
||||
{"CPU usage (percentage num, maximum)", "max"},
|
||||
{"CPU core index of maximum usage", "max-index"},
|
||||
{"CPU usage (percentage num, minimum)", "min"},
|
||||
{"CPU core index of minimum usage", "min-index"},
|
||||
{"CPU usage (percentage bar, average)", "avg-bar"},
|
||||
{"CPU usage (percentage bar, maximum)", "max-bar"},
|
||||
{"CPU usage (percentage bar, minimum)", "min-bar"},
|
||||
{ "CPU usage (percentage num, average)", "avg" },
|
||||
{ "CPU usage (percentage num, maximum)", "max" },
|
||||
{ "CPU core index of maximum usage", "max-index" },
|
||||
{ "CPU usage (percentage num, minimum)", "min" },
|
||||
{ "CPU core index of minimum usage", "min-index" },
|
||||
{ "CPU usage (percentage bar, average)", "avg-bar" },
|
||||
{ "CPU usage (percentage bar, maximum)", "max-bar" },
|
||||
{ "CPU usage (percentage bar, minimum)", "min-bar" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -109,7 +109,7 @@ FFModuleBaseInfo ffCursorModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateCursorJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateCursorJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Cursor theme", "theme"},
|
||||
{"Cursor size", "size"},
|
||||
{ "Cursor theme", "theme" },
|
||||
{ "Cursor size", "size" },
|
||||
})),
|
||||
};
|
||||
|
||||
@@ -153,28 +153,28 @@ FFModuleBaseInfo ffDateTimeModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateDateTimeJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateDateTimeJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Year", "year"},
|
||||
{"Last two digits of year", "year-short"},
|
||||
{"Month", "month"},
|
||||
{"Month with leading zero", "month-pretty"},
|
||||
{"Month name", "month-name"},
|
||||
{"Month name short", "month-name-short"},
|
||||
{"Week number on year", "week"},
|
||||
{"Weekday", "weekday"},
|
||||
{"Weekday short", "weekday-short"},
|
||||
{"Day in year", "day-in-year"},
|
||||
{"Day in month", "day-in-month"},
|
||||
{"Day in week", "day-in-week"},
|
||||
{"Hour", "hour"},
|
||||
{"Hour with leading zero", "hour-pretty"},
|
||||
{"Hour 12h format", "hour-12"},
|
||||
{"Hour 12h format with leading zero", "hour-12-pretty"},
|
||||
{"Minute", "minute"},
|
||||
{"Minute with leading zero", "minute-pretty"},
|
||||
{"Second", "second"},
|
||||
{"Second with leading zero", "second-pretty"},
|
||||
{"Offset from UTC in the ISO 8601 format", "offset-from-utc"},
|
||||
{"Locale-dependent timezone name or abbreviation", "timezone-name"},
|
||||
{"Day in month with leading zero", "day-pretty"},
|
||||
{ "Year", "year" },
|
||||
{ "Last two digits of year", "year-short" },
|
||||
{ "Month", "month" },
|
||||
{ "Month with leading zero", "month-pretty" },
|
||||
{ "Month name", "month-name" },
|
||||
{ "Month name short", "month-name-short" },
|
||||
{ "Week number on year", "week" },
|
||||
{ "Weekday", "weekday" },
|
||||
{ "Weekday short", "weekday-short" },
|
||||
{ "Day in year", "day-in-year" },
|
||||
{ "Day in month", "day-in-month" },
|
||||
{ "Day in week", "day-in-week" },
|
||||
{ "Hour", "hour" },
|
||||
{ "Hour with leading zero", "hour-pretty" },
|
||||
{ "Hour 12h format", "hour-12" },
|
||||
{ "Hour 12h format with leading zero", "hour-12-pretty" },
|
||||
{ "Minute", "minute" },
|
||||
{ "Minute with leading zero", "minute-pretty" },
|
||||
{ "Second", "second" },
|
||||
{ "Second with leading zero", "second-pretty" },
|
||||
{ "Offset from UTC in the ISO 8601 format", "offset-from-utc" },
|
||||
{ "Locale-dependent timezone name or abbreviation", "timezone-name" },
|
||||
{ "Day in month with leading zero", "day-pretty" },
|
||||
}))
|
||||
};
|
||||
|
||||
+4
-4
@@ -28,7 +28,7 @@ bool ffPrintDE(FFDEOptions* options) {
|
||||
|
||||
putchar('\n');
|
||||
} else {
|
||||
FF_PRINT_FORMAT_CHECKED(FF_DE_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) {FF_ARG(result->deProcessName, "process-name"), FF_ARG(result->dePrettyName, "pretty-name"), FF_ARG(version, "version")}));
|
||||
FF_PRINT_FORMAT_CHECKED(FF_DE_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { FF_ARG(result->deProcessName, "process-name"), FF_ARG(result->dePrettyName, "pretty-name"), FF_ARG(version, "version") }));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -91,8 +91,8 @@ FFModuleBaseInfo ffDEModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateDEJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateDEJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"DE process name", "process-name"},
|
||||
{"DE pretty name", "pretty-name"},
|
||||
{"DE version", "version"},
|
||||
{ "DE process name", "process-name" },
|
||||
{ "DE pretty name", "pretty-name" },
|
||||
{ "DE version", "version" },
|
||||
}))
|
||||
};
|
||||
|
||||
+28
-28
@@ -163,7 +163,7 @@ static void printDisk(FFDiskOptions* options, const FFDisk* disk, uint32_t index
|
||||
FF_ARG(disk->filesystem, "filesystem"),
|
||||
FF_ARG(disk->name, "name"),
|
||||
FF_ARG(isReadOnly, "is-readonly"),
|
||||
{FF_ARG_TYPE_STRING, ffTimeToShortStr(disk->createTime), "create-time"},
|
||||
{ FF_ARG_TYPE_STRING, ffTimeToShortStr(disk->createTime), "create-time" },
|
||||
FF_ARG(bytesPercentageBar, "size-percentage-bar"),
|
||||
FF_ARG(filesPercentageBar, "files-percentage-bar"),
|
||||
FF_ARG(days, "days"),
|
||||
@@ -440,7 +440,7 @@ void ffInitDiskOptions(FFDiskOptions* options) {
|
||||
ffStrbufInit(&options->hideFS);
|
||||
options->showTypes = FF_DISK_VOLUME_TYPE_REGULAR_BIT | FF_DISK_VOLUME_TYPE_EXTERNAL_BIT | FF_DISK_VOLUME_TYPE_READONLY_BIT;
|
||||
options->calcType = FF_DISK_CALC_TYPE_FREE;
|
||||
options->percent = (FFPercentageModuleConfig) {50, 80, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 80, 0 };
|
||||
}
|
||||
|
||||
void ffDestroyDiskOptions(FFDiskOptions* options) {
|
||||
@@ -460,31 +460,31 @@ FFModuleBaseInfo ffDiskModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateDiskJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateDiskJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Size used", "size-used"},
|
||||
{"Size total", "size-total"},
|
||||
{"Size percentage num", "size-percentage"},
|
||||
{"Files used", "files-used"},
|
||||
{"Files total", "files-total"},
|
||||
{"Files percentage num", "files-percentage"},
|
||||
{"True if external volume", "is-external"},
|
||||
{"True if hidden volume", "is-hidden"},
|
||||
{"Filesystem", "filesystem"},
|
||||
{"Label / name", "name"},
|
||||
{"True if read-only", "is-readonly"},
|
||||
{"Create time in local timezone", "create-time"},
|
||||
{"Size percentage bar", "size-percentage-bar"},
|
||||
{"Files percentage bar", "files-percentage-bar"},
|
||||
{"Days after creation", "days"},
|
||||
{"Hours after creation", "hours"},
|
||||
{"Minutes after creation", "minutes"},
|
||||
{"Seconds after creation", "seconds"},
|
||||
{"Milliseconds after creation", "milliseconds"},
|
||||
{"Mount point / drive letter", "mountpoint"},
|
||||
{"Mount from (device path)", "mount-from"},
|
||||
{"Years integer after creation", "years"},
|
||||
{"Days of year after creation", "days-of-year"},
|
||||
{"Years fraction after creation", "years-fraction"},
|
||||
{"Size free", "size-free"},
|
||||
{"Size available", "size-available"},
|
||||
{ "Size used", "size-used" },
|
||||
{ "Size total", "size-total" },
|
||||
{ "Size percentage num", "size-percentage" },
|
||||
{ "Files used", "files-used" },
|
||||
{ "Files total", "files-total" },
|
||||
{ "Files percentage num", "files-percentage" },
|
||||
{ "True if external volume", "is-external" },
|
||||
{ "True if hidden volume", "is-hidden" },
|
||||
{ "Filesystem", "filesystem" },
|
||||
{ "Label / name", "name" },
|
||||
{ "True if read-only", "is-readonly" },
|
||||
{ "Create time in local timezone", "create-time" },
|
||||
{ "Size percentage bar", "size-percentage-bar" },
|
||||
{ "Files percentage bar", "files-percentage-bar" },
|
||||
{ "Days after creation", "days" },
|
||||
{ "Hours after creation", "hours" },
|
||||
{ "Minutes after creation", "minutes" },
|
||||
{ "Seconds after creation", "seconds" },
|
||||
{ "Milliseconds after creation", "milliseconds" },
|
||||
{ "Mount point / drive letter", "mountpoint" },
|
||||
{ "Mount from (device path)", "mount-from" },
|
||||
{ "Years integer after creation", "years" },
|
||||
{ "Days of year after creation", "days-of-year" },
|
||||
{ "Years fraction after creation", "years-fraction" },
|
||||
{ "Size free", "size-free" },
|
||||
{ "Size available", "size-available" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -181,13 +181,13 @@ FFModuleBaseInfo ffDiskIOModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateDiskIOJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateDiskIOJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Size of data read [per second] (formatted)", "size-read"},
|
||||
{"Size of data written [per second] (formatted)", "size-written"},
|
||||
{"Device name", "name"},
|
||||
{"Device raw file path", "dev-path"},
|
||||
{"Size of data read [per second] (in bytes)", "bytes-read"},
|
||||
{"Size of data written [per second] (in bytes)", "bytes-written"},
|
||||
{"Number of reads", "read-count"},
|
||||
{"Number of writes", "write-count"},
|
||||
{ "Size of data read [per second] (formatted)", "size-read" },
|
||||
{ "Size of data written [per second] (formatted)", "size-written" },
|
||||
{ "Device name", "name" },
|
||||
{ "Device raw file path", "dev-path" },
|
||||
{ "Size of data read [per second] (in bytes)", "bytes-read" },
|
||||
{ "Size of data written [per second] (in bytes)", "bytes-written" },
|
||||
{ "Number of reads", "read-count" },
|
||||
{ "Number of writes", "write-count" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -221,11 +221,11 @@ void ffParseDisplayJsonObject(FFDisplayOptions* options, yyjson_val* module) {
|
||||
} else {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"none", FF_DISPLAY_COMPACT_TYPE_NONE},
|
||||
{"original", FF_DISPLAY_COMPACT_TYPE_ORIGINAL_BIT},
|
||||
{"scaled", FF_DISPLAY_COMPACT_TYPE_SCALED_BIT},
|
||||
{"original-with-refresh-rate", FF_DISPLAY_COMPACT_TYPE_ORIGINAL_BIT | FF_DISPLAY_COMPACT_TYPE_REFRESH_RATE_BIT},
|
||||
{"scaled-with-refresh-rate", FF_DISPLAY_COMPACT_TYPE_SCALED_BIT | FF_DISPLAY_COMPACT_TYPE_REFRESH_RATE_BIT},
|
||||
{ "none", FF_DISPLAY_COMPACT_TYPE_NONE },
|
||||
{ "original", FF_DISPLAY_COMPACT_TYPE_ORIGINAL_BIT },
|
||||
{ "scaled", FF_DISPLAY_COMPACT_TYPE_SCALED_BIT },
|
||||
{ "original-with-refresh-rate", FF_DISPLAY_COMPACT_TYPE_ORIGINAL_BIT | FF_DISPLAY_COMPACT_TYPE_REFRESH_RATE_BIT },
|
||||
{ "scaled-with-refresh-rate", FF_DISPLAY_COMPACT_TYPE_SCALED_BIT | FF_DISPLAY_COMPACT_TYPE_REFRESH_RATE_BIT },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -248,9 +248,9 @@ void ffParseDisplayJsonObject(FFDisplayOptions* options, yyjson_val* module) {
|
||||
} else {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"asc", FF_DISPLAY_ORDER_ASC},
|
||||
{"desc", FF_DISPLAY_ORDER_DESC},
|
||||
{"none", FF_DISPLAY_ORDER_NONE},
|
||||
{ "asc", FF_DISPLAY_ORDER_ASC },
|
||||
{ "desc", FF_DISPLAY_ORDER_DESC },
|
||||
{ "none", FF_DISPLAY_ORDER_NONE },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -428,30 +428,30 @@ FFModuleBaseInfo ffDisplayModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateDisplayJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateDisplayJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Screen configured width (in pixels)", "width"},
|
||||
{"Screen configured height (in pixels)", "height"},
|
||||
{"Screen configured refresh rate (in Hz)", "refresh-rate"},
|
||||
{"Screen scaled width (in pixels)", "scaled-width"},
|
||||
{"Screen scaled height (in pixels)", "scaled-height"},
|
||||
{"Screen name", "name"},
|
||||
{"Screen type (Built-in or External)", "type"},
|
||||
{"Screen rotation (in degrees)", "rotation"},
|
||||
{"True if being the primary screen", "is-primary"},
|
||||
{"Screen physical width (in millimeters)", "physical-width"},
|
||||
{"Screen physical height (in millimeters)", "physical-height"},
|
||||
{"Physical diagonal length in inches", "inch"},
|
||||
{"Pixels per inch (PPI)", "ppi"},
|
||||
{"Bits per color channel", "bit-depth"},
|
||||
{"True if high dynamic range (HDR) mode is enabled", "hdr-enabled"},
|
||||
{"Year of manufacturing", "manufacture-year"},
|
||||
{"Nth week of manufacturing in the year", "manufacture-week"},
|
||||
{"Serial number", "serial"},
|
||||
{"The platform API used when detecting the display", "platform-api"},
|
||||
{"True if the display is HDR compatible", "hdr-compatible"},
|
||||
{"HiDPI scale factor", "scale-factor"},
|
||||
{"Screen preferred width (in pixels)", "preferred-width"},
|
||||
{"Screen preferred height (in pixels)", "preferred-height"},
|
||||
{"Screen preferred refresh rate (in Hz)", "preferred-refresh-rate"},
|
||||
{"DPI", "dpi"},
|
||||
{ "Screen configured width (in pixels)", "width" },
|
||||
{ "Screen configured height (in pixels)", "height" },
|
||||
{ "Screen configured refresh rate (in Hz)", "refresh-rate" },
|
||||
{ "Screen scaled width (in pixels)", "scaled-width" },
|
||||
{ "Screen scaled height (in pixels)", "scaled-height" },
|
||||
{ "Screen name", "name" },
|
||||
{ "Screen type (Built-in or External)", "type" },
|
||||
{ "Screen rotation (in degrees)", "rotation" },
|
||||
{ "True if being the primary screen", "is-primary" },
|
||||
{ "Screen physical width (in millimeters)", "physical-width" },
|
||||
{ "Screen physical height (in millimeters)", "physical-height" },
|
||||
{ "Physical diagonal length in inches", "inch" },
|
||||
{ "Pixels per inch (PPI)", "ppi" },
|
||||
{ "Bits per color channel", "bit-depth" },
|
||||
{ "True if high dynamic range (HDR) mode is enabled", "hdr-enabled" },
|
||||
{ "Year of manufacturing", "manufacture-year" },
|
||||
{ "Nth week of manufacturing in the year", "manufacture-week" },
|
||||
{ "Serial number", "serial" },
|
||||
{ "The platform API used when detecting the display", "platform-api" },
|
||||
{ "True if the display is HDR compatible", "hdr-compatible" },
|
||||
{ "HiDPI scale factor", "scale-factor" },
|
||||
{ "Screen preferred width (in pixels)", "preferred-width" },
|
||||
{ "Screen preferred height (in pixels)", "preferred-height" },
|
||||
{ "Screen preferred refresh rate (in Hz)", "preferred-refresh-rate" },
|
||||
{ "DPI", "dpi" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -67,9 +67,9 @@ void ffParseDNSJsonObject(FFDNSOptions* options, yyjson_val* module) {
|
||||
if (unsafe_yyjson_equals_str(key, "showType")) {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"both", FF_DNS_TYPE_BOTH},
|
||||
{"ipv4", FF_DNS_TYPE_IPV4_BIT},
|
||||
{"ipv6", FF_DNS_TYPE_IPV6_BIT},
|
||||
{ "both", FF_DNS_TYPE_BOTH },
|
||||
{ "ipv4", FF_DNS_TYPE_IPV4_BIT },
|
||||
{ "ipv6", FF_DNS_TYPE_IPV6_BIT },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -143,6 +143,6 @@ FFModuleBaseInfo ffDNSModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateDNSJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateDNSJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"DNS result", "result"},
|
||||
{ "DNS result", "result" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -112,10 +112,10 @@ FFModuleBaseInfo ffEditorModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateEditorJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateEditorJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Type (Visual / Editor)", "type"},
|
||||
{"Name", "name"},
|
||||
{"Exe name of real path", "exe-name"},
|
||||
{"Full path of real path", "path"},
|
||||
{"Version", "version"},
|
||||
{ "Type (Visual / Editor)", "type" },
|
||||
{ "Name", "name" },
|
||||
{ "Exe name of real path", "exe-name" },
|
||||
{ "Full path of real path", "path" },
|
||||
{ "Version", "version" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -104,10 +104,10 @@ FFModuleBaseInfo ffFontModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateFontJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateFontJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Font 1", "font1"},
|
||||
{"Font 2", "font2"},
|
||||
{"Font 3", "font3"},
|
||||
{"Font 4", "font4"},
|
||||
{"Combined fonts for display", "combined"},
|
||||
{ "Font 1", "font1" },
|
||||
{ "Font 2", "font2" },
|
||||
{ "Font 3", "font3" },
|
||||
{ "Font 4", "font4" },
|
||||
{ "Combined fonts for display", "combined" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -176,7 +176,7 @@ void ffInitGamepadOptions(FFGamepadOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
|
||||
ffListInit(&options->ignores, sizeof(FFstrbuf));
|
||||
options->percent = (FFPercentageModuleConfig) {50, 20, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 20, 0 };
|
||||
}
|
||||
|
||||
void ffDestroyGamepadOptions(FFGamepadOptions* options) {
|
||||
@@ -198,9 +198,9 @@ FFModuleBaseInfo ffGamepadModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateGamepadJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateGamepadJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Name", "name"},
|
||||
{"Serial number", "serial"},
|
||||
{"Battery percentage num", "battery-percentage"},
|
||||
{"Battery percentage bar", "battery-percentage-bar"},
|
||||
{ "Name", "name" },
|
||||
{ "Serial number", "serial" },
|
||||
{ "Battery percentage num", "battery-percentage" },
|
||||
{ "Battery percentage bar", "battery-percentage-bar" },
|
||||
}))
|
||||
};
|
||||
|
||||
+31
-31
@@ -230,11 +230,11 @@ void ffParseGPUJsonObject(FFGPUOptions* options, yyjson_val* module) {
|
||||
if (unsafe_yyjson_equals_str(key, "detectionMethod")) {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"auto", FF_GPU_DETECTION_METHOD_AUTO},
|
||||
{"pci", FF_GPU_DETECTION_METHOD_PCI},
|
||||
{"vulkan", FF_GPU_DETECTION_METHOD_VULKAN},
|
||||
{"opencl", FF_GPU_DETECTION_METHOD_OPENCL},
|
||||
{"opengl", FF_GPU_DETECTION_METHOD_OPENGL},
|
||||
{ "auto", FF_GPU_DETECTION_METHOD_AUTO },
|
||||
{ "pci", FF_GPU_DETECTION_METHOD_PCI },
|
||||
{ "vulkan", FF_GPU_DETECTION_METHOD_VULKAN },
|
||||
{ "opencl", FF_GPU_DETECTION_METHOD_OPENCL },
|
||||
{ "opengl", FF_GPU_DETECTION_METHOD_OPENGL },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -251,10 +251,10 @@ void ffParseGPUJsonObject(FFGPUOptions* options, yyjson_val* module) {
|
||||
} else {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"none", FF_GPU_TYPE_NONE},
|
||||
{"unknown", FF_GPU_TYPE_UNKNOWN},
|
||||
{"integrated", FF_GPU_TYPE_INTEGRATED},
|
||||
{"discrete", FF_GPU_TYPE_DISCRETE},
|
||||
{ "none", FF_GPU_TYPE_NONE },
|
||||
{ "unknown", FF_GPU_TYPE_UNKNOWN },
|
||||
{ "integrated", FF_GPU_TYPE_INTEGRATED },
|
||||
{ "discrete", FF_GPU_TYPE_DISCRETE },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -444,8 +444,8 @@ void ffInitGPUOptions(FFGPUOptions* options) {
|
||||
;
|
||||
options->temp = false;
|
||||
options->hideType = FF_GPU_TYPE_NONE;
|
||||
options->tempConfig = (FFColorRangeConfig) {60, 80};
|
||||
options->percent = (FFPercentageModuleConfig) {50, 80, 0};
|
||||
options->tempConfig = (FFColorRangeConfig) { 60, 80 };
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 80, 0 };
|
||||
}
|
||||
|
||||
void ffDestroyGPUOptions(FFGPUOptions* options) {
|
||||
@@ -462,25 +462,25 @@ FFModuleBaseInfo ffGPUModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateGPUJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateGPUJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"GPU vendor", "vendor"},
|
||||
{"GPU name", "name"},
|
||||
{"GPU driver", "driver"},
|
||||
{"GPU temperature", "temperature"},
|
||||
{"GPU core count", "core-count"},
|
||||
{"GPU type", "type"},
|
||||
{"GPU total dedicated memory", "dedicated-total"},
|
||||
{"GPU used dedicated memory", "dedicated-used"},
|
||||
{"GPU total shared memory", "shared-total"},
|
||||
{"GPU used shared memory", "shared-used"},
|
||||
{"The platform API used when detecting the GPU", "platform-api"},
|
||||
{"Current frequency in GHz", "frequency"},
|
||||
{"GPU vendor specific index", "index"},
|
||||
{"Dedicated memory usage percentage num", "dedicated-percentage-num"},
|
||||
{"Dedicated memory usage percentage bar", "dedicated-percentage-bar"},
|
||||
{"Shared memory usage percentage num", "shared-percentage-num"},
|
||||
{"Shared memory usage percentage bar", "shared-percentage-bar"},
|
||||
{"Core usage percentage num", "core-usage-num"},
|
||||
{"Core usage percentage bar", "core-usage-bar"},
|
||||
{"Memory type (Windows only)", "memory-type"},
|
||||
{ "GPU vendor", "vendor" },
|
||||
{ "GPU name", "name" },
|
||||
{ "GPU driver", "driver" },
|
||||
{ "GPU temperature", "temperature" },
|
||||
{ "GPU core count", "core-count" },
|
||||
{ "GPU type", "type" },
|
||||
{ "GPU total dedicated memory", "dedicated-total" },
|
||||
{ "GPU used dedicated memory", "dedicated-used" },
|
||||
{ "GPU total shared memory", "shared-total" },
|
||||
{ "GPU used shared memory", "shared-used" },
|
||||
{ "The platform API used when detecting the GPU", "platform-api" },
|
||||
{ "Current frequency in GHz", "frequency" },
|
||||
{ "GPU vendor specific index", "index" },
|
||||
{ "Dedicated memory usage percentage num", "dedicated-percentage-num" },
|
||||
{ "Dedicated memory usage percentage bar", "dedicated-percentage-bar" },
|
||||
{ "Shared memory usage percentage num", "shared-percentage-num" },
|
||||
{ "Shared memory usage percentage bar", "shared-percentage-bar" },
|
||||
{ "Core usage percentage num", "core-usage-num" },
|
||||
{ "Core usage percentage bar", "core-usage-bar" },
|
||||
{ "Memory type (Windows only)", "memory-type" },
|
||||
})),
|
||||
};
|
||||
|
||||
@@ -145,12 +145,12 @@ FFModuleBaseInfo ffHostModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateHostJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateHostJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Product family", "family"},
|
||||
{"Product name", "name"},
|
||||
{"Product version", "version"},
|
||||
{"Product sku", "sku"},
|
||||
{"Product vendor", "vendor"},
|
||||
{"Product serial number", "serial"},
|
||||
{"Product uuid", "uuid"},
|
||||
{ "Product family", "family" },
|
||||
{ "Product name", "name" },
|
||||
{ "Product version", "version" },
|
||||
{ "Product sku", "sku" },
|
||||
{ "Product vendor", "vendor" },
|
||||
{ "Product serial number", "serial" },
|
||||
{ "Product uuid", "uuid" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -103,7 +103,7 @@ FFModuleBaseInfo ffIconsModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateIconsJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateIconsJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Icons part 1", "icons1"},
|
||||
{"Icons part 2", "icons2"},
|
||||
{ "Icons part 1", "icons1" },
|
||||
{ "Icons part 2", "icons2" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -112,9 +112,9 @@ FFModuleBaseInfo ffInitSystemModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateInitSystemJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateInitSystemJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Init system name", "name"},
|
||||
{"Init system exe path", "exe"},
|
||||
{"Init system version path", "version"},
|
||||
{"Init system pid", "pid"},
|
||||
{ "Init system name", "name" },
|
||||
{ "Init system exe path", "exe" },
|
||||
{ "Init system version path", "version" },
|
||||
{ "Init system pid", "pid" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -71,11 +71,11 @@ FFModuleBaseInfo ffKernelModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateKernelJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateKernelJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Sysname", "sysname"},
|
||||
{"Release", "release"},
|
||||
{"Version", "version"},
|
||||
{"Architecture", "arch"},
|
||||
{"Display version", "display-version"},
|
||||
{"Page size", "page-size"},
|
||||
{ "Sysname", "sysname" },
|
||||
{ "Release", "release" },
|
||||
{ "Version", "version" },
|
||||
{ "Architecture", "arch" },
|
||||
{ "Display version", "display-version" },
|
||||
{ "Page size", "page-size" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -158,7 +158,7 @@ FFModuleBaseInfo ffKeyboardModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateKeyboardJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateKeyboardJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Name", "name"},
|
||||
{"Serial number", "serial"},
|
||||
{ "Name", "name" },
|
||||
{ "Serial number", "serial" },
|
||||
}))
|
||||
};
|
||||
|
||||
+3
-3
@@ -115,8 +115,8 @@ FFModuleBaseInfo ffLMModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateLMJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateLMJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"LM service", "service"},
|
||||
{"LM type", "type"},
|
||||
{"LM version", "version"},
|
||||
{ "LM service", "service" },
|
||||
{ "LM type", "type" },
|
||||
{ "LM version", "version" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "modules/loadavg/loadavg.h"
|
||||
|
||||
bool ffPrintLoadavg(FFLoadavgOptions* options) {
|
||||
double result[3] = {0.0 / 0.0, 0.0 / 0.0, 0.0 / 0.0};
|
||||
double result[3] = { 0.0 / 0.0, 0.0 / 0.0, 0.0 / 0.0 };
|
||||
|
||||
const char* error = ffDetectLoadavg(result);
|
||||
if (error) {
|
||||
@@ -119,7 +119,7 @@ void ffGenerateLoadavgJsonConfig(FFLoadavgOptions* options, yyjson_mut_doc* doc,
|
||||
}
|
||||
|
||||
bool ffGenerateLoadavgJsonResult(FF_MAYBE_UNUSED FFLoadavgOptions* options, yyjson_mut_doc* doc, yyjson_mut_val* module) {
|
||||
double result[3] = {0.0 / 0.0, 0.0 / 0.0, 0.0 / 0.0};
|
||||
double result[3] = { 0.0 / 0.0, 0.0 / 0.0, 0.0 / 0.0 };
|
||||
|
||||
const char* error = ffDetectLoadavg(result);
|
||||
if (error) {
|
||||
@@ -138,7 +138,7 @@ bool ffGenerateLoadavgJsonResult(FF_MAYBE_UNUSED FFLoadavgOptions* options, yyjs
|
||||
void ffInitLoadavgOptions(FFLoadavgOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
|
||||
options->percent = (FFPercentageModuleConfig) {50, 80, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 80, 0 };
|
||||
options->ndigits = 2;
|
||||
options->compact = true;
|
||||
}
|
||||
@@ -157,8 +157,8 @@ FFModuleBaseInfo ffLoadavgModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateLoadavgJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateLoadavgJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Load average over 1min", "loadavg1"},
|
||||
{"Load average over 5min", "loadavg2"},
|
||||
{"Load average over 15min", "loadavg3"},
|
||||
{ "Load average over 1min", "loadavg1" },
|
||||
{ "Load average over 5min", "loadavg2" },
|
||||
{ "Load average over 15min", "loadavg3" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -16,7 +16,7 @@ bool ffPrintLocale(FFLocaleOptions* options) {
|
||||
ffPrintLogoAndKey(FF_LOCALE_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT);
|
||||
ffStrbufPutTo(&locale, stdout);
|
||||
} else {
|
||||
FF_PRINT_FORMAT_CHECKED(FF_LOCALE_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) {FF_ARG(locale, "result")}));
|
||||
FF_PRINT_FORMAT_CHECKED(FF_LOCALE_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { FF_ARG(locale, "result") }));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -76,6 +76,6 @@ FFModuleBaseInfo ffLocaleModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateLocaleJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateLocaleJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Locale code", "result"},
|
||||
{ "Locale code", "result" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -193,11 +193,11 @@ void ffParseLocalIpJsonObject(FFLocalIpOptions* options, yyjson_val* module) {
|
||||
} else if (yyjson_is_str(val)) {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"auto", FF_LOCALIP_IPV6_TYPE_AUTO},
|
||||
{"gua", FF_LOCALIP_IPV6_TYPE_GUA_BIT},
|
||||
{"ula", FF_LOCALIP_IPV6_TYPE_ULA_BIT},
|
||||
{"lla", FF_LOCALIP_IPV6_TYPE_LLA_BIT},
|
||||
{"unknown", FF_LOCALIP_IPV6_TYPE_UNKNOWN_BIT},
|
||||
{ "auto", FF_LOCALIP_IPV6_TYPE_AUTO },
|
||||
{ "gua", FF_LOCALIP_IPV6_TYPE_GUA_BIT },
|
||||
{ "ula", FF_LOCALIP_IPV6_TYPE_ULA_BIT },
|
||||
{ "lla", FF_LOCALIP_IPV6_TYPE_LLA_BIT },
|
||||
{ "unknown", FF_LOCALIP_IPV6_TYPE_UNKNOWN_BIT },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -431,13 +431,13 @@ FFModuleBaseInfo ffLocalIPModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateLocalIpJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateLocalIpJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"IPv4 address", "ipv4"},
|
||||
{"IPv6 address", "ipv6"},
|
||||
{"MAC address", "mac"},
|
||||
{"Interface name", "ifname"},
|
||||
{"Is default route", "is-default-route"},
|
||||
{"MTU size in bytes", "mtu"},
|
||||
{"Link speed (formatted)", "speed"},
|
||||
{"Interface flags", "flags"},
|
||||
{ "IPv4 address", "ipv4" },
|
||||
{ "IPv6 address", "ipv6" },
|
||||
{ "MAC address", "mac" },
|
||||
{ "Interface name", "ifname" },
|
||||
{ "Is default route", "is-default-route" },
|
||||
{ "MTU size in bytes", "mtu" },
|
||||
{ "Link speed (formatted)", "speed" },
|
||||
{ "Interface flags", "flags" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -190,10 +190,10 @@ FFModuleBaseInfo ffMediaModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateMediaJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateMediaJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Pretty media name", "combined"},
|
||||
{"Media name", "title"},
|
||||
{"Artist name", "artist"},
|
||||
{"Album name", "album"},
|
||||
{"Status", "status"},
|
||||
{ "Pretty media name", "combined" },
|
||||
{ "Media name", "title" },
|
||||
{ "Artist name", "artist" },
|
||||
{ "Album name", "album" },
|
||||
{ "Status", "status" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -110,7 +110,7 @@ bool ffGenerateMemoryJsonResult(FF_MAYBE_UNUSED FFMemoryOptions* options, yyjson
|
||||
|
||||
void ffInitMemoryOptions(FFMemoryOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
options->percent = (FFPercentageModuleConfig) {50, 80, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 80, 0 };
|
||||
}
|
||||
|
||||
void ffDestroyMemoryOptions(FFMemoryOptions* options) {
|
||||
@@ -127,9 +127,9 @@ FFModuleBaseInfo ffMemoryModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateMemoryJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateMemoryJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Used size", "used"},
|
||||
{"Total size", "total"},
|
||||
{"Percentage used (num)", "percentage"},
|
||||
{"Percentage used (bar)", "percentage-bar"},
|
||||
{ "Used size", "used" },
|
||||
{ "Total size", "total" },
|
||||
{ "Percentage used (num)", "percentage" },
|
||||
{ "Percentage used (bar)", "percentage-bar" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -121,17 +121,17 @@ FFModuleBaseInfo ffMonitorModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateMonitorJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateMonitorJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Display name", "name"},
|
||||
{"Native resolution width in pixels", "width"},
|
||||
{"Native resolution height in pixels", "height"},
|
||||
{"Physical width in millimeters", "physical-width"},
|
||||
{"Physical height in millimeters", "physical-height"},
|
||||
{"Physical diagonal length in inches", "inch"},
|
||||
{"Pixels per inch (PPI)", "ppi"},
|
||||
{"Year of manufacturing", "manufacture-year"},
|
||||
{"Nth week of manufacturing in the year", "manufacture-week"},
|
||||
{"Serial number", "serial"},
|
||||
{"Maximum refresh rate in Hz", "refresh-rate"},
|
||||
{"True if the display is HDR compatible", "hdr-compatible"},
|
||||
{ "Display name", "name" },
|
||||
{ "Native resolution width in pixels", "width" },
|
||||
{ "Native resolution height in pixels", "height" },
|
||||
{ "Physical width in millimeters", "physical-width" },
|
||||
{ "Physical height in millimeters", "physical-height" },
|
||||
{ "Physical diagonal length in inches", "inch" },
|
||||
{ "Pixels per inch (PPI)", "ppi" },
|
||||
{ "Year of manufacturing", "manufacture-year" },
|
||||
{ "Nth week of manufacturing in the year", "manufacture-week" },
|
||||
{ "Serial number", "serial" },
|
||||
{ "Maximum refresh rate in Hz", "refresh-rate" },
|
||||
{ "True if the display is HDR compatible", "hdr-compatible" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -161,7 +161,7 @@ FFModuleBaseInfo ffMouseModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateMouseJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateMouseJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Mouse name", "name"},
|
||||
{"Mouse serial number", "serial"},
|
||||
{ "Mouse name", "name" },
|
||||
{ "Mouse serial number", "serial" },
|
||||
}))
|
||||
};
|
||||
|
||||
+12
-12
@@ -208,17 +208,17 @@ FFModuleBaseInfo ffNetIOModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateNetIOJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateNetIOJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Size of data received [per second] (formatted)", "rx-size"},
|
||||
{"Size of data sent [per second] (formatted)", "tx-size"},
|
||||
{"Interface name", "ifname"},
|
||||
{"Is default route", "is-default-route"},
|
||||
{"Size of data received [per second] (in bytes)", "rx-bytes"},
|
||||
{"Size of data sent [per second] (in bytes)", "tx-bytes"},
|
||||
{"Number of packets received [per second]", "rx-packets"},
|
||||
{"Number of packets sent [per second]", "tx-packets"},
|
||||
{"Number of errors received [per second]", "rx-errors"},
|
||||
{"Number of errors sent [per second]", "tx-errors"},
|
||||
{"Number of packets dropped when receiving [per second]", "rx-drops"},
|
||||
{"Number of packets dropped when sending [per second]", "tx-drops"},
|
||||
{ "Size of data received [per second] (formatted)", "rx-size" },
|
||||
{ "Size of data sent [per second] (formatted)", "tx-size" },
|
||||
{ "Interface name", "ifname" },
|
||||
{ "Is default route", "is-default-route" },
|
||||
{ "Size of data received [per second] (in bytes)", "rx-bytes" },
|
||||
{ "Size of data sent [per second] (in bytes)", "tx-bytes" },
|
||||
{ "Number of packets received [per second]", "rx-packets" },
|
||||
{ "Number of packets sent [per second]", "tx-packets" },
|
||||
{ "Number of errors received [per second]", "rx-errors" },
|
||||
{ "Number of errors sent [per second]", "tx-errors" },
|
||||
{ "Number of packets dropped when receiving [per second]", "rx-drops" },
|
||||
{ "Number of packets dropped when sending [per second]", "tx-drops" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -129,8 +129,8 @@ FFModuleBaseInfo ffOpenCLModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateOpenCLJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateOpenCLJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Platform version", "version"},
|
||||
{"Platform name", "name"},
|
||||
{"Platform vendor", "vendor"},
|
||||
{ "Platform version", "version" },
|
||||
{ "Platform name", "name" },
|
||||
{ "Platform vendor", "vendor" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -52,9 +52,9 @@ void ffParseOpenGLJsonObject(FFOpenGLOptions* options, yyjson_val* module) {
|
||||
if (unsafe_yyjson_equals_str(key, "library")) {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"auto", FF_OPENGL_LIBRARY_AUTO},
|
||||
{"egl", FF_OPENGL_LIBRARY_EGL},
|
||||
{"glx", FF_OPENGL_LIBRARY_GLX},
|
||||
{ "auto", FF_OPENGL_LIBRARY_AUTO },
|
||||
{ "egl", FF_OPENGL_LIBRARY_EGL },
|
||||
{ "glx", FF_OPENGL_LIBRARY_GLX },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -136,10 +136,10 @@ FFModuleBaseInfo ffOpenGLModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateOpenGLJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateOpenGLJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"OpenGL version", "version"},
|
||||
{"OpenGL renderer", "renderer"},
|
||||
{"OpenGL vendor", "vendor"},
|
||||
{"OpenGL shading language version", "slv"},
|
||||
{"OpenGL library used", "library"},
|
||||
{ "OpenGL version", "version" },
|
||||
{ "OpenGL renderer", "renderer" },
|
||||
{ "OpenGL vendor", "vendor" },
|
||||
{ "OpenGL shading language version", "slv" },
|
||||
{ "OpenGL library used", "library" },
|
||||
}))
|
||||
};
|
||||
|
||||
+12
-12
@@ -181,17 +181,17 @@ FFModuleBaseInfo ffOSModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateOSJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateOSJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Name of the kernel", "sysname"},
|
||||
{"Name of the OS", "name"},
|
||||
{"Pretty name of the OS, if available", "pretty-name"},
|
||||
{"ID of the OS", "id"},
|
||||
{"ID like of the OS", "id-like"},
|
||||
{"Variant of the OS", "variant"},
|
||||
{"Variant ID of the OS", "variant-id"},
|
||||
{"Version of the OS", "version"},
|
||||
{"Version ID of the OS", "version-id"},
|
||||
{"Version codename of the OS", "codename"},
|
||||
{"Build ID of the OS", "build-id"},
|
||||
{"Architecture of the OS", "arch"},
|
||||
{ "Name of the kernel", "sysname" },
|
||||
{ "Name of the OS", "name" },
|
||||
{ "Pretty name of the OS, if available", "pretty-name" },
|
||||
{ "ID of the OS", "id" },
|
||||
{ "ID like of the OS", "id-like" },
|
||||
{ "Variant of the OS", "variant" },
|
||||
{ "Variant ID of the OS", "variant-id" },
|
||||
{ "Version of the OS", "version" },
|
||||
{ "Version ID of the OS", "version-id" },
|
||||
{ "Version codename of the OS", "codename" },
|
||||
{ "Build ID of the OS", "build-id" },
|
||||
{ "Architecture of the OS", "arch" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -471,54 +471,54 @@ FFModuleBaseInfo ffPackagesModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGeneratePackagesJsonResult,
|
||||
.generateJsonConfig = (void*) ffGeneratePackagesJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Number of all packages", "all"},
|
||||
{"Number of pacman packages", "pacman"},
|
||||
{"Pacman branch on manjaro", "pacman-branch"},
|
||||
{"Number of dpkg packages", "dpkg"},
|
||||
{"Number of rpm packages", "rpm"},
|
||||
{"Number of emerge packages", "emerge"},
|
||||
{"Number of eopkg packages", "eopkg"},
|
||||
{"Number of xbps packages", "xbps"},
|
||||
{"Number of nix-system packages", "nix-system"},
|
||||
{"Number of nix-user packages", "nix-user"},
|
||||
{"Number of nix-default packages", "nix-default"},
|
||||
{"Number of apk packages", "apk"},
|
||||
{"Number of pkg packages", "pkg"},
|
||||
{"Number of flatpak-system app packages", "flatpak-system"},
|
||||
{"Number of flatpak-user app packages", "flatpak-user"},
|
||||
{"Number of snap packages", "snap"},
|
||||
{"Number of brew packages", "brew"},
|
||||
{"Number of brew-cask packages", "brew-cask"},
|
||||
{"Number of macports packages", "macports"},
|
||||
{"Number of scoop-user packages", "scoop-user"},
|
||||
{"Number of scoop-global packages", "scoop-global"},
|
||||
{"Number of choco packages", "choco"},
|
||||
{"Number of pkgtool packages", "pkgtool"},
|
||||
{"Number of paludis packages", "paludis"},
|
||||
{"Number of winget packages", "winget"},
|
||||
{"Number of opkg packages", "opkg"},
|
||||
{"Number of am-system packages", "am-system"},
|
||||
{"Number of sorcery packages", "sorcery"},
|
||||
{"Number of lpkg packages", "lpkg"},
|
||||
{"Number of lpkgbuild packages", "lpkgbuild"},
|
||||
{"Number of guix-system packages", "guix-system"},
|
||||
{"Number of guix-user packages", "guix-user"},
|
||||
{"Number of guix-home packages", "guix-home"},
|
||||
{"Number of linglong packages", "linglong"},
|
||||
{"Number of pacstall packages", "pacstall"},
|
||||
{"Number of mport packages", "mport"},
|
||||
{"Number of am-user (aka appman) packages", "am-user"},
|
||||
{"Number of pkgsrc packages", "pkgsrc"},
|
||||
{"Number of hpkg-system packages", "hpkg-system"},
|
||||
{"Number of hpkg-user packages", "hpkg-user"},
|
||||
{"Number of pisi packages", "pisi"},
|
||||
{"Number of soar packages", "soar"},
|
||||
{"Number of kiss packages", "kiss"},
|
||||
{"Number of moss packages", "moss"},
|
||||
{"Total number of all nix packages", "nix-all"},
|
||||
{"Total number of all flatpak app packages", "flatpak-all"},
|
||||
{"Total number of all brew packages", "brew-all"},
|
||||
{"Total number of all guix packages", "guix-all"},
|
||||
{"Total number of all hpkg packages", "hpkg-all"},
|
||||
{ "Number of all packages", "all" },
|
||||
{ "Number of pacman packages", "pacman" },
|
||||
{ "Pacman branch on manjaro", "pacman-branch" },
|
||||
{ "Number of dpkg packages", "dpkg" },
|
||||
{ "Number of rpm packages", "rpm" },
|
||||
{ "Number of emerge packages", "emerge" },
|
||||
{ "Number of eopkg packages", "eopkg" },
|
||||
{ "Number of xbps packages", "xbps" },
|
||||
{ "Number of nix-system packages", "nix-system" },
|
||||
{ "Number of nix-user packages", "nix-user" },
|
||||
{ "Number of nix-default packages", "nix-default" },
|
||||
{ "Number of apk packages", "apk" },
|
||||
{ "Number of pkg packages", "pkg" },
|
||||
{ "Number of flatpak-system app packages", "flatpak-system" },
|
||||
{ "Number of flatpak-user app packages", "flatpak-user" },
|
||||
{ "Number of snap packages", "snap" },
|
||||
{ "Number of brew packages", "brew" },
|
||||
{ "Number of brew-cask packages", "brew-cask" },
|
||||
{ "Number of macports packages", "macports" },
|
||||
{ "Number of scoop-user packages", "scoop-user" },
|
||||
{ "Number of scoop-global packages", "scoop-global" },
|
||||
{ "Number of choco packages", "choco" },
|
||||
{ "Number of pkgtool packages", "pkgtool" },
|
||||
{ "Number of paludis packages", "paludis" },
|
||||
{ "Number of winget packages", "winget" },
|
||||
{ "Number of opkg packages", "opkg" },
|
||||
{ "Number of am-system packages", "am-system" },
|
||||
{ "Number of sorcery packages", "sorcery" },
|
||||
{ "Number of lpkg packages", "lpkg" },
|
||||
{ "Number of lpkgbuild packages", "lpkgbuild" },
|
||||
{ "Number of guix-system packages", "guix-system" },
|
||||
{ "Number of guix-user packages", "guix-user" },
|
||||
{ "Number of guix-home packages", "guix-home" },
|
||||
{ "Number of linglong packages", "linglong" },
|
||||
{ "Number of pacstall packages", "pacstall" },
|
||||
{ "Number of mport packages", "mport" },
|
||||
{ "Number of am-user (aka appman) packages", "am-user" },
|
||||
{ "Number of pkgsrc packages", "pkgsrc" },
|
||||
{ "Number of hpkg-system packages", "hpkg-system" },
|
||||
{ "Number of hpkg-user packages", "hpkg-user" },
|
||||
{ "Number of pisi packages", "pisi" },
|
||||
{ "Number of soar packages", "soar" },
|
||||
{ "Number of kiss packages", "kiss" },
|
||||
{ "Number of moss packages", "moss" },
|
||||
{ "Total number of all nix packages", "nix-all" },
|
||||
{ "Total number of all flatpak app packages", "flatpak-all" },
|
||||
{ "Total number of all brew packages", "brew-all" },
|
||||
{ "Total number of all guix packages", "guix-all" },
|
||||
{ "Total number of all hpkg packages", "hpkg-all" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -221,7 +221,7 @@ void ffInitPhysicalDiskOptions(FFPhysicalDiskOptions* options) {
|
||||
|
||||
ffStrbufInit(&options->namePrefix);
|
||||
options->temp = false;
|
||||
options->tempConfig = (FFColorRangeConfig) {50, 70};
|
||||
options->tempConfig = (FFColorRangeConfig) { 50, 70 };
|
||||
}
|
||||
|
||||
void ffDestroyPhysicalDiskOptions(FFPhysicalDiskOptions* options) {
|
||||
@@ -239,15 +239,15 @@ FFModuleBaseInfo ffPhysicalDiskModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGeneratePhysicalDiskJsonResult,
|
||||
.generateJsonConfig = (void*) ffGeneratePhysicalDiskJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Device size (formatted)", "size"},
|
||||
{"Device name", "name"},
|
||||
{"Device interconnect type", "interconnect"},
|
||||
{"Device raw file path", "dev-path"},
|
||||
{"Serial number", "serial"},
|
||||
{"Device kind (SSD or HDD)", "physical-type"},
|
||||
{"Device kind (Removable or Fixed)", "removable-type"},
|
||||
{"Device kind (Read-only or Read-write)", "readonly-type"},
|
||||
{"Product revision", "revision"},
|
||||
{"Device temperature (formatted)", "temperature"},
|
||||
{ "Device size (formatted)", "size" },
|
||||
{ "Device name", "name" },
|
||||
{ "Device interconnect type", "interconnect" },
|
||||
{ "Device raw file path", "dev-path" },
|
||||
{ "Serial number", "serial" },
|
||||
{ "Device kind (SSD or HDD)", "physical-type" },
|
||||
{ "Device kind (Removable or Fixed)", "removable-type" },
|
||||
{ "Device kind (Read-only or Read-write)", "readonly-type" },
|
||||
{ "Product revision", "revision" },
|
||||
{ "Device temperature (formatted)", "temperature" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -180,17 +180,17 @@ FFModuleBaseInfo ffPhysicalMemoryModuleInfo = {
|
||||
.generateJsonConfig = (void*) ffGeneratePhysicalMemoryJsonConfig,
|
||||
.generateJsonResult = (void*) ffGeneratePhysicalMemoryJsonResult,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Size (in bytes)", "bytes"},
|
||||
{"Size formatted", "size"},
|
||||
{"Max speed (in MT/s)", "max-speed"},
|
||||
{"Running speed (in MT/s)", "running-speed"},
|
||||
{"Type (DDR4, DDR5, etc.)", "type"},
|
||||
{"Form factor (SODIMM, DIMM, etc.)", "form-factor"},
|
||||
{"Bank/Device Locator (BANK0/SIMM0, BANK0/SIMM1, etc.)", "locator"},
|
||||
{"Vendor", "vendor"},
|
||||
{"Serial number", "serial"},
|
||||
{"Part number", "part-number"},
|
||||
{"True if ECC enabled", "is-ecc-enabled"},
|
||||
{"True if a memory module is installed in the slot", "is-installed"},
|
||||
{ "Size (in bytes)", "bytes" },
|
||||
{ "Size formatted", "size" },
|
||||
{ "Max speed (in MT/s)", "max-speed" },
|
||||
{ "Running speed (in MT/s)", "running-speed" },
|
||||
{ "Type (DDR4, DDR5, etc.)", "type" },
|
||||
{ "Form factor (SODIMM, DIMM, etc.)", "form-factor" },
|
||||
{ "Bank/Device Locator (BANK0/SIMM0, BANK0/SIMM1, etc.)", "locator" },
|
||||
{ "Vendor", "vendor" },
|
||||
{ "Serial number", "serial" },
|
||||
{ "Part number", "part-number" },
|
||||
{ "True if ECC enabled", "is-ecc-enabled" },
|
||||
{ "True if a memory module is installed in the slot", "is-installed" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -118,9 +118,9 @@ FFModuleBaseInfo ffPlayerModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGeneratePlayerJsonResult,
|
||||
.generateJsonConfig = (void*) ffGeneratePlayerJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Pretty player name", "player"},
|
||||
{"Player name", "name"},
|
||||
{"Player Identifier", "id"},
|
||||
{"URL name", "url"},
|
||||
{ "Pretty player name", "player" },
|
||||
{ "Player name", "name" },
|
||||
{ "Player Identifier", "id" },
|
||||
{ "URL name", "url" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -119,11 +119,11 @@ FFModuleBaseInfo ffPowerAdapterModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGeneratePowerAdapterJsonResult,
|
||||
.generateJsonConfig = (void*) ffGeneratePowerAdapterJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Power adapter watts", "watts"},
|
||||
{"Power adapter name", "name"},
|
||||
{"Power adapter manufacturer", "manufacturer"},
|
||||
{"Power adapter model", "model"},
|
||||
{"Power adapter description", "description"},
|
||||
{"Power adapter serial number", "serial"},
|
||||
{ "Power adapter watts", "watts" },
|
||||
{ "Power adapter name", "name" },
|
||||
{ "Power adapter manufacturer", "manufacturer" },
|
||||
{ "Power adapter model", "model" },
|
||||
{ "Power adapter description", "description" },
|
||||
{ "Power adapter serial number", "serial" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ bool ffPrintProcesses(FFProcessesOptions* options) {
|
||||
|
||||
printf("%u\n", numProcesses);
|
||||
} else {
|
||||
FF_PRINT_FORMAT_CHECKED(FF_PROCESSES_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) {FF_ARG(numProcesses, "result")}));
|
||||
FF_PRINT_FORMAT_CHECKED(FF_PROCESSES_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { FF_ARG(numProcesses, "result") }));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -72,6 +72,5 @@ FFModuleBaseInfo ffProcessesModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateProcessesJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateProcessesJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Process count", "result"}
|
||||
}))
|
||||
{ "Process count", "result" } }))
|
||||
};
|
||||
|
||||
@@ -119,7 +119,7 @@ FFModuleBaseInfo ffPublicIPModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGeneratePublicIpJsonResult,
|
||||
.generateJsonConfig = (void*) ffGeneratePublicIpJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Public IP address", "ip"},
|
||||
{"Location", "location"},
|
||||
{ "Public IP address", "ip" },
|
||||
{ "Location", "location" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -98,13 +98,13 @@ FFModuleBaseInfo ffShellModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateShellJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateShellJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Shell process name", "process-name"},
|
||||
{"The first argument of the command line when running the shell", "exe"},
|
||||
{"Shell base name of arg0", "exe-name"},
|
||||
{"Shell version", "version"},
|
||||
{"Shell pid", "pid"},
|
||||
{"Shell pretty name", "pretty-name"},
|
||||
{"Shell full exe path", "exe-path"},
|
||||
{"Shell tty used", "tty"},
|
||||
{ "Shell process name", "process-name" },
|
||||
{ "The first argument of the command line when running the shell", "exe" },
|
||||
{ "Shell base name of arg0", "exe-name" },
|
||||
{ "Shell version", "version" },
|
||||
{ "Shell pid", "pid" },
|
||||
{ "Shell pretty name", "pretty-name" },
|
||||
{ "Shell full exe path", "exe-path" },
|
||||
{ "Shell tty used", "tty" },
|
||||
}))
|
||||
};
|
||||
|
||||
+10
-10
@@ -129,9 +129,9 @@ void ffParseSoundJsonObject(FFSoundOptions* options, yyjson_val* module) {
|
||||
if (unsafe_yyjson_equals_str(key, "soundType")) {
|
||||
int value;
|
||||
const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) {
|
||||
{"main", FF_SOUND_TYPE_MAIN},
|
||||
{"active", FF_SOUND_TYPE_ACTIVE},
|
||||
{"all", FF_SOUND_TYPE_ALL},
|
||||
{ "main", FF_SOUND_TYPE_MAIN },
|
||||
{ "active", FF_SOUND_TYPE_ACTIVE },
|
||||
{ "all", FF_SOUND_TYPE_ALL },
|
||||
{},
|
||||
});
|
||||
if (error) {
|
||||
@@ -207,7 +207,7 @@ void ffInitSoundOptions(FFSoundOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
|
||||
options->soundType = FF_SOUND_TYPE_MAIN;
|
||||
options->percent = (FFPercentageModuleConfig) {80, 90, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 80, 90, 0 };
|
||||
}
|
||||
|
||||
void ffDestroySoundOptions(FFSoundOptions* options) {
|
||||
@@ -224,11 +224,11 @@ FFModuleBaseInfo ffSoundModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateSoundJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateSoundJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Is main sound device", "is-main"},
|
||||
{"Device name", "name"},
|
||||
{"Volume (in percentage num)", "volume-percentage"},
|
||||
{"Identifier", "identifier"},
|
||||
{"Volume (in percentage bar)", "volume-percentage-bar"},
|
||||
{"Platform API used", "platform-api"},
|
||||
{ "Is main sound device", "is-main" },
|
||||
{ "Device name", "name" },
|
||||
{ "Volume (in percentage num)", "volume-percentage" },
|
||||
{ "Identifier", "identifier" },
|
||||
{ "Volume (in percentage bar)", "volume-percentage-bar" },
|
||||
{ "Platform API used", "platform-api" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -173,7 +173,7 @@ bool ffGenerateSwapJsonResult(FF_MAYBE_UNUSED FFSwapOptions* options, yyjson_mut
|
||||
|
||||
void ffInitSwapOptions(FFSwapOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
options->percent = (FFPercentageModuleConfig) {50, 80, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 80, 0 };
|
||||
options->separate = false;
|
||||
}
|
||||
|
||||
@@ -191,10 +191,10 @@ FFModuleBaseInfo ffSwapModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateSwapJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateSwapJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Used size", "used"},
|
||||
{"Total size", "total"},
|
||||
{"Percentage used (num)", "percentage"},
|
||||
{"Percentage used (bar)", "percentage-bar"},
|
||||
{"Name", "name"},
|
||||
{ "Used size", "used" },
|
||||
{ "Total size", "total" },
|
||||
{ "Percentage used (num)", "percentage" },
|
||||
{ "Percentage used (bar)", "percentage-bar" },
|
||||
{ "Name", "name" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -92,13 +92,13 @@ FFModuleBaseInfo ffTerminalModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateTerminalJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateTerminalJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Terminal process name", "process-name"},
|
||||
{"The first argument of the command line when running the terminal", "exe"},
|
||||
{"Terminal base name of arg0", "exe-name"},
|
||||
{"Terminal pid", "pid"},
|
||||
{"Terminal pretty name", "pretty-name"},
|
||||
{"Terminal version", "version"},
|
||||
{"Terminal full exe path", "exe-path"},
|
||||
{"Terminal tty / pts used", "tty"},
|
||||
{ "Terminal process name", "process-name" },
|
||||
{ "The first argument of the command line when running the terminal", "exe" },
|
||||
{ "Terminal base name of arg0", "exe-name" },
|
||||
{ "Terminal pid", "pid" },
|
||||
{ "Terminal pretty name", "pretty-name" },
|
||||
{ "Terminal version", "version" },
|
||||
{ "Terminal full exe path", "exe-path" },
|
||||
{ "Terminal tty / pts used", "tty" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -114,9 +114,9 @@ FFModuleBaseInfo ffTerminalFontModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateTerminalFontJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateTerminalFontJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Terminal font combined", "combined"},
|
||||
{"Terminal font name", "name"},
|
||||
{"Terminal font size", "size"},
|
||||
{"Terminal font styles", "styles"},
|
||||
{ "Terminal font combined", "combined" },
|
||||
{ "Terminal font name", "name" },
|
||||
{ "Terminal font size", "size" },
|
||||
{ "Terminal font styles", "styles" },
|
||||
})),
|
||||
};
|
||||
|
||||
@@ -85,9 +85,9 @@ FFModuleBaseInfo ffTerminalSizeModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateTerminalSizeJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateTerminalSizeJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Terminal rows", "rows"},
|
||||
{"Terminal columns", "columns"},
|
||||
{"Terminal width (in pixels)", "width"},
|
||||
{"Terminal height (in pixels)", "height"},
|
||||
{ "Terminal rows", "rows" },
|
||||
{ "Terminal columns", "columns" },
|
||||
{ "Terminal width (in pixels)", "width" },
|
||||
{ "Terminal height (in pixels)", "height" },
|
||||
})),
|
||||
};
|
||||
|
||||
@@ -102,9 +102,9 @@ FFModuleBaseInfo ffTerminalThemeModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateTerminalThemeJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateTerminalThemeJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Terminal foreground color", "fg-color"},
|
||||
{"Terminal foreground type (Dark / Light)", "fg-type"},
|
||||
{"Terminal background color", "bg-color"},
|
||||
{"Terminal background type (Dark / Light)", "bg-type"},
|
||||
{ "Terminal foreground color", "fg-color" },
|
||||
{ "Terminal foreground type (Dark / Light)", "fg-type" },
|
||||
{ "Terminal background color", "bg-color" },
|
||||
{ "Terminal background type (Dark / Light)", "bg-type" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -96,7 +96,7 @@ FFModuleBaseInfo ffThemeModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateThemeJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateThemeJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Theme part 1", "theme1"},
|
||||
{"Theme part 2", "theme2"},
|
||||
{ "Theme part 1", "theme1" },
|
||||
{ "Theme part 2", "theme2" },
|
||||
}))
|
||||
};
|
||||
|
||||
+12
-12
@@ -185,17 +185,17 @@ FFModuleBaseInfo ffTitleModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateTitleJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateTitleJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"User name", "user-name"},
|
||||
{"Host name", "host-name"},
|
||||
{"Home directory", "home-dir"},
|
||||
{"Executable path of current process", "exe-path"},
|
||||
{"User's default shell", "user-shell"},
|
||||
{"User name (colored)", "user-name-colored"},
|
||||
{"@ symbol (colored)", "at-symbol-colored"},
|
||||
{"Host name (colored)", "host-name-colored"},
|
||||
{"Full user name", "full-user-name"},
|
||||
{"UID (*nix) / SID (Windows)", "user-id"},
|
||||
{"PID of current process", "pid"},
|
||||
{"CWD with home dir replaced by `~`", "cwd"},
|
||||
{ "User name", "user-name" },
|
||||
{ "Host name", "host-name" },
|
||||
{ "Home directory", "home-dir" },
|
||||
{ "Executable path of current process", "exe-path" },
|
||||
{ "User's default shell", "user-shell" },
|
||||
{ "User name (colored)", "user-name-colored" },
|
||||
{ "@ symbol (colored)", "at-symbol-colored" },
|
||||
{ "Host name (colored)", "host-name-colored" },
|
||||
{ "Full user name", "full-user-name" },
|
||||
{ "UID (*nix) / SID (Windows)", "user-id" },
|
||||
{ "PID of current process", "pid" },
|
||||
{ "CWD with home dir replaced by `~`", "cwd" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -92,7 +92,7 @@ FFModuleBaseInfo ffTPMModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateTPMJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateTPMJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"TPM device version", "version"},
|
||||
{"TPM general description", "description"},
|
||||
{ "TPM device version", "version" },
|
||||
{ "TPM general description", "description" },
|
||||
}))
|
||||
};
|
||||
|
||||
+11
-11
@@ -36,7 +36,7 @@ bool ffPrintUptime(FFUptimeOptions* options) {
|
||||
|
||||
FFTimeGetAgeResult age = ffTimeGetAge(result.bootTime, ffTimeGetNow());
|
||||
|
||||
FF_PRINT_FORMAT_CHECKED(FF_UPTIME_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) {FF_ARG(days, "days"), FF_ARG(hours, "hours"), FF_ARG(minutes, "minutes"), FF_ARG(seconds, "seconds"), FF_ARG(milliseconds, "milliseconds"), {FF_ARG_TYPE_STRING, ffTimeToShortStr(result.bootTime), "boot-time"}, FF_ARG(age.years, "years"), FF_ARG(age.daysOfYear, "days-of-year"), FF_ARG(age.yearsFraction, "years-fraction"), FF_ARG(buffer, "formatted")}));
|
||||
FF_PRINT_FORMAT_CHECKED(FF_UPTIME_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { FF_ARG(days, "days"), FF_ARG(hours, "hours"), FF_ARG(minutes, "minutes"), FF_ARG(seconds, "seconds"), FF_ARG(milliseconds, "milliseconds"), { FF_ARG_TYPE_STRING, ffTimeToShortStr(result.bootTime), "boot-time" }, FF_ARG(age.years, "years"), FF_ARG(age.daysOfYear, "days-of-year"), FF_ARG(age.yearsFraction, "years-fraction"), FF_ARG(buffer, "formatted") }));
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -92,15 +92,15 @@ FFModuleBaseInfo ffUptimeModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateUptimeJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateUptimeJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Days after boot", "days"},
|
||||
{"Hours after boot", "hours"},
|
||||
{"Minutes after boot", "minutes"},
|
||||
{"Seconds after boot", "seconds"},
|
||||
{"Milliseconds after boot", "milliseconds"},
|
||||
{"Boot time in local timezone", "boot-time"},
|
||||
{"Years integer after boot", "years"},
|
||||
{"Days of year after boot", "days-of-year"},
|
||||
{"Years fraction after boot", "years-fraction"},
|
||||
{"Formatted uptime", "formatted"},
|
||||
{ "Days after boot", "days" },
|
||||
{ "Hours after boot", "hours" },
|
||||
{ "Minutes after boot", "minutes" },
|
||||
{ "Seconds after boot", "seconds" },
|
||||
{ "Milliseconds after boot", "milliseconds" },
|
||||
{ "Boot time in local timezone", "boot-time" },
|
||||
{ "Years integer after boot", "years" },
|
||||
{ "Days of year after boot", "days-of-year" },
|
||||
{ "Years fraction after boot", "years-fraction" },
|
||||
{ "Formatted uptime", "formatted" },
|
||||
}))
|
||||
};
|
||||
|
||||
+14
-14
@@ -76,7 +76,7 @@ bool ffPrintUsers(FFUsersOptions* options) {
|
||||
FF_ARG(user->hostName, "host-name"),
|
||||
FF_ARG(user->sessionName, "session-name"),
|
||||
FF_ARG(user->clientIp, "client-ip"),
|
||||
{FF_ARG_TYPE_STRING, ffTimeToShortStr(user->loginTime), "login-time"},
|
||||
{ FF_ARG_TYPE_STRING, ffTimeToShortStr(user->loginTime), "login-time" },
|
||||
FF_ARG(days, "days"),
|
||||
FF_ARG(hours, "hours"),
|
||||
FF_ARG(minutes, "minutes"),
|
||||
@@ -189,18 +189,18 @@ FFModuleBaseInfo ffUsersModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateUsersJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateUsersJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"User name", "name"},
|
||||
{"Host name", "host-name"},
|
||||
{"Session name", "session-name"},
|
||||
{"Client IP", "client-ip"},
|
||||
{"Login Time in local timezone", "login-time"},
|
||||
{"Days after login", "days"},
|
||||
{"Hours after login", "hours"},
|
||||
{"Minutes after login", "minutes"},
|
||||
{"Seconds after login", "seconds"},
|
||||
{"Milliseconds after login", "milliseconds"},
|
||||
{"Years integer after login", "years"},
|
||||
{"Days of year after login", "days-of-year"},
|
||||
{"Years fraction after login", "years-fraction"},
|
||||
{ "User name", "name" },
|
||||
{ "Host name", "host-name" },
|
||||
{ "Session name", "session-name" },
|
||||
{ "Client IP", "client-ip" },
|
||||
{ "Login Time in local timezone", "login-time" },
|
||||
{ "Days after login", "days" },
|
||||
{ "Hours after login", "hours" },
|
||||
{ "Minutes after login", "minutes" },
|
||||
{ "Seconds after login", "seconds" },
|
||||
{ "Milliseconds after login", "milliseconds" },
|
||||
{ "Years integer after login", "years" },
|
||||
{ "Days of year after login", "days-of-year" },
|
||||
{ "Years fraction after login", "years-fraction" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -103,15 +103,15 @@ FFModuleBaseInfo ffVersionModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateVersionJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateVersionJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Project name", "project-name"},
|
||||
{"Version", "version"},
|
||||
{"Version tweak", "version-tweak"},
|
||||
{"Build type (debug or release)", "build-type"},
|
||||
{"System name", "sysname"},
|
||||
{"Architecture", "arch"},
|
||||
{"CMake build type when compiling (Debug, Release, RelWithDebInfo, MinSizeRel)", "cmake-built-type"},
|
||||
{"Date time when compiling", "compile-time"},
|
||||
{"Compiler used when compiling", "compiler"},
|
||||
{"Libc used when compiling", "libc"},
|
||||
{ "Project name", "project-name" },
|
||||
{ "Version", "version" },
|
||||
{ "Version tweak", "version-tweak" },
|
||||
{ "Build type (debug or release)", "build-type" },
|
||||
{ "System name", "sysname" },
|
||||
{ "Architecture", "arch" },
|
||||
{ "CMake build type when compiling (Debug, Release, RelWithDebInfo, MinSizeRel)", "cmake-built-type" },
|
||||
{ "Date time when compiling", "compile-time" },
|
||||
{ "Compiler used when compiling", "compiler" },
|
||||
{ "Libc used when compiling", "libc" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -141,9 +141,9 @@ FFModuleBaseInfo ffVulkanModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateVulkanJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateVulkanJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Driver name", "driver"},
|
||||
{"API version", "api-version"},
|
||||
{"Conformance version", "conformance-version"},
|
||||
{"Instance version", "instance-version"},
|
||||
{ "Driver name", "driver" },
|
||||
{ "API version", "api-version" },
|
||||
{ "Conformance version", "conformance-version" },
|
||||
{ "Instance version", "instance-version" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -84,7 +84,7 @@ FFModuleBaseInfo ffWallpaperModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateWallpaperJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateWallpaperJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"File name", "file-name"},
|
||||
{"Full path", "full-path"},
|
||||
{ "File name", "file-name" },
|
||||
{ "Full path", "full-path" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -100,6 +100,6 @@ FFModuleBaseInfo ffWeatherModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateWeatherJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateWeatherJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Weather result", "result"},
|
||||
{ "Weather result", "result" },
|
||||
}))
|
||||
};
|
||||
|
||||
+14
-14
@@ -206,7 +206,7 @@ bool ffGenerateWifiJsonResult(FF_MAYBE_UNUSED FFWifiOptions* options, yyjson_mut
|
||||
void ffInitWifiOptions(FFWifiOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
|
||||
options->percent = (FFPercentageModuleConfig) {75, 50, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 75, 50, 0 };
|
||||
}
|
||||
|
||||
void ffDestroyWifiOptions(FFWifiOptions* options) {
|
||||
@@ -223,18 +223,18 @@ FFModuleBaseInfo ffWifiModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateWifiJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateWifiJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Interface description", "inf-desc"},
|
||||
{"Interface status", "inf-status"},
|
||||
{"Connection status", "status"},
|
||||
{"Connection SSID", "ssid"},
|
||||
{"Connection BSSID", "bssid"},
|
||||
{"Connection protocol", "protocol"},
|
||||
{"Connection signal quality (percentage num)", "signal-quality"},
|
||||
{"Connection RX rate", "rx-rate"},
|
||||
{"Connection TX rate", "tx-rate"},
|
||||
{"Connection Security algorithm", "security"},
|
||||
{"Connection signal quality (percentage bar)", "signal-quality-bar"},
|
||||
{"Connection channel number", "channel"},
|
||||
{"Connection channel band in GHz", "band"},
|
||||
{ "Interface description", "inf-desc" },
|
||||
{ "Interface status", "inf-status" },
|
||||
{ "Connection status", "status" },
|
||||
{ "Connection SSID", "ssid" },
|
||||
{ "Connection BSSID", "bssid" },
|
||||
{ "Connection protocol", "protocol" },
|
||||
{ "Connection signal quality (percentage num)", "signal-quality" },
|
||||
{ "Connection RX rate", "rx-rate" },
|
||||
{ "Connection TX rate", "tx-rate" },
|
||||
{ "Connection Security algorithm", "security" },
|
||||
{ "Connection signal quality (percentage bar)", "signal-quality-bar" },
|
||||
{ "Connection channel number", "channel" },
|
||||
{ "Connection channel band in GHz", "band" },
|
||||
}))
|
||||
};
|
||||
|
||||
+5
-5
@@ -129,10 +129,10 @@ FFModuleBaseInfo ffWMModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateWMJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateWMJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"WM process name", "process-name"},
|
||||
{"WM pretty name", "pretty-name"},
|
||||
{"WM protocol name", "protocol-name"},
|
||||
{"WM plugin name", "plugin-name"},
|
||||
{"WM version", "version"},
|
||||
{ "WM process name", "process-name" },
|
||||
{ "WM pretty name", "pretty-name" },
|
||||
{ "WM protocol name", "protocol-name" },
|
||||
{ "WM plugin name", "plugin-name" },
|
||||
{ "WM version", "version" },
|
||||
}))
|
||||
};
|
||||
|
||||
@@ -70,6 +70,6 @@ FFModuleBaseInfo ffWMThemeModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateWMThemeJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateWMThemeJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"WM theme", "result"},
|
||||
{ "WM theme", "result" },
|
||||
}))
|
||||
};
|
||||
|
||||
+14
-14
@@ -184,7 +184,7 @@ bool ffGenerateZpoolJsonResult(FF_MAYBE_UNUSED FFZpoolOptions* options, yyjson_m
|
||||
|
||||
void ffInitZpoolOptions(FFZpoolOptions* options) {
|
||||
ffOptionInitModuleArg(&options->moduleArgs, "");
|
||||
options->percent = (FFPercentageModuleConfig) {50, 80, 0};
|
||||
options->percent = (FFPercentageModuleConfig) { 50, 80, 0 };
|
||||
}
|
||||
|
||||
void ffDestroyZpoolOptions(FFZpoolOptions* options) {
|
||||
@@ -201,18 +201,18 @@ FFModuleBaseInfo ffZpoolModuleInfo = {
|
||||
.generateJsonResult = (void*) ffGenerateZpoolJsonResult,
|
||||
.generateJsonConfig = (void*) ffGenerateZpoolJsonConfig,
|
||||
.formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) {
|
||||
{"Zpool name", "name"},
|
||||
{"Zpool guid", "guid"},
|
||||
{"Zpool state", "state"},
|
||||
{"Size used", "used"},
|
||||
{"Size allocated", "allocated"},
|
||||
{"Size total", "total"},
|
||||
{"Size used percentage num", "used-percentage"},
|
||||
{"Size allocated percentage num", "allocated-percentage"},
|
||||
{"Fragmentation percentage num", "fragmentation-percentage"},
|
||||
{"Size used percentage bar", "used-percentage-bar"},
|
||||
{"Size allocated percentage bar", "allocated-percentage-bar"},
|
||||
{"Fragmentation percentage bar", "fragmentation-percentage-bar"},
|
||||
{"Is read-only", "is-readonly"},
|
||||
{ "Zpool name", "name" },
|
||||
{ "Zpool guid", "guid" },
|
||||
{ "Zpool state", "state" },
|
||||
{ "Size used", "used" },
|
||||
{ "Size allocated", "allocated" },
|
||||
{ "Size total", "total" },
|
||||
{ "Size used percentage num", "used-percentage" },
|
||||
{ "Size allocated percentage num", "allocated-percentage" },
|
||||
{ "Fragmentation percentage num", "fragmentation-percentage" },
|
||||
{ "Size used percentage bar", "used-percentage-bar" },
|
||||
{ "Size allocated percentage bar", "allocated-percentage-bar" },
|
||||
{ "Fragmentation percentage bar", "fragmentation-percentage-bar" },
|
||||
{ "Is read-only", "is-readonly" },
|
||||
}))
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user