From 3a35f9735b0d3e44513086a14f64cc8736ea235e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Thu, 12 Mar 2026 15:07:19 +0800 Subject: [PATCH] Global: renames `FFformatArgType` to FFArgType for future reuse --- src/common/argType.h | 34 +++++++ src/common/format.h | 35 +------- src/common/impl/format.c | 44 ++++----- src/common/impl/printing.c | 4 +- src/modules/battery/battery.c | 36 ++++---- src/modules/bios/bios.c | 14 +-- src/modules/bluetooth/bluetooth.c | 12 +-- src/modules/bluetoothradio/bluetoothradio.c | 22 ++--- src/modules/board/board.c | 8 +- src/modules/bootmgr/bootmgr.c | 10 +-- src/modules/brightness/brightness.c | 20 ++--- src/modules/btrfs/btrfs.c | 32 +++---- src/modules/camera/camera.c | 12 +-- src/modules/chassis/chassis.c | 8 +- src/modules/command/command.c | 4 +- src/modules/cpu/cpu.c | 24 ++--- src/modules/cpucache/cpucache.c | 14 +-- src/modules/cpuusage/cpuusage.c | 16 ++-- src/modules/cursor/cursor.c | 4 +- src/modules/datetime/datetime.c | 46 +++++----- src/modules/de/de.c | 6 +- src/modules/disk/disk.c | 68 +++++++------- src/modules/diskio/diskio.c | 24 ++--- src/modules/display/display.c | 56 ++++++------ src/modules/dns/dns.c | 2 +- src/modules/editor/editor.c | 10 +-- src/modules/font/font.c | 10 +-- src/modules/gamepad/gamepad.c | 8 +- src/modules/gpu/gpu.c | 40 ++++----- src/modules/host/host.c | 14 +-- src/modules/icons/icons.c | 4 +- src/modules/initsystem/initsystem.c | 8 +- src/modules/kernel/kernel.c | 10 +-- src/modules/keyboard/keyboard.c | 4 +- src/modules/lm/lm.c | 6 +- src/modules/loadavg/loadavg.c | 12 +-- src/modules/locale/locale.c | 2 +- src/modules/localip/localip.c | 24 ++--- src/modules/media/media.c | 16 ++-- src/modules/memory/memory.c | 8 +- src/modules/monitor/monitor.c | 30 +++---- src/modules/mouse/mouse.c | 4 +- src/modules/netio/netio.c | 30 +++---- src/modules/opencl/opencl.c | 6 +- src/modules/opengl/opengl.c | 10 +-- src/modules/os/os.c | 32 +++---- src/modules/packages/packages.c | 98 ++++++++++----------- src/modules/physicaldisk/physicaldisk.c | 28 +++--- src/modules/physicalmemory/physicalmemory.c | 24 ++--- src/modules/player/player.c | 8 +- src/modules/poweradapter/poweradapter.c | 12 +-- src/modules/processes/processes.c | 2 +- src/modules/publicip/publicip.c | 4 +- src/modules/shell/shell.c | 16 ++-- src/modules/sound/sound.c | 12 +-- src/modules/swap/swap.c | 16 ++-- src/modules/terminal/terminal.c | 16 ++-- src/modules/terminalfont/terminalfont.c | 8 +- src/modules/terminalsize/terminalsize.c | 8 +- src/modules/terminaltheme/terminaltheme.c | 8 +- src/modules/theme/theme.c | 4 +- src/modules/title/title.c | 26 +++--- src/modules/tpm/tpm.c | 4 +- src/modules/uptime/uptime.c | 20 ++--- src/modules/users/users.c | 26 +++--- src/modules/version/version.c | 20 ++--- src/modules/vulkan/vulkan.c | 8 +- src/modules/wallpaper/wallpaper.c | 4 +- src/modules/weather/weather.c | 2 +- src/modules/wifi/wifi.c | 26 +++--- src/modules/wm/wm.c | 10 +-- src/modules/wmtheme/wmtheme.c | 2 +- src/modules/zpool/zpool.c | 34 +++---- 73 files changed, 646 insertions(+), 643 deletions(-) create mode 100644 src/common/argType.h diff --git a/src/common/argType.h b/src/common/argType.h new file mode 100644 index 000000000..c108e3e5c --- /dev/null +++ b/src/common/argType.h @@ -0,0 +1,34 @@ +#pragma once + +#include "common/FFstrbuf.h" + +typedef enum __attribute__((__packed__)) FFArgType +{ + FF_ARG_TYPE_NULL = 0, + FF_ARG_TYPE_UINT, + FF_ARG_TYPE_UINT64, + FF_ARG_TYPE_UINT16, + FF_ARG_TYPE_UINT8, + FF_ARG_TYPE_INT, + FF_ARG_TYPE_STRING, + FF_ARG_TYPE_STRBUF, + FF_ARG_TYPE_FLOAT, + FF_ARG_TYPE_DOUBLE, + FF_ARG_TYPE_LIST, + FF_ARG_TYPE_BOOL +} FFArgType; + +#define FF_ARG(variable, var_name) { _Generic((variable), \ + uint32_t: FF_ARG_TYPE_UINT, \ + uint64_t: FF_ARG_TYPE_UINT64, \ + uint16_t: FF_ARG_TYPE_UINT16, \ + uint8_t: FF_ARG_TYPE_UINT8, \ + int32_t: FF_ARG_TYPE_INT, \ + char*: FF_ARG_TYPE_STRING, \ + const char*: FF_ARG_TYPE_STRING, \ + FFstrbuf: FF_ARG_TYPE_STRBUF, \ + float: FF_ARG_TYPE_FLOAT, \ + double: FF_ARG_TYPE_DOUBLE, \ + FFlist: FF_ARG_TYPE_LIST, \ + bool: FF_ARG_TYPE_BOOL \ + ), _Generic((variable), char*: (variable), const char*: (variable), default: &(variable) ), (var_name) } diff --git a/src/common/format.h b/src/common/format.h index 70fa4a15e..3c7ada6ae 100644 --- a/src/common/format.h +++ b/src/common/format.h @@ -1,41 +1,10 @@ #pragma once -#include "common/FFstrbuf.h" - -typedef enum __attribute__((__packed__)) FFformatArgType -{ - FF_FORMAT_ARG_TYPE_NULL = 0, - FF_FORMAT_ARG_TYPE_UINT, - FF_FORMAT_ARG_TYPE_UINT64, - FF_FORMAT_ARG_TYPE_UINT16, - FF_FORMAT_ARG_TYPE_UINT8, - FF_FORMAT_ARG_TYPE_INT, - FF_FORMAT_ARG_TYPE_STRING, - FF_FORMAT_ARG_TYPE_STRBUF, - FF_FORMAT_ARG_TYPE_FLOAT, - FF_FORMAT_ARG_TYPE_DOUBLE, - FF_FORMAT_ARG_TYPE_LIST, - FF_FORMAT_ARG_TYPE_BOOL -} FFformatArgType; - -#define FF_FORMAT_ARG(variable, var_name) { _Generic((variable), \ - uint32_t: FF_FORMAT_ARG_TYPE_UINT, \ - uint64_t: FF_FORMAT_ARG_TYPE_UINT64, \ - uint16_t: FF_FORMAT_ARG_TYPE_UINT16, \ - uint8_t: FF_FORMAT_ARG_TYPE_UINT8, \ - int32_t: FF_FORMAT_ARG_TYPE_INT, \ - char*: FF_FORMAT_ARG_TYPE_STRING, \ - const char*: FF_FORMAT_ARG_TYPE_STRING, \ - FFstrbuf: FF_FORMAT_ARG_TYPE_STRBUF, \ - float: FF_FORMAT_ARG_TYPE_FLOAT, \ - double: FF_FORMAT_ARG_TYPE_DOUBLE, \ - FFlist: FF_FORMAT_ARG_TYPE_LIST, \ - bool: FF_FORMAT_ARG_TYPE_BOOL \ - ), _Generic((variable), char*: (variable), const char*: (variable), default: &(variable) ), (var_name) } +#include "common/argType.h" typedef struct FFformatarg { - FFformatArgType type; + FFArgType type; const void* value; const char* name; // argument name, must start with an alphabet } FFformatarg; diff --git a/src/common/impl/format.c b/src/common/impl/format.c index 7a5a14a79..0c3ea9757 100644 --- a/src/common/impl/format.c +++ b/src/common/impl/format.c @@ -10,37 +10,37 @@ void ffFormatAppendFormatArg(FFstrbuf* buffer, const FFformatarg* formatarg) { switch(formatarg->type) { - case FF_FORMAT_ARG_TYPE_INT: + case FF_ARG_TYPE_INT: ffStrbufAppendSInt(buffer, *(int32_t*)formatarg->value); break; - case FF_FORMAT_ARG_TYPE_UINT: + case FF_ARG_TYPE_UINT: ffStrbufAppendUInt(buffer, *(uint32_t*)formatarg->value); break; - case FF_FORMAT_ARG_TYPE_UINT64: + case FF_ARG_TYPE_UINT64: ffStrbufAppendUInt(buffer, *(uint64_t*)formatarg->value); break; - case FF_FORMAT_ARG_TYPE_UINT16: + case FF_ARG_TYPE_UINT16: ffStrbufAppendUInt(buffer, *(uint16_t*)formatarg->value); break; - case FF_FORMAT_ARG_TYPE_UINT8: + case FF_ARG_TYPE_UINT8: ffStrbufAppendUInt(buffer, *(uint8_t*)formatarg->value); break; - case FF_FORMAT_ARG_TYPE_STRING: + case FF_ARG_TYPE_STRING: ffStrbufAppendS(buffer, (const char*)formatarg->value); break; - case FF_FORMAT_ARG_TYPE_STRBUF: + case FF_ARG_TYPE_STRBUF: ffStrbufAppend(buffer, (const FFstrbuf*)formatarg->value); break; - case FF_FORMAT_ARG_TYPE_FLOAT: + case FF_ARG_TYPE_FLOAT: ffStrbufAppendDouble(buffer, *(float*)formatarg->value, instance.config.display.fractionNdigits, instance.config.display.fractionTrailingZeros != FF_FRACTION_TRAILING_ZEROS_TYPE_NEVER); break; - case FF_FORMAT_ARG_TYPE_DOUBLE: + case FF_ARG_TYPE_DOUBLE: ffStrbufAppendDouble(buffer, *(double*)formatarg->value, instance.config.display.fractionNdigits, instance.config.display.fractionTrailingZeros != FF_FRACTION_TRAILING_ZEROS_TYPE_NEVER); break; - case FF_FORMAT_ARG_TYPE_BOOL: + case FF_ARG_TYPE_BOOL: ffStrbufAppendS(buffer, *(bool*)formatarg->value ? "true" : "false"); break; - case FF_FORMAT_ARG_TYPE_LIST: + case FF_ARG_TYPE_LIST: { const FFlist* list = (const FFlist*) formatarg->value; for(uint32_t i = 0; i < list->length; i++) @@ -52,7 +52,7 @@ void ffFormatAppendFormatArg(FFstrbuf* buffer, const FFformatarg* formatarg) break; } default: - if(formatarg->type != FF_FORMAT_ARG_TYPE_NULL) + if(formatarg->type != FF_ARG_TYPE_NULL) fprintf(stderr, "Error: format string \"%s\": argument is not implemented: %i\n", buffer->chars, formatarg->type); break; } @@ -107,16 +107,16 @@ static inline void appendInvalidPlaceholder(FFstrbuf* buffer, const char* start, static inline bool formatArgSet(const FFformatarg* arg) { return arg->value != NULL && ( - (arg->type == FF_FORMAT_ARG_TYPE_DOUBLE && *(double*)arg->value > 0.0) || - (arg->type == FF_FORMAT_ARG_TYPE_FLOAT && *(float*)arg->value > 0.0) || - (arg->type == FF_FORMAT_ARG_TYPE_INT && *(int*)arg->value > 0) || - (arg->type == FF_FORMAT_ARG_TYPE_STRBUF && ((FFstrbuf*)arg->value)->length > 0) || - (arg->type == FF_FORMAT_ARG_TYPE_STRING && ffStrSet((char*)arg->value)) || - (arg->type == FF_FORMAT_ARG_TYPE_UINT8 && *(uint8_t*)arg->value > 0) || - (arg->type == FF_FORMAT_ARG_TYPE_UINT16 && *(uint16_t*)arg->value > 0) || - (arg->type == FF_FORMAT_ARG_TYPE_UINT && *(uint32_t*)arg->value > 0) || - (arg->type == FF_FORMAT_ARG_TYPE_BOOL && *(bool*)arg->value) || - (arg->type == FF_FORMAT_ARG_TYPE_LIST && ((FFlist*)arg->value)->length > 0) + (arg->type == FF_ARG_TYPE_DOUBLE && *(double*)arg->value > 0.0) || + (arg->type == FF_ARG_TYPE_FLOAT && *(float*)arg->value > 0.0) || + (arg->type == FF_ARG_TYPE_INT && *(int*)arg->value > 0) || + (arg->type == FF_ARG_TYPE_STRBUF && ((FFstrbuf*)arg->value)->length > 0) || + (arg->type == FF_ARG_TYPE_STRING && ffStrSet((char*)arg->value)) || + (arg->type == FF_ARG_TYPE_UINT8 && *(uint8_t*)arg->value > 0) || + (arg->type == FF_ARG_TYPE_UINT16 && *(uint16_t*)arg->value > 0) || + (arg->type == FF_ARG_TYPE_UINT && *(uint32_t*)arg->value > 0) || + (arg->type == FF_ARG_TYPE_BOOL && *(bool*)arg->value) || + (arg->type == FF_ARG_TYPE_LIST && ((FFlist*)arg->value)->length > 0) ); } diff --git a/src/common/impl/printing.c b/src/common/impl/printing.c index b851864b5..efb9a2e90 100644 --- a/src/common/impl/printing.c +++ b/src/common/impl/printing.c @@ -47,8 +47,8 @@ void ffPrintLogoAndKey(const char* moduleName, uint8_t moduleIndex, const FFModu { FF_STRBUF_AUTO_DESTROY key = ffStrbufCreate(); FF_PARSE_FORMAT_STRING_CHECKED(&key, &moduleArgs->key, ((FFformatarg[]) { - FF_FORMAT_ARG(moduleIndex, "index"), - FF_FORMAT_ARG(moduleArgs->keyIcon, "icon"), + FF_ARG(moduleIndex, "index"), + FF_ARG(moduleArgs->keyIcon, "icon"), })); ffStrbufWriteTo(&key, stdout); } diff --git a/src/modules/battery/battery.c b/src/modules/battery/battery.c index 0da4f12d7..a74162b5d 100644 --- a/src/modules/battery/battery.c +++ b/src/modules/battery/battery.c @@ -21,9 +21,9 @@ static void printBattery(FFBatteryOptions* options, FFBatteryResult* result, uin { ffStrbufClear(&key); FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(result->modelName, "name"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(result->modelName, "name"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -106,21 +106,21 @@ static void printBattery(FFBatteryOptions* options, FFBatteryResult* result, uin ffDurationAppendNum((uint32_t) result->timeRemaining, &timeStr); FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(result->manufacturer, "manufacturer"), - FF_FORMAT_ARG(result->modelName, "model-name"), - FF_FORMAT_ARG(result->technology, "technology"), - FF_FORMAT_ARG(capacityNum, "capacity"), - FF_FORMAT_ARG(result->status, "status"), - FF_FORMAT_ARG(tempStr, "temperature"), - FF_FORMAT_ARG(result->cycleCount, "cycle-count"), - FF_FORMAT_ARG(result->serial, "serial"), - FF_FORMAT_ARG(result->manufactureDate, "manufacture-date"), - FF_FORMAT_ARG(capacityBar, "capacity-bar"), - FF_FORMAT_ARG(days, "time-days"), - FF_FORMAT_ARG(hours, "time-hours"), - FF_FORMAT_ARG(minutes, "time-minutes"), - FF_FORMAT_ARG(seconds, "time-seconds"), - FF_FORMAT_ARG(timeStr, "time-formatted"), + FF_ARG(result->manufacturer, "manufacturer"), + FF_ARG(result->modelName, "model-name"), + FF_ARG(result->technology, "technology"), + FF_ARG(capacityNum, "capacity"), + FF_ARG(result->status, "status"), + FF_ARG(tempStr, "temperature"), + FF_ARG(result->cycleCount, "cycle-count"), + FF_ARG(result->serial, "serial"), + FF_ARG(result->manufactureDate, "manufacture-date"), + FF_ARG(capacityBar, "capacity-bar"), + FF_ARG(days, "time-days"), + FF_ARG(hours, "time-hours"), + FF_ARG(minutes, "time-minutes"), + FF_ARG(seconds, "time-seconds"), + FF_ARG(timeStr, "time-formatted"), })); } } diff --git a/src/modules/bios/bios.c b/src/modules/bios/bios.c index 60472c8a3..576d95131 100644 --- a/src/modules/bios/bios.c +++ b/src/modules/bios/bios.c @@ -43,8 +43,8 @@ bool ffPrintBios(FFBiosOptions* options) { ffStrbufClear(&key); FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(bios.type, "type"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(bios.type, "type"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -60,11 +60,11 @@ bool ffPrintBios(FFBiosOptions* options) else { FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(bios.date, "date"), - FF_FORMAT_ARG(bios.release, "release"), - FF_FORMAT_ARG(bios.vendor, "vendor"), - FF_FORMAT_ARG(bios.version, "version"), - FF_FORMAT_ARG(bios.type, "type"), + FF_ARG(bios.date, "date"), + FF_ARG(bios.release, "release"), + FF_ARG(bios.vendor, "vendor"), + FF_ARG(bios.version, "version"), + FF_ARG(bios.type, "type"), })); } success = true; diff --git a/src/modules/bluetooth/bluetooth.c b/src/modules/bluetooth/bluetooth.c index 810a62523..3534103a3 100644 --- a/src/modules/bluetooth/bluetooth.c +++ b/src/modules/bluetooth/bluetooth.c @@ -46,12 +46,12 @@ static void printDevice(FFBluetoothOptions* options, const FFBluetoothResult* de ffPercentAppendBar(&percentageBar, device->battery, options->percent, &options->moduleArgs); FF_PRINT_FORMAT_CHECKED(FF_BLUETOOTH_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(device->name, "name"), - FF_FORMAT_ARG(device->address, "address"), - FF_FORMAT_ARG(device->type, "type"), - FF_FORMAT_ARG(percentageNum, "battery-percentage"), - FF_FORMAT_ARG(device->connected, "connected"), - FF_FORMAT_ARG(percentageBar, "battery-percentage-bar"), + FF_ARG(device->name, "name"), + FF_ARG(device->address, "address"), + FF_ARG(device->type, "type"), + FF_ARG(percentageNum, "battery-percentage"), + FF_ARG(device->connected, "connected"), + FF_ARG(percentageBar, "battery-percentage-bar"), })); } } diff --git a/src/modules/bluetoothradio/bluetoothradio.c b/src/modules/bluetoothradio/bluetoothradio.c index 37a7e12d2..eda2466c2 100644 --- a/src/modules/bluetoothradio/bluetoothradio.c +++ b/src/modules/bluetoothradio/bluetoothradio.c @@ -17,9 +17,9 @@ static void printDevice(FFBluetoothRadioOptions* options, const FFBluetoothRadio else { FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(radio->name, "name"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(radio->name, "name"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -55,14 +55,14 @@ static void printDevice(FFBluetoothRadioOptions* options, const FFBluetoothRadio else { FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(radio->name, "name"), - FF_FORMAT_ARG(radio->address, "address"), - FF_FORMAT_ARG(radio->lmpVersion, "lmp-version"), - FF_FORMAT_ARG(radio->lmpSubversion, "lmp-subversion"), - FF_FORMAT_ARG(version, "version"), - FF_FORMAT_ARG(radio->vendor, "vendor"), - FF_FORMAT_ARG(radio->discoverable, "discoverable"), - FF_FORMAT_ARG(radio->connectable, "connectable"), + FF_ARG(radio->name, "name"), + FF_ARG(radio->address, "address"), + FF_ARG(radio->lmpVersion, "lmp-version"), + FF_ARG(radio->lmpSubversion, "lmp-subversion"), + FF_ARG(version, "version"), + FF_ARG(radio->vendor, "vendor"), + FF_ARG(radio->discoverable, "discoverable"), + FF_ARG(radio->connectable, "connectable"), })); } } diff --git a/src/modules/board/board.c b/src/modules/board/board.c index 98f2a6a0d..2cf1becec 100644 --- a/src/modules/board/board.c +++ b/src/modules/board/board.c @@ -37,10 +37,10 @@ bool ffPrintBoard(FFBoardOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_BOARD_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result.name, "name"), - FF_FORMAT_ARG(result.vendor, "vendor"), - FF_FORMAT_ARG(result.version, "version"), - FF_FORMAT_ARG(result.serial, "serial"), + FF_ARG(result.name, "name"), + FF_ARG(result.vendor, "vendor"), + FF_ARG(result.version, "version"), + FF_ARG(result.serial, "serial"), })); } success = true; diff --git a/src/modules/bootmgr/bootmgr.c b/src/modules/bootmgr/bootmgr.c index a0f0b19c0..a2b6242ac 100644 --- a/src/modules/bootmgr/bootmgr.c +++ b/src/modules/bootmgr/bootmgr.c @@ -40,11 +40,11 @@ bool ffPrintBootmgr(FFBootmgrOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_BOOTMGR_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(bootmgr.name, "name"), - FF_FORMAT_ARG(bootmgr.firmware, "firmware-path"), - FF_FORMAT_ARG(firmwareName, "firmware-name"), - FF_FORMAT_ARG(bootmgr.secureBoot, "secure-boot"), - FF_FORMAT_ARG(bootmgr.order, "order"), + FF_ARG(bootmgr.name, "name"), + FF_ARG(bootmgr.firmware, "firmware-path"), + FF_ARG(firmwareName, "firmware-name"), + FF_ARG(bootmgr.secureBoot, "secure-boot"), + FF_ARG(bootmgr.order, "order"), })); } } diff --git a/src/modules/brightness/brightness.c b/src/modules/brightness/brightness.c index 054ef6e62..bac45b25d 100644 --- a/src/modules/brightness/brightness.c +++ b/src/modules/brightness/brightness.c @@ -56,9 +56,9 @@ bool ffPrintBrightness(FFBrightnessOptions* options) { uint32_t moduleIndex = result.length == 1 ? 0 : index + 1; FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(moduleIndex, "index"), - FF_FORMAT_ARG(item->name, "name"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(moduleIndex, "index"), + FF_ARG(item->name, "name"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -96,13 +96,13 @@ bool ffPrintBrightness(FFBrightnessOptions* options) ffPercentAppendBar(&valueBar, percent, options->percent, &options->moduleArgs); FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(valueNum, "percentage"), - FF_FORMAT_ARG(item->name, "name"), - FF_FORMAT_ARG(item->max, "max"), - FF_FORMAT_ARG(item->min, "min"), - FF_FORMAT_ARG(item->current, "current"), - FF_FORMAT_ARG(valueBar, "percentage-bar"), - FF_FORMAT_ARG(item->builtin, "is-builtin"), + FF_ARG(valueNum, "percentage"), + FF_ARG(item->name, "name"), + FF_ARG(item->max, "max"), + FF_ARG(item->min, "min"), + FF_ARG(item->current, "current"), + FF_ARG(valueBar, "percentage-bar"), + FF_ARG(item->builtin, "is-builtin"), })); } diff --git a/src/modules/btrfs/btrfs.c b/src/modules/btrfs/btrfs.c index 115828b27..a76ca73b0 100644 --- a/src/modules/btrfs/btrfs.c +++ b/src/modules/btrfs/btrfs.c @@ -20,9 +20,9 @@ static void printBtrfs(FFBtrfsOptions* options, FFBtrfsResult* result, uint8_t i { ffStrbufClear(&buffer); FF_PARSE_FORMAT_STRING_CHECKED(&buffer, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(result->name, "name"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(result->name, "name"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -80,19 +80,19 @@ static void printBtrfs(FFBtrfsOptions* options, FFBtrfsResult* result, uint8_t i ffSizeAppendNum(result->sectorSize, §orSizePretty); FF_PRINT_FORMAT_CHECKED(buffer.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(result->name, "name"), - FF_FORMAT_ARG(result->uuid, "uuid"), - FF_FORMAT_ARG(result->devices, "devices"), - FF_FORMAT_ARG(result->features, "features"), - FF_FORMAT_ARG(usedPretty, "used"), - FF_FORMAT_ARG(allocatedPretty, "allocated"), - FF_FORMAT_ARG(totalPretty, "total"), - FF_FORMAT_ARG(usedPercentageNum, "used-percentage"), - FF_FORMAT_ARG(allocatedPercentageNum, "allocated-percentage"), - FF_FORMAT_ARG(usedPercentageBar, "used-percentage-bar"), - FF_FORMAT_ARG(allocatedPercentageBar, "allocated-percentage-bar"), - FF_FORMAT_ARG(nodeSizePretty, "node-size"), - FF_FORMAT_ARG(sectorSizePretty, "sector-size"), + FF_ARG(result->name, "name"), + FF_ARG(result->uuid, "uuid"), + FF_ARG(result->devices, "devices"), + FF_ARG(result->features, "features"), + FF_ARG(usedPretty, "used"), + FF_ARG(allocatedPretty, "allocated"), + FF_ARG(totalPretty, "total"), + FF_ARG(usedPercentageNum, "used-percentage"), + FF_ARG(allocatedPercentageNum, "allocated-percentage"), + FF_ARG(usedPercentageBar, "used-percentage-bar"), + FF_ARG(allocatedPercentageBar, "allocated-percentage-bar"), + FF_ARG(nodeSizePretty, "node-size"), + FF_ARG(sectorSizePretty, "sector-size"), })); } } diff --git a/src/modules/camera/camera.c b/src/modules/camera/camera.c index 108387ef6..6d87f02f1 100644 --- a/src/modules/camera/camera.c +++ b/src/modules/camera/camera.c @@ -26,12 +26,12 @@ static void printDevice(FFCameraOptions* options, const FFCameraResult* device, else { FF_PRINT_FORMAT_CHECKED(FF_CAMERA_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, (((FFformatarg[]) { - FF_FORMAT_ARG(device->name, "name"), - FF_FORMAT_ARG(device->vendor, "vendor"), - FF_FORMAT_ARG(device->colorspace, "colorspace"), - FF_FORMAT_ARG(device->id, "id"), - FF_FORMAT_ARG(device->width, "width"), - FF_FORMAT_ARG(device->height, "height"), + FF_ARG(device->name, "name"), + FF_ARG(device->vendor, "vendor"), + FF_ARG(device->colorspace, "colorspace"), + FF_ARG(device->id, "id"), + FF_ARG(device->width, "width"), + FF_ARG(device->height, "height"), }))); } } diff --git a/src/modules/chassis/chassis.c b/src/modules/chassis/chassis.c index eafb068c1..39b34a25b 100644 --- a/src/modules/chassis/chassis.c +++ b/src/modules/chassis/chassis.c @@ -39,10 +39,10 @@ bool ffPrintChassis(FFChassisOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_CHASSIS_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result.type, "type"), - FF_FORMAT_ARG(result.vendor, "vendor"), - FF_FORMAT_ARG(result.version, "version"), - FF_FORMAT_ARG(result.serial, "serial"), + FF_ARG(result.type, "type"), + FF_ARG(result.vendor, "vendor"), + FF_ARG(result.version, "version"), + FF_ARG(result.serial, "serial"), })); } success = true; diff --git a/src/modules/command/command.c b/src/modules/command/command.c index 84ecba557..b39f4cd6f 100644 --- a/src/modules/command/command.c +++ b/src/modules/command/command.c @@ -35,7 +35,7 @@ bool ffPrintCommand(FFCommandOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_COMMAND_MODULE_NAME, ++index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(line, "result") + FF_ARG(line, "result") })); } } @@ -50,7 +50,7 @@ bool ffPrintCommand(FFCommandOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_COMMAND_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result, "result") + FF_ARG(result, "result") })); } } diff --git a/src/modules/cpu/cpu.c b/src/modules/cpu/cpu.c index 5066d8515..fb154b5f7 100644 --- a/src/modules/cpu/cpu.c +++ b/src/modules/cpu/cpu.c @@ -99,18 +99,18 @@ bool ffPrintCPU(FFCPUOptions* options) FF_STRBUF_AUTO_DESTROY tempStr = ffStrbufCreate(); ffTempsAppendNum(cpu.temperature, &tempStr, options->tempConfig, &options->moduleArgs); FF_PRINT_FORMAT_CHECKED(FF_CPU_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(cpu.name, "name"), - FF_FORMAT_ARG(cpu.vendor, "vendor"), - FF_FORMAT_ARG(cpu.coresPhysical, "cores-physical"), - FF_FORMAT_ARG(cpu.coresLogical, "cores-logical"), - FF_FORMAT_ARG(cpu.coresOnline, "cores-online"), - FF_FORMAT_ARG(freqBase, "freq-base"), - FF_FORMAT_ARG(freqMax, "freq-max"), - FF_FORMAT_ARG(tempStr, "temperature"), - FF_FORMAT_ARG(coreTypes, "core-types"), - FF_FORMAT_ARG(cpu.packages, "packages"), - FF_FORMAT_ARG(cpu.march, "march"), - FF_FORMAT_ARG(cpu.numaNodes, "numa-nodes"), + FF_ARG(cpu.name, "name"), + FF_ARG(cpu.vendor, "vendor"), + FF_ARG(cpu.coresPhysical, "cores-physical"), + FF_ARG(cpu.coresLogical, "cores-logical"), + FF_ARG(cpu.coresOnline, "cores-online"), + FF_ARG(freqBase, "freq-base"), + FF_ARG(freqMax, "freq-max"), + FF_ARG(tempStr, "temperature"), + FF_ARG(coreTypes, "core-types"), + FF_ARG(cpu.packages, "packages"), + FF_ARG(cpu.march, "march"), + FF_ARG(cpu.numaNodes, "numa-nodes"), })); } success = true; diff --git a/src/modules/cpucache/cpucache.c b/src/modules/cpucache/cpucache.c index e3b801c30..7996d3c11 100644 --- a/src/modules/cpucache/cpucache.c +++ b/src/modules/cpucache/cpucache.c @@ -23,9 +23,9 @@ static void printCPUCacheNormal(const FFCPUCacheResult* result, FFCPUCacheOption { uint32_t index = i + 1; FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(levelStr, "level"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(levelStr, "level"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -62,8 +62,8 @@ static void printCPUCacheNormal(const FFCPUCacheResult* result, FFCPUCacheOption FF_STRBUF_AUTO_DESTROY buffer2 = ffStrbufCreate(); ffSizeAppendNum(sum, &buffer2); FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(buffer, "result"), - FF_FORMAT_ARG(buffer2, "sum"), + FF_ARG(buffer, "result"), + FF_ARG(buffer2, "sum"), })); } } @@ -95,8 +95,8 @@ static void printCPUCacheCompact(const FFCPUCacheResult* result, FFCPUCacheOptio FF_STRBUF_AUTO_DESTROY buffer2 = ffStrbufCreate(); ffSizeAppendNum(sum, &buffer2); FF_PRINT_FORMAT_CHECKED(FF_CPUCACHE_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(buffer, "result"), - FF_FORMAT_ARG(buffer2, "sum"), + FF_ARG(buffer, "result"), + FF_ARG(buffer2, "sum"), })); } } diff --git a/src/modules/cpuusage/cpuusage.c b/src/modules/cpuusage/cpuusage.c index 39854b4e4..0013336c8 100644 --- a/src/modules/cpuusage/cpuusage.c +++ b/src/modules/cpuusage/cpuusage.c @@ -104,14 +104,14 @@ bool ffPrintCPUUsage(FFCPUUsageOptions* options) ffPercentAppendBar(&maxBar, maxValue, options->percent, &options->moduleArgs); FF_PRINT_FORMAT_CHECKED(FF_CPUUSAGE_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(avgNum, "avg"), - FF_FORMAT_ARG(maxNum, "max"), - FF_FORMAT_ARG(maxIndex, "max-index"), - FF_FORMAT_ARG(minNum, "min"), - FF_FORMAT_ARG(minIndex, "min-index"), - FF_FORMAT_ARG(avgBar, "avg-bar"), - FF_FORMAT_ARG(maxBar, "max-bar"), - FF_FORMAT_ARG(minBar, "min-bar"), + FF_ARG(avgNum, "avg"), + FF_ARG(maxNum, "max"), + FF_ARG(maxIndex, "max-index"), + FF_ARG(minNum, "min"), + FF_ARG(minIndex, "min-index"), + FF_ARG(avgBar, "avg-bar"), + FF_ARG(maxBar, "max-bar"), + FF_ARG(minBar, "min-bar"), })); } diff --git a/src/modules/cursor/cursor.c b/src/modules/cursor/cursor.c index 29bc1b51a..2cec14031 100644 --- a/src/modules/cursor/cursor.c +++ b/src/modules/cursor/cursor.c @@ -38,8 +38,8 @@ bool ffPrintCursor(FFCursorOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_CURSOR_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result.theme, "theme"), - FF_FORMAT_ARG(result.size, "size"), + FF_ARG(result.theme, "theme"), + FF_ARG(result.size, "size"), })); } diff --git a/src/modules/datetime/datetime.c b/src/modules/datetime/datetime.c index 4222ec2a4..ebcee3e90 100644 --- a/src/modules/datetime/datetime.c +++ b/src/modules/datetime/datetime.c @@ -67,29 +67,29 @@ static void printDateTimeFormat(struct tm* tm, const FFModuleArgs* moduleArgs) strftime(result.timezoneName, sizeof(result.timezoneName), "%Z", tm); FF_PRINT_FORMAT_CHECKED(FF_DATETIME_DISPLAY_NAME, 0, moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result.year, "year"), // 1 - FF_FORMAT_ARG(result.yearShort, "year-short"), // 2 - FF_FORMAT_ARG(result.month, "month"), // 3 - FF_FORMAT_ARG(result.monthPretty, "month-pretty"), // 4 - FF_FORMAT_ARG(result.monthName, "month-name"), // 5 - FF_FORMAT_ARG(result.monthNameShort, "month-name-short"), // 6 - FF_FORMAT_ARG(result.week, "week"), // 7 - FF_FORMAT_ARG(result.weekday, "weekday"), // 8 - FF_FORMAT_ARG(result.weekdayShort, "weekday-short"), // 9 - FF_FORMAT_ARG(result.dayInYear, "day-in-year"), // 10 - FF_FORMAT_ARG(result.dayInMonth, "day-in-month"), // 11 - FF_FORMAT_ARG(result.dayInWeek, "day-in-week"), // 12 - FF_FORMAT_ARG(result.hour, "hour"), // 13 - FF_FORMAT_ARG(result.hourPretty, "hour-pretty"), // 14 - FF_FORMAT_ARG(result.hour12, "hour-12"), // 15 - FF_FORMAT_ARG(result.hour12Pretty, "hour-12-pretty"), // 16 - FF_FORMAT_ARG(result.minute, "minute"), // 17 - FF_FORMAT_ARG(result.minutePretty, "minute-pretty"), // 18 - FF_FORMAT_ARG(result.second, "second"), // 19 - FF_FORMAT_ARG(result.secondPretty, "second-pretty"), // 20 - FF_FORMAT_ARG(result.offsetFromUtc, "offset-from-utc"), // 21 - FF_FORMAT_ARG(result.timezoneName, "timezone-name"), // 22 - FF_FORMAT_ARG(result.dayPretty, "day-pretty"), // 23 + FF_ARG(result.year, "year"), // 1 + FF_ARG(result.yearShort, "year-short"), // 2 + FF_ARG(result.month, "month"), // 3 + FF_ARG(result.monthPretty, "month-pretty"), // 4 + FF_ARG(result.monthName, "month-name"), // 5 + FF_ARG(result.monthNameShort, "month-name-short"), // 6 + FF_ARG(result.week, "week"), // 7 + FF_ARG(result.weekday, "weekday"), // 8 + FF_ARG(result.weekdayShort, "weekday-short"), // 9 + FF_ARG(result.dayInYear, "day-in-year"), // 10 + FF_ARG(result.dayInMonth, "day-in-month"), // 11 + FF_ARG(result.dayInWeek, "day-in-week"), // 12 + FF_ARG(result.hour, "hour"), // 13 + FF_ARG(result.hourPretty, "hour-pretty"), // 14 + FF_ARG(result.hour12, "hour-12"), // 15 + FF_ARG(result.hour12Pretty, "hour-12-pretty"), // 16 + FF_ARG(result.minute, "minute"), // 17 + FF_ARG(result.minutePretty, "minute-pretty"), // 18 + FF_ARG(result.second, "second"), // 19 + FF_ARG(result.secondPretty, "second-pretty"), // 20 + FF_ARG(result.offsetFromUtc, "offset-from-utc"), // 21 + FF_ARG(result.timezoneName, "timezone-name"), // 22 + FF_ARG(result.dayPretty, "day-pretty"), // 23 })); } diff --git a/src/modules/de/de.c b/src/modules/de/de.c index 758d20ef2..a6776a13c 100644 --- a/src/modules/de/de.c +++ b/src/modules/de/de.c @@ -35,9 +35,9 @@ bool ffPrintDE(FFDEOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_DE_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result->deProcessName, "process-name"), - FF_FORMAT_ARG(result->dePrettyName, "pretty-name"), - FF_FORMAT_ARG(version, "version") + FF_ARG(result->deProcessName, "process-name"), + FF_ARG(result->dePrettyName, "pretty-name"), + FF_ARG(version, "version") })); } diff --git a/src/modules/disk/disk.c b/src/modules/disk/disk.c index 947f7482f..65f9aaefa 100644 --- a/src/modules/disk/disk.c +++ b/src/modules/disk/disk.c @@ -46,14 +46,14 @@ static void printDisk(FFDiskOptions* options, const FFDisk* disk, uint32_t index } FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(disk->mountpoint, "mountpoint"), - FF_FORMAT_ARG(disk->name, "name"), - FF_FORMAT_ARG(disk->mountFrom, "mount-from"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(disk->filesystem, "filesystem"), - FF_FORMAT_ARG(mountpointLink, "mountpoint-link"), - FF_FORMAT_ARG(nameLink, "name-link"), + FF_ARG(disk->mountpoint, "mountpoint"), + FF_ARG(disk->name, "name"), + FF_ARG(disk->mountFrom, "mount-from"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(disk->filesystem, "filesystem"), + FF_ARG(mountpointLink, "mountpoint-link"), + FF_ARG(nameLink, "name-link"), })); } @@ -159,32 +159,32 @@ static void printDisk(FFDiskOptions* options, const FFDisk* disk, uint32_t index FFTimeGetAgeResult age = ffTimeGetAge(disk->createTime, now); FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(usedPretty, "size-used"), - FF_FORMAT_ARG(totalPretty, "size-total"), - FF_FORMAT_ARG(bytesPercentageNum, "size-percentage"), - FF_FORMAT_ARG(disk->filesUsed, "files-used"), - FF_FORMAT_ARG(disk->filesTotal, "files-total"), - FF_FORMAT_ARG(filesPercentageNum, "files-percentage"), - FF_FORMAT_ARG(isExternal, "is-external"), - FF_FORMAT_ARG(isHidden, "is-hidden"), - FF_FORMAT_ARG(disk->filesystem, "filesystem"), - FF_FORMAT_ARG(disk->name, "name"), - FF_FORMAT_ARG(isReadOnly, "is-readonly"), - {FF_FORMAT_ARG_TYPE_STRING, ffTimeToShortStr(disk->createTime), "create-time"}, - FF_FORMAT_ARG(bytesPercentageBar, "size-percentage-bar"), - FF_FORMAT_ARG(filesPercentageBar, "files-percentage-bar"), - FF_FORMAT_ARG(days, "days"), - FF_FORMAT_ARG(hours, "hours"), - FF_FORMAT_ARG(minutes, "minutes"), - FF_FORMAT_ARG(seconds, "seconds"), - FF_FORMAT_ARG(milliseconds, "milliseconds"), - FF_FORMAT_ARG(disk->mountpoint, "mountpoint"), - FF_FORMAT_ARG(disk->mountFrom, "mount-from"), - FF_FORMAT_ARG(age.years, "years"), - FF_FORMAT_ARG(age.daysOfYear, "days-of-year"), - FF_FORMAT_ARG(age.yearsFraction, "years-fraction"), - FF_FORMAT_ARG(freePretty, "size-free"), - FF_FORMAT_ARG(availPretty, "size-available"), + FF_ARG(usedPretty, "size-used"), + FF_ARG(totalPretty, "size-total"), + FF_ARG(bytesPercentageNum, "size-percentage"), + FF_ARG(disk->filesUsed, "files-used"), + FF_ARG(disk->filesTotal, "files-total"), + FF_ARG(filesPercentageNum, "files-percentage"), + FF_ARG(isExternal, "is-external"), + FF_ARG(isHidden, "is-hidden"), + 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(bytesPercentageBar, "size-percentage-bar"), + FF_ARG(filesPercentageBar, "files-percentage-bar"), + FF_ARG(days, "days"), + FF_ARG(hours, "hours"), + FF_ARG(minutes, "minutes"), + FF_ARG(seconds, "seconds"), + FF_ARG(milliseconds, "milliseconds"), + FF_ARG(disk->mountpoint, "mountpoint"), + FF_ARG(disk->mountFrom, "mount-from"), + FF_ARG(age.years, "years"), + FF_ARG(age.daysOfYear, "days-of-year"), + FF_ARG(age.yearsFraction, "years-fraction"), + FF_ARG(freePretty, "size-free"), + FF_ARG(availPretty, "size-available"), })); } } diff --git a/src/modules/diskio/diskio.c b/src/modules/diskio/diskio.c index f9e113ccf..8aa1d9914 100644 --- a/src/modules/diskio/diskio.c +++ b/src/modules/diskio/diskio.c @@ -22,10 +22,10 @@ static void formatKey(const FFDiskIOOptions* options, FFDiskIOResult* dev, uint3 { ffStrbufClear(key); FF_PARSE_FORMAT_STRING_CHECKED(key, &options->moduleArgs.key, ((FFformatarg[]){ - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(dev->name, "name"), - FF_FORMAT_ARG(dev->devPath, "dev-path"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(dev->name, "name"), + FF_ARG(dev->devPath, "dev-path"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } } @@ -75,14 +75,14 @@ bool ffPrintDiskIO(FFDiskIOOptions* options) if (!options->detectTotal) ffStrbufAppendS(&buffer2, "/s"); FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]){ - FF_FORMAT_ARG(buffer, "size-read"), - FF_FORMAT_ARG(buffer2, "size-written"), - FF_FORMAT_ARG(dev->name, "name"), - FF_FORMAT_ARG(dev->devPath, "dev-path"), - FF_FORMAT_ARG(dev->bytesRead, "bytes-read"), - FF_FORMAT_ARG(dev->bytesWritten, "bytes-written"), - FF_FORMAT_ARG(dev->readCount, "read-count"), - FF_FORMAT_ARG(dev->writeCount, "write-count"), + FF_ARG(buffer, "size-read"), + FF_ARG(buffer2, "size-written"), + FF_ARG(dev->name, "name"), + FF_ARG(dev->devPath, "dev-path"), + FF_ARG(dev->bytesRead, "bytes-read"), + FF_ARG(dev->bytesWritten, "bytes-written"), + FF_ARG(dev->readCount, "read-count"), + FF_ARG(dev->writeCount, "write-count"), })); } ++index; diff --git a/src/modules/display/display.c b/src/modules/display/display.c index 9a92b361a..f25ff49a1 100644 --- a/src/modules/display/display.c +++ b/src/modules/display/display.c @@ -92,10 +92,10 @@ bool ffPrintDisplay(FFDisplayOptions* options) else { FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(moduleIndex, "index"), - FF_FORMAT_ARG(result->name, "name"), - FF_FORMAT_ARG(displayType, "type"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(moduleIndex, "index"), + FF_ARG(result->name, "name"), + FF_ARG(displayType, "type"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -192,30 +192,30 @@ bool ffPrintDisplay(FFDisplayOptions* options) buf[0] = '\0'; FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(result->width, "width"), - FF_FORMAT_ARG(result->height, "height"), - FF_FORMAT_ARG(refreshRate, "refresh-rate"), - FF_FORMAT_ARG(result->scaledWidth, "scaled-width"), - FF_FORMAT_ARG(result->scaledHeight, "scaled-height"), - FF_FORMAT_ARG(result->name, "name"), - FF_FORMAT_ARG(displayType, "type"), - FF_FORMAT_ARG(result->rotation, "rotation"), - FF_FORMAT_ARG(result->primary, "is-primary"), - FF_FORMAT_ARG(result->physicalWidth, "physical-width"), - FF_FORMAT_ARG(result->physicalHeight, "physical-height"), - FF_FORMAT_ARG(iInch, "inch"), - FF_FORMAT_ARG(iPpi, "ppi"), - FF_FORMAT_ARG(result->bitDepth, "bit-depth"), - FF_FORMAT_ARG(hdrEnabled, "hdr-enabled"), - FF_FORMAT_ARG(result->manufactureYear, "manufacture-year"), - FF_FORMAT_ARG(result->manufactureWeek, "manufacture-week"), - FF_FORMAT_ARG(buf, "serial"), - FF_FORMAT_ARG(result->platformApi, "platform-api"), - FF_FORMAT_ARG(hdrCompatible, "hdr-compatible"), - FF_FORMAT_ARG(scaleFactor, "scale-factor"), - FF_FORMAT_ARG(result->preferredWidth, "preferred-width"), - FF_FORMAT_ARG(result->preferredHeight, "preferred-height"), - FF_FORMAT_ARG(preferredRefreshRate, "preferred-refresh-rate"), + FF_ARG(result->width, "width"), + FF_ARG(result->height, "height"), + FF_ARG(refreshRate, "refresh-rate"), + FF_ARG(result->scaledWidth, "scaled-width"), + FF_ARG(result->scaledHeight, "scaled-height"), + FF_ARG(result->name, "name"), + FF_ARG(displayType, "type"), + FF_ARG(result->rotation, "rotation"), + FF_ARG(result->primary, "is-primary"), + FF_ARG(result->physicalWidth, "physical-width"), + FF_ARG(result->physicalHeight, "physical-height"), + FF_ARG(iInch, "inch"), + FF_ARG(iPpi, "ppi"), + FF_ARG(result->bitDepth, "bit-depth"), + FF_ARG(hdrEnabled, "hdr-enabled"), + FF_ARG(result->manufactureYear, "manufacture-year"), + FF_ARG(result->manufactureWeek, "manufacture-week"), + FF_ARG(buf, "serial"), + FF_ARG(result->platformApi, "platform-api"), + FF_ARG(hdrCompatible, "hdr-compatible"), + FF_ARG(scaleFactor, "scale-factor"), + FF_ARG(result->preferredWidth, "preferred-width"), + FF_ARG(result->preferredHeight, "preferred-height"), + FF_ARG(preferredRefreshRate, "preferred-refresh-rate"), })); } } diff --git a/src/modules/dns/dns.c b/src/modules/dns/dns.c index 4db146543..428419f23 100644 --- a/src/modules/dns/dns.c +++ b/src/modules/dns/dns.c @@ -47,7 +47,7 @@ bool ffPrintDNS(FFDNSOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_DNS_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(buf, "result"), + FF_ARG(buf, "result"), })); } diff --git a/src/modules/editor/editor.c b/src/modules/editor/editor.c index 7fab5145d..c6ab33fcb 100644 --- a/src/modules/editor/editor.c +++ b/src/modules/editor/editor.c @@ -40,11 +40,11 @@ bool ffPrintEditor(FFEditorOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_EDITOR_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result.type, "type"), - FF_FORMAT_ARG(result.name, "name"), - FF_FORMAT_ARG(result.exe, "exe-name"), - FF_FORMAT_ARG(result.path, "path"), - FF_FORMAT_ARG(result.version, "version"), + FF_ARG(result.type, "type"), + FF_ARG(result.name, "name"), + FF_ARG(result.exe, "exe-name"), + FF_ARG(result.path, "path"), + FF_ARG(result.version, "version"), })); } diff --git a/src/modules/font/font.c b/src/modules/font/font.c index 60da087f3..56d939c1b 100644 --- a/src/modules/font/font.c +++ b/src/modules/font/font.c @@ -28,11 +28,11 @@ bool ffPrintFont(FFFontOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_FONT_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(font.fonts[0], "font1"), - FF_FORMAT_ARG(font.fonts[1], "font2"), - FF_FORMAT_ARG(font.fonts[2], "font3"), - FF_FORMAT_ARG(font.fonts[3], "font4"), - FF_FORMAT_ARG(font.display, "combined"), + FF_ARG(font.fonts[0], "font1"), + FF_ARG(font.fonts[1], "font2"), + FF_ARG(font.fonts[2], "font3"), + FF_ARG(font.fonts[3], "font4"), + FF_ARG(font.display, "combined"), })); } diff --git a/src/modules/gamepad/gamepad.c b/src/modules/gamepad/gamepad.c index f1f89e269..87fcc1be9 100644 --- a/src/modules/gamepad/gamepad.c +++ b/src/modules/gamepad/gamepad.c @@ -42,10 +42,10 @@ static void printDevice(FFGamepadOptions* options, const FFGamepadDevice* device ffPercentAppendBar(&percentageBar, device->battery, options->percent, &options->moduleArgs); FF_PRINT_FORMAT_CHECKED(FF_GAMEPAD_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(device->name, "name"), - FF_FORMAT_ARG(device->serial, "serial"), - FF_FORMAT_ARG(percentageNum, "battery-percentage"), - FF_FORMAT_ARG(percentageBar, "battery-percentage-bar"), + FF_ARG(device->name, "name"), + FF_ARG(device->serial, "serial"), + FF_ARG(percentageNum, "battery-percentage"), + FF_ARG(percentageBar, "battery-percentage-bar"), })); } } diff --git a/src/modules/gpu/gpu.c b/src/modules/gpu/gpu.c index a2293a147..d9fd55065 100644 --- a/src/modules/gpu/gpu.c +++ b/src/modules/gpu/gpu.c @@ -135,26 +135,26 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu } FF_PRINT_FORMAT_CHECKED(FF_GPU_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(gpu->vendor, "vendor"), - FF_FORMAT_ARG(gpu->name, "name"), - FF_FORMAT_ARG(gpu->driver, "driver"), - FF_FORMAT_ARG(tempStr, "temperature"), - FF_FORMAT_ARG(gpu->coreCount, "core-count"), - FF_FORMAT_ARG(type, "type"), - FF_FORMAT_ARG(dTotal, "dedicated-total"), - FF_FORMAT_ARG(dUsed, "dedicated-used"), - FF_FORMAT_ARG(sTotal, "shared-total"), - FF_FORMAT_ARG(sUsed, "shared-used"), - FF_FORMAT_ARG(gpu->platformApi, "platform-api"), - FF_FORMAT_ARG(frequency, "frequency"), - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(dPercentNum, "dedicated-percentage-num"), - FF_FORMAT_ARG(dPercentBar, "dedicated-percentage-bar"), - FF_FORMAT_ARG(sPercentNum, "shared-percentage-num"), - FF_FORMAT_ARG(sPercentBar, "shared-percentage-bar"), - FF_FORMAT_ARG(coreUsageNum, "core-usage-num"), - FF_FORMAT_ARG(coreUsageBar, "core-usage-bar"), - FF_FORMAT_ARG(gpu->memoryType, "memory-type"), + FF_ARG(gpu->vendor, "vendor"), + FF_ARG(gpu->name, "name"), + FF_ARG(gpu->driver, "driver"), + FF_ARG(tempStr, "temperature"), + FF_ARG(gpu->coreCount, "core-count"), + FF_ARG(type, "type"), + FF_ARG(dTotal, "dedicated-total"), + FF_ARG(dUsed, "dedicated-used"), + FF_ARG(sTotal, "shared-total"), + FF_ARG(sUsed, "shared-used"), + FF_ARG(gpu->platformApi, "platform-api"), + FF_ARG(frequency, "frequency"), + FF_ARG(index, "index"), + FF_ARG(dPercentNum, "dedicated-percentage-num"), + FF_ARG(dPercentBar, "dedicated-percentage-bar"), + FF_ARG(sPercentNum, "shared-percentage-num"), + FF_ARG(sPercentBar, "shared-percentage-bar"), + FF_ARG(coreUsageNum, "core-usage-num"), + FF_ARG(coreUsageBar, "core-usage-bar"), + FF_ARG(gpu->memoryType, "memory-type"), })); } } diff --git a/src/modules/host/host.c b/src/modules/host/host.c index 5c7d86970..cf45e174c 100644 --- a/src/modules/host/host.c +++ b/src/modules/host/host.c @@ -48,13 +48,13 @@ bool ffPrintHost(FFHostOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_HOST_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(host.family, "family"), - FF_FORMAT_ARG(host.name, "name"), - FF_FORMAT_ARG(host.version, "version"), - FF_FORMAT_ARG(host.sku, "sku"), - FF_FORMAT_ARG(host.vendor, "vendor"), - FF_FORMAT_ARG(host.serial, "serial"), - FF_FORMAT_ARG(host.uuid, "uuid"), + FF_ARG(host.family, "family"), + FF_ARG(host.name, "name"), + FF_ARG(host.version, "version"), + FF_ARG(host.sku, "sku"), + FF_ARG(host.vendor, "vendor"), + FF_ARG(host.serial, "serial"), + FF_ARG(host.uuid, "uuid"), })); } success = true; diff --git a/src/modules/icons/icons.c b/src/modules/icons/icons.c index b2c8bbfdf..98dfad3b1 100644 --- a/src/modules/icons/icons.c +++ b/src/modules/icons/icons.c @@ -35,8 +35,8 @@ bool ffPrintIcons(FFIconsOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_ICONS_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result.icons1, "icons1"), - FF_FORMAT_ARG(result.icons2, "icons2"), + FF_ARG(result.icons1, "icons1"), + FF_ARG(result.icons2, "icons2"), })); } success = true; diff --git a/src/modules/initsystem/initsystem.c b/src/modules/initsystem/initsystem.c index e64274dab..f61698340 100644 --- a/src/modules/initsystem/initsystem.c +++ b/src/modules/initsystem/initsystem.c @@ -36,10 +36,10 @@ bool ffPrintInitSystem(FFInitSystemOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_INITSYSTEM_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result.name, "name"), - FF_FORMAT_ARG(result.exe, "exe"), - FF_FORMAT_ARG(result.version, "version"), - FF_FORMAT_ARG(result.pid, "pid"), + FF_ARG(result.name, "name"), + FF_ARG(result.exe, "exe"), + FF_ARG(result.version, "version"), + FF_ARG(result.pid, "pid"), })); } success = true; diff --git a/src/modules/kernel/kernel.c b/src/modules/kernel/kernel.c index 97406f58a..fc26de782 100644 --- a/src/modules/kernel/kernel.c +++ b/src/modules/kernel/kernel.c @@ -17,11 +17,11 @@ bool ffPrintKernel(FFKernelOptions* options) FF_STRBUF_AUTO_DESTROY str = ffStrbufCreate(); ffSizeAppendNum(info->pageSize, &str); FF_PRINT_FORMAT_CHECKED(FF_KERNEL_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(info->name, "sysname"), - FF_FORMAT_ARG(info->release, "release"), - FF_FORMAT_ARG(info->version, "version"), - FF_FORMAT_ARG(info->architecture, "arch"), - FF_FORMAT_ARG(str, "page-size"), + FF_ARG(info->name, "sysname"), + FF_ARG(info->release, "release"), + FF_ARG(info->version, "version"), + FF_ARG(info->architecture, "arch"), + FF_ARG(str, "page-size"), })); } diff --git a/src/modules/keyboard/keyboard.c b/src/modules/keyboard/keyboard.c index f9a33a1ca..b3b2e28d9 100644 --- a/src/modules/keyboard/keyboard.c +++ b/src/modules/keyboard/keyboard.c @@ -15,8 +15,8 @@ static void printDevice(FFKeyboardOptions* options, const FFKeyboardDevice* devi else { FF_PRINT_FORMAT_CHECKED(FF_KEYBOARD_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(device->name, "name"), - FF_FORMAT_ARG(device->serial, "serial"), + FF_ARG(device->name, "name"), + FF_ARG(device->serial, "serial"), })); } } diff --git a/src/modules/lm/lm.c b/src/modules/lm/lm.c index ad78ae3ef..742793b6f 100644 --- a/src/modules/lm/lm.c +++ b/src/modules/lm/lm.c @@ -38,9 +38,9 @@ bool ffPrintLM(FFLMOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_LM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result.service, "service"), - FF_FORMAT_ARG(result.type, "type"), - FF_FORMAT_ARG(result.version, "version"), + FF_ARG(result.service, "service"), + FF_ARG(result.type, "type"), + FF_ARG(result.version, "version"), })); } success = true; diff --git a/src/modules/loadavg/loadavg.c b/src/modules/loadavg/loadavg.c index 4dc996737..b7262c64f 100644 --- a/src/modules/loadavg/loadavg.c +++ b/src/modules/loadavg/loadavg.c @@ -47,9 +47,9 @@ bool ffPrintLoadavg(FFLoadavgOptions* options) { ffStrbufClear(&buffer); FF_PARSE_FORMAT_STRING_CHECKED(&buffer, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(duration, "duration"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(duration, "duration"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -83,9 +83,9 @@ bool ffPrintLoadavg(FFLoadavgOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_LOADAVG_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result[0], "loadavg1"), - FF_FORMAT_ARG(result[1], "loadavg2"), - FF_FORMAT_ARG(result[2], "loadavg3"), + FF_ARG(result[0], "loadavg1"), + FF_ARG(result[1], "loadavg2"), + FF_ARG(result[2], "loadavg3"), })); } diff --git a/src/modules/locale/locale.c b/src/modules/locale/locale.c index e9574773c..78aac0c7e 100644 --- a/src/modules/locale/locale.c +++ b/src/modules/locale/locale.c @@ -23,7 +23,7 @@ bool ffPrintLocale(FFLocaleOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_LOCALE_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(locale, "result") + FF_ARG(locale, "result") })); } diff --git a/src/modules/localip/localip.c b/src/modules/localip/localip.c index 35d0489bd..8eac79a6f 100644 --- a/src/modules/localip/localip.c +++ b/src/modules/localip/localip.c @@ -25,10 +25,10 @@ static void formatKey(const FFLocalIpOptions* options, FFLocalIpResult* ip, uint { ffStrbufClear(key); FF_PARSE_FORMAT_STRING_CHECKED(key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(ip->name, "ifname"), - FF_FORMAT_ARG(ip->mac, "mac"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(ip->name, "ifname"), + FF_ARG(ip->mac, "mac"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } } @@ -151,14 +151,14 @@ bool ffPrintLocalIp(FFLocalIpOptions* options) if (ip->speed > 0) appendSpeed(ip, &buffer); FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]){ - FF_FORMAT_ARG(ip->ipv4, "ipv4"), - FF_FORMAT_ARG(ip->ipv6, "ipv6"), - FF_FORMAT_ARG(ip->mac, "mac"), - FF_FORMAT_ARG(ip->name, "ifname"), - FF_FORMAT_ARG(ip->defaultRoute, "is-default-route"), - FF_FORMAT_ARG(ip->mtu, "mtu"), - FF_FORMAT_ARG(buffer, "speed"), - FF_FORMAT_ARG(ip->flags, "flags"), + FF_ARG(ip->ipv4, "ipv4"), + FF_ARG(ip->ipv6, "ipv6"), + FF_ARG(ip->mac, "mac"), + FF_ARG(ip->name, "ifname"), + FF_ARG(ip->defaultRoute, "is-default-route"), + FF_ARG(ip->mtu, "mtu"), + FF_ARG(buffer, "speed"), + FF_ARG(ip->flags, "flags"), })); } ++index; diff --git a/src/modules/media/media.c b/src/modules/media/media.c index 8540a2568..252b84b5a 100644 --- a/src/modules/media/media.c +++ b/src/modules/media/media.c @@ -94,14 +94,14 @@ bool ffPrintMedia(FFMediaOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_MEDIA_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(songPretty, "combined"), - FF_FORMAT_ARG(media->song, "title"), - FF_FORMAT_ARG(media->artist, "artist"), - FF_FORMAT_ARG(media->album, "album"), - FF_FORMAT_ARG(media->status, "status"), - FF_FORMAT_ARG(media->player, "player-name"), - FF_FORMAT_ARG(media->playerId, "player-id"), - FF_FORMAT_ARG(media->url, "url"), + FF_ARG(songPretty, "combined"), + FF_ARG(media->song, "title"), + FF_ARG(media->artist, "artist"), + FF_ARG(media->album, "album"), + FF_ARG(media->status, "status"), + FF_ARG(media->player, "player-name"), + FF_ARG(media->playerId, "player-id"), + FF_ARG(media->url, "url"), })); } diff --git a/src/modules/memory/memory.c b/src/modules/memory/memory.c index e3e911666..7f86de480 100644 --- a/src/modules/memory/memory.c +++ b/src/modules/memory/memory.c @@ -63,10 +63,10 @@ bool ffPrintMemory(FFMemoryOptions* options) ffPercentAppendBar(&percentageBar, percentage, options->percent, &options->moduleArgs); FF_PRINT_FORMAT_CHECKED(FF_MEMORY_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(usedPretty, "used"), - FF_FORMAT_ARG(totalPretty, "total"), - FF_FORMAT_ARG(percentageNum, "percentage"), - FF_FORMAT_ARG(percentageBar, "percentage-bar"), + FF_ARG(usedPretty, "used"), + FF_ARG(totalPretty, "total"), + FF_ARG(percentageNum, "percentage"), + FF_ARG(percentageBar, "percentage-bar"), })); } diff --git a/src/modules/monitor/monitor.c b/src/modules/monitor/monitor.c index 708441848..e3c12b6be 100644 --- a/src/modules/monitor/monitor.c +++ b/src/modules/monitor/monitor.c @@ -35,9 +35,9 @@ bool ffPrintMonitor(FFMonitorOptions* options) { uint32_t moduleIndex = result->displays.length == 1 ? 0 : index + 1; FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(moduleIndex, "index"), - FF_FORMAT_ARG(display->name, "name"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(moduleIndex, "index"), + FF_ARG(display->name, "name"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -66,18 +66,18 @@ bool ffPrintMonitor(FFMonitorOptions* options) buf[0] = '\0'; FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(display->name, "name"), - FF_FORMAT_ARG(display->width, "width"), - FF_FORMAT_ARG(display->height, "height"), - FF_FORMAT_ARG(display->physicalWidth, "physical-width"), - FF_FORMAT_ARG(display->physicalHeight, "physical-height"), - FF_FORMAT_ARG(inch, "inch"), - FF_FORMAT_ARG(ppi, "ppi"), - FF_FORMAT_ARG(display->manufactureYear, "manufacture-year"), - FF_FORMAT_ARG(display->manufactureWeek, "manufacture-week"), - FF_FORMAT_ARG(buf, "serial"), - FF_FORMAT_ARG(display->refreshRate, "refresh-rate"), - FF_FORMAT_ARG(hdrCompatible, "hdr-compatible"), + FF_ARG(display->name, "name"), + FF_ARG(display->width, "width"), + FF_ARG(display->height, "height"), + FF_ARG(display->physicalWidth, "physical-width"), + FF_ARG(display->physicalHeight, "physical-height"), + FF_ARG(inch, "inch"), + FF_ARG(ppi, "ppi"), + FF_ARG(display->manufactureYear, "manufacture-year"), + FF_ARG(display->manufactureWeek, "manufacture-week"), + FF_ARG(buf, "serial"), + FF_ARG(display->refreshRate, "refresh-rate"), + FF_ARG(hdrCompatible, "hdr-compatible"), })); } diff --git a/src/modules/mouse/mouse.c b/src/modules/mouse/mouse.c index 8495b1f37..10491ad92 100644 --- a/src/modules/mouse/mouse.c +++ b/src/modules/mouse/mouse.c @@ -15,8 +15,8 @@ static void printDevice(FFMouseOptions* options, const FFMouseDevice* device, ui else { FF_PRINT_FORMAT_CHECKED(FF_MOUSE_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(device->name, "name"), - FF_FORMAT_ARG(device->serial, "serial"), + FF_ARG(device->name, "name"), + FF_ARG(device->serial, "serial"), })); } } diff --git a/src/modules/netio/netio.c b/src/modules/netio/netio.c index 393d82013..1b56abc63 100644 --- a/src/modules/netio/netio.c +++ b/src/modules/netio/netio.c @@ -25,9 +25,9 @@ static void formatKey(const FFNetIOOptions* options, FFNetIOResult* inf, uint32_ { ffStrbufClear(key); FF_PARSE_FORMAT_STRING_CHECKED(key, &options->moduleArgs.key, ((FFformatarg[]){ - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(inf->name, "name"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(inf->name, "name"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } } @@ -80,18 +80,18 @@ bool ffPrintNetIO(FFNetIOOptions* options) if (!options->detectTotal) ffStrbufAppendS(&buffer2, "/s"); FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]){ - FF_FORMAT_ARG(buffer, "rx-size"), - FF_FORMAT_ARG(buffer2, "tx-size"), - FF_FORMAT_ARG(inf->name, "ifname"), - FF_FORMAT_ARG(inf->defaultRoute, "is-default-route"), - FF_FORMAT_ARG(inf->txBytes, "tx-bytes"), - FF_FORMAT_ARG(inf->rxBytes, "rx-bytes"), - FF_FORMAT_ARG(inf->txPackets, "tx-packets"), - FF_FORMAT_ARG(inf->rxPackets, "rx-packets"), - FF_FORMAT_ARG(inf->rxErrors, "rx-errors"), - FF_FORMAT_ARG(inf->txErrors, "tx-errors"), - FF_FORMAT_ARG(inf->rxDrops, "rx-drops"), - FF_FORMAT_ARG(inf->txDrops, "tx-drops"), + FF_ARG(buffer, "rx-size"), + FF_ARG(buffer2, "tx-size"), + FF_ARG(inf->name, "ifname"), + FF_ARG(inf->defaultRoute, "is-default-route"), + FF_ARG(inf->txBytes, "tx-bytes"), + FF_ARG(inf->rxBytes, "rx-bytes"), + FF_ARG(inf->txPackets, "tx-packets"), + FF_ARG(inf->rxPackets, "rx-packets"), + FF_ARG(inf->rxErrors, "rx-errors"), + FF_ARG(inf->txErrors, "tx-errors"), + FF_ARG(inf->rxDrops, "rx-drops"), + FF_ARG(inf->txDrops, "tx-drops"), })); } ++index; diff --git a/src/modules/opencl/opencl.c b/src/modules/opencl/opencl.c index 19e303cf7..7700d4d4f 100644 --- a/src/modules/opencl/opencl.c +++ b/src/modules/opencl/opencl.c @@ -23,9 +23,9 @@ bool ffPrintOpenCL(FFOpenCLOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_OPENCL_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result->version, "version"), - FF_FORMAT_ARG(result->name, "name"), - FF_FORMAT_ARG(result->vendor, "vendor"), + FF_ARG(result->version, "version"), + FF_ARG(result->name, "name"), + FF_ARG(result->vendor, "vendor"), })); } diff --git a/src/modules/opengl/opengl.c b/src/modules/opengl/opengl.c index 47e055af4..9160e8f77 100644 --- a/src/modules/opengl/opengl.c +++ b/src/modules/opengl/opengl.c @@ -29,11 +29,11 @@ bool ffPrintOpenGL(FFOpenGLOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_OPENGL_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result.version, "version"), - FF_FORMAT_ARG(result.renderer, "renderer"), - FF_FORMAT_ARG(result.vendor, "vendor"), - FF_FORMAT_ARG(result.slv, "slv"), - FF_FORMAT_ARG(result.library, "library"), + FF_ARG(result.version, "version"), + FF_ARG(result.renderer, "renderer"), + FF_ARG(result.vendor, "vendor"), + FF_ARG(result.slv, "slv"), + FF_ARG(result.library, "library"), })); } success = true; diff --git a/src/modules/os/os.c b/src/modules/os/os.c index 0b3447ffe..09f2009c1 100644 --- a/src/modules/os/os.c +++ b/src/modules/os/os.c @@ -70,9 +70,9 @@ bool ffPrintOS(FFOSOptions* options) else { FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(instance.state.platform.sysinfo.name, "sysname"), - FF_FORMAT_ARG(os->name, "name"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(instance.state.platform.sysinfo.name, "sysname"), + FF_ARG(os->name, "name"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -98,19 +98,19 @@ bool ffPrintOS(FFOSOptions* options) else { FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]){ - FF_FORMAT_ARG(instance.state.platform.sysinfo.name, "sysname"), - FF_FORMAT_ARG(os->name, "name"), - FF_FORMAT_ARG(os->prettyName, "pretty-name"), - FF_FORMAT_ARG(os->id, "id"), - FF_FORMAT_ARG(os->idLike, "id-like"), - FF_FORMAT_ARG(os->variant, "variant"), - FF_FORMAT_ARG(os->variantID, "variant-id"), - FF_FORMAT_ARG(os->version, "version"), - FF_FORMAT_ARG(os->versionID, "version-id"), - FF_FORMAT_ARG(os->codename, "codename"), - FF_FORMAT_ARG(os->buildID, "build-id"), - FF_FORMAT_ARG(instance.state.platform.sysinfo.architecture, "arch"), - FF_FORMAT_ARG(instance.state.platform.sysinfo.release, "kernel-release"), + FF_ARG(instance.state.platform.sysinfo.name, "sysname"), + FF_ARG(os->name, "name"), + FF_ARG(os->prettyName, "pretty-name"), + FF_ARG(os->id, "id"), + FF_ARG(os->idLike, "id-like"), + FF_ARG(os->variant, "variant"), + FF_ARG(os->variantID, "variant-id"), + FF_ARG(os->version, "version"), + FF_ARG(os->versionID, "version-id"), + FF_ARG(os->codename, "codename"), + FF_ARG(os->buildID, "build-id"), + FF_ARG(instance.state.platform.sysinfo.architecture, "arch"), + FF_ARG(instance.state.platform.sysinfo.release, "kernel-release"), })); } diff --git a/src/modules/packages/packages.c b/src/modules/packages/packages.c index f94337182..6552d53d0 100644 --- a/src/modules/packages/packages.c +++ b/src/modules/packages/packages.c @@ -154,55 +154,55 @@ bool ffPrintPackages(FFPackagesOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_PACKAGES_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(counts.all, "all"), - FF_FORMAT_ARG(counts.pacman, "pacman"), - FF_FORMAT_ARG(counts.pacmanBranch, "pacman-branch"), - FF_FORMAT_ARG(counts.dpkg, "dpkg"), - FF_FORMAT_ARG(counts.rpm, "rpm"), - FF_FORMAT_ARG(counts.emerge, "emerge"), - FF_FORMAT_ARG(counts.eopkg, "eopkg"), - FF_FORMAT_ARG(counts.xbps, "xbps"), - FF_FORMAT_ARG(counts.nixSystem, "nix-system"), - FF_FORMAT_ARG(counts.nixUser, "nix-user"), - FF_FORMAT_ARG(counts.nixDefault, "nix-default"), - FF_FORMAT_ARG(counts.apk, "apk"), - FF_FORMAT_ARG(counts.pkg, "pkg"), - FF_FORMAT_ARG(counts.flatpakSystem, "flatpak-system"), - FF_FORMAT_ARG(counts.flatpakUser, "flatpak-user"), - FF_FORMAT_ARG(counts.snap, "snap"), - FF_FORMAT_ARG(counts.brew, "brew"), - FF_FORMAT_ARG(counts.brewCask, "brew-cask"), - FF_FORMAT_ARG(counts.macports, "macports"), - FF_FORMAT_ARG(counts.scoopUser, "scoop-user"), - FF_FORMAT_ARG(counts.scoopGlobal, "scoop-global"), - FF_FORMAT_ARG(counts.choco, "choco"), - FF_FORMAT_ARG(counts.pkgtool, "pkgtool"), - FF_FORMAT_ARG(counts.paludis, "paludis"), - FF_FORMAT_ARG(counts.winget, "winget"), - FF_FORMAT_ARG(counts.opkg, "opkg"), - FF_FORMAT_ARG(counts.amSystem, "am-system"), - FF_FORMAT_ARG(counts.sorcery, "sorcery"), - FF_FORMAT_ARG(counts.lpkg, "lpkg"), - FF_FORMAT_ARG(counts.lpkgbuild, "lpkgbuild"), - FF_FORMAT_ARG(counts.guixSystem, "guix-system"), - FF_FORMAT_ARG(counts.guixUser, "guix-user"), - FF_FORMAT_ARG(counts.guixHome, "guix-home"), - FF_FORMAT_ARG(counts.linglong, "linglong"), - FF_FORMAT_ARG(counts.pacstall, "pacstall"), - FF_FORMAT_ARG(counts.mport, "mport"), - FF_FORMAT_ARG(counts.amUser, "am-user"), - FF_FORMAT_ARG(counts.pkgsrc, "pkgsrc"), - FF_FORMAT_ARG(counts.hpkgSystem, "hpkg-system"), - FF_FORMAT_ARG(counts.hpkgUser, "hpkg-user"), - FF_FORMAT_ARG(counts.pisi, "pisi"), - FF_FORMAT_ARG(counts.soar, "soar"), - FF_FORMAT_ARG(counts.kiss, "kiss"), - FF_FORMAT_ARG(counts.moss, "moss"), - FF_FORMAT_ARG(nixAll, "nix-all"), - FF_FORMAT_ARG(flatpakAll, "flatpak-all"), - FF_FORMAT_ARG(brewAll, "brew-all"), - FF_FORMAT_ARG(guixAll, "guix-all"), - FF_FORMAT_ARG(hpkgAll, "hpkg-all"), + FF_ARG(counts.all, "all"), + FF_ARG(counts.pacman, "pacman"), + FF_ARG(counts.pacmanBranch, "pacman-branch"), + FF_ARG(counts.dpkg, "dpkg"), + FF_ARG(counts.rpm, "rpm"), + FF_ARG(counts.emerge, "emerge"), + FF_ARG(counts.eopkg, "eopkg"), + FF_ARG(counts.xbps, "xbps"), + FF_ARG(counts.nixSystem, "nix-system"), + FF_ARG(counts.nixUser, "nix-user"), + FF_ARG(counts.nixDefault, "nix-default"), + FF_ARG(counts.apk, "apk"), + FF_ARG(counts.pkg, "pkg"), + FF_ARG(counts.flatpakSystem, "flatpak-system"), + FF_ARG(counts.flatpakUser, "flatpak-user"), + FF_ARG(counts.snap, "snap"), + FF_ARG(counts.brew, "brew"), + FF_ARG(counts.brewCask, "brew-cask"), + FF_ARG(counts.macports, "macports"), + FF_ARG(counts.scoopUser, "scoop-user"), + FF_ARG(counts.scoopGlobal, "scoop-global"), + FF_ARG(counts.choco, "choco"), + FF_ARG(counts.pkgtool, "pkgtool"), + FF_ARG(counts.paludis, "paludis"), + FF_ARG(counts.winget, "winget"), + FF_ARG(counts.opkg, "opkg"), + FF_ARG(counts.amSystem, "am-system"), + FF_ARG(counts.sorcery, "sorcery"), + FF_ARG(counts.lpkg, "lpkg"), + FF_ARG(counts.lpkgbuild, "lpkgbuild"), + FF_ARG(counts.guixSystem, "guix-system"), + FF_ARG(counts.guixUser, "guix-user"), + FF_ARG(counts.guixHome, "guix-home"), + FF_ARG(counts.linglong, "linglong"), + FF_ARG(counts.pacstall, "pacstall"), + FF_ARG(counts.mport, "mport"), + FF_ARG(counts.amUser, "am-user"), + FF_ARG(counts.pkgsrc, "pkgsrc"), + FF_ARG(counts.hpkgSystem, "hpkg-system"), + FF_ARG(counts.hpkgUser, "hpkg-user"), + FF_ARG(counts.pisi, "pisi"), + FF_ARG(counts.soar, "soar"), + FF_ARG(counts.kiss, "kiss"), + FF_ARG(counts.moss, "moss"), + FF_ARG(nixAll, "nix-all"), + FF_ARG(flatpakAll, "flatpak-all"), + FF_ARG(brewAll, "brew-all"), + FF_ARG(guixAll, "guix-all"), + FF_ARG(hpkgAll, "hpkg-all"), })); } diff --git a/src/modules/physicaldisk/physicaldisk.c b/src/modules/physicaldisk/physicaldisk.c index 83de62739..1980842ba 100644 --- a/src/modules/physicaldisk/physicaldisk.c +++ b/src/modules/physicaldisk/physicaldisk.c @@ -23,10 +23,10 @@ static void formatKey(const FFPhysicalDiskOptions* options, FFPhysicalDiskResult { ffStrbufClear(key); FF_PARSE_FORMAT_STRING_CHECKED(key, &options->moduleArgs.key, ((FFformatarg[]){ - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(dev->name, "name"), - FF_FORMAT_ARG(dev->devPath, "dev-path"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(dev->name, "name"), + FF_ARG(dev->devPath, "dev-path"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } } @@ -108,16 +108,16 @@ bool ffPrintPhysicalDisk(FFPhysicalDiskOptions* options) if (dev->type & FF_PHYSICALDISK_TYPE_READWRITE) readOnlyType = "Read-write"; FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]){ - FF_FORMAT_ARG(buffer, "size"), - FF_FORMAT_ARG(dev->name, "name"), - FF_FORMAT_ARG(dev->interconnect, "interconnect"), - FF_FORMAT_ARG(dev->devPath, "dev-path"), - FF_FORMAT_ARG(dev->serial, "serial"), - FF_FORMAT_ARG(physicalType, "physical-type"), - FF_FORMAT_ARG(removableType, "removable-type"), - FF_FORMAT_ARG(readOnlyType, "readonly-type"), - FF_FORMAT_ARG(dev->revision, "revision"), - FF_FORMAT_ARG(tempStr, "temperature"), + FF_ARG(buffer, "size"), + FF_ARG(dev->name, "name"), + FF_ARG(dev->interconnect, "interconnect"), + FF_ARG(dev->devPath, "dev-path"), + FF_ARG(dev->serial, "serial"), + FF_ARG(physicalType, "physical-type"), + FF_ARG(removableType, "removable-type"), + FF_ARG(readOnlyType, "readonly-type"), + FF_ARG(dev->revision, "revision"), + FF_ARG(tempStr, "temperature"), })); } ++index; diff --git a/src/modules/physicalmemory/physicalmemory.c b/src/modules/physicalmemory/physicalmemory.c index ca255d695..c487c3bdf 100644 --- a/src/modules/physicalmemory/physicalmemory.c +++ b/src/modules/physicalmemory/physicalmemory.c @@ -78,18 +78,18 @@ bool ffPrintPhysicalMemory(FFPhysicalMemoryOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_PHYSICALMEMORY_DISPLAY_NAME, (uint8_t) (i + 1), &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(device->size, "bytes"), - FF_FORMAT_ARG(prettySize, "size"), - FF_FORMAT_ARG(device->maxSpeed, "max-speed"), - FF_FORMAT_ARG(device->runningSpeed, "running-speed"), - FF_FORMAT_ARG(device->type, "type"), - FF_FORMAT_ARG(device->formFactor, "form-factor"), - FF_FORMAT_ARG(device->locator, "locator"), - FF_FORMAT_ARG(device->vendor, "vendor"), - FF_FORMAT_ARG(device->serial, "serial"), - FF_FORMAT_ARG(device->partNumber, "part-number"), - FF_FORMAT_ARG(device->ecc, "is-ecc-enabled"), - FF_FORMAT_ARG(device->installed, "is-installed"), + FF_ARG(device->size, "bytes"), + FF_ARG(prettySize, "size"), + FF_ARG(device->maxSpeed, "max-speed"), + FF_ARG(device->runningSpeed, "running-speed"), + FF_ARG(device->type, "type"), + FF_ARG(device->formFactor, "form-factor"), + FF_ARG(device->locator, "locator"), + FF_ARG(device->vendor, "vendor"), + FF_ARG(device->serial, "serial"), + FF_ARG(device->partNumber, "part-number"), + FF_ARG(device->ecc, "is-ecc-enabled"), + FF_ARG(device->installed, "is-installed"), })); } } diff --git a/src/modules/player/player.c b/src/modules/player/player.c index b79007a0c..35887d93e 100644 --- a/src/modules/player/player.c +++ b/src/modules/player/player.c @@ -73,10 +73,10 @@ bool ffPrintPlayer(FFPlayerOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_PLAYER_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(playerPretty, "player"), - FF_FORMAT_ARG(media->player, "name"), - FF_FORMAT_ARG(media->playerId, "id"), - FF_FORMAT_ARG(media->url, "url"), + FF_ARG(playerPretty, "player"), + FF_ARG(media->player, "name"), + FF_ARG(media->playerId, "id"), + FF_ARG(media->url, "url"), })); } diff --git a/src/modules/poweradapter/poweradapter.c b/src/modules/poweradapter/poweradapter.c index c192f8d06..48da15038 100644 --- a/src/modules/poweradapter/poweradapter.c +++ b/src/modules/poweradapter/poweradapter.c @@ -40,12 +40,12 @@ bool ffPrintPowerAdapter(FFPowerAdapterOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_POWERADAPTER_DISPLAY_NAME, i, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result->watts, "watts"), - FF_FORMAT_ARG(result->name, "name"), - FF_FORMAT_ARG(result->manufacturer, "manufacturer"), - FF_FORMAT_ARG(result->modelName, "model-name"), - FF_FORMAT_ARG(result->description, "description"), - FF_FORMAT_ARG(result->serial, "serial"), + FF_ARG(result->watts, "watts"), + FF_ARG(result->name, "name"), + FF_ARG(result->manufacturer, "manufacturer"), + FF_ARG(result->modelName, "model-name"), + FF_ARG(result->description, "description"), + FF_ARG(result->serial, "serial"), })); } diff --git a/src/modules/processes/processes.c b/src/modules/processes/processes.c index 4773f9e24..a199cad4c 100644 --- a/src/modules/processes/processes.c +++ b/src/modules/processes/processes.c @@ -24,7 +24,7 @@ bool ffPrintProcesses(FFProcessesOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_PROCESSES_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(numProcesses, "result") + FF_ARG(numProcesses, "result") })); } diff --git a/src/modules/publicip/publicip.c b/src/modules/publicip/publicip.c index 7b6691e98..619f191e4 100644 --- a/src/modules/publicip/publicip.c +++ b/src/modules/publicip/publicip.c @@ -30,8 +30,8 @@ bool ffPrintPublicIp(FFPublicIPOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_PUBLICIP_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result.ip, "ip"), - FF_FORMAT_ARG(result.location, "location"), + FF_ARG(result.ip, "ip"), + FF_ARG(result.location, "location"), })); } diff --git a/src/modules/shell/shell.c b/src/modules/shell/shell.c index 388a2578d..b4d3c238a 100644 --- a/src/modules/shell/shell.c +++ b/src/modules/shell/shell.c @@ -30,14 +30,14 @@ bool ffPrintShell(FFShellOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_SHELL_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result->processName, "process-name"), - FF_FORMAT_ARG(result->exe, "exe"), - FF_FORMAT_ARG(result->exeName, "exe-name"), - FF_FORMAT_ARG(result->version, "version"), - FF_FORMAT_ARG(result->pid, "pid"), - FF_FORMAT_ARG(result->prettyName, "pretty-name"), - FF_FORMAT_ARG(result->exePath, "exe-path"), - FF_FORMAT_ARG(result->tty, "tty"), + FF_ARG(result->processName, "process-name"), + FF_ARG(result->exe, "exe"), + FF_ARG(result->exeName, "exe-name"), + FF_ARG(result->version, "version"), + FF_ARG(result->pid, "pid"), + FF_ARG(result->prettyName, "pretty-name"), + FF_ARG(result->exePath, "exe-path"), + FF_ARG(result->tty, "tty"), })); } diff --git a/src/modules/sound/sound.c b/src/modules/sound/sound.c index 8a92242df..99898b48a 100644 --- a/src/modules/sound/sound.c +++ b/src/modules/sound/sound.c @@ -56,12 +56,12 @@ static void printDevice(FFSoundOptions* options, const FFSoundDevice* device, ui } FF_PRINT_FORMAT_CHECKED(FF_SOUND_MODULE_NAME, index, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(device->main, "is-main"), - FF_FORMAT_ARG(device->name, "name"), - FF_FORMAT_ARG(percentageNum, "volume-percentage"), - FF_FORMAT_ARG(device->identifier, "identifier"), - FF_FORMAT_ARG(percentageBar, "volume-percentage-bar"), - FF_FORMAT_ARG(device->platformApi, "platform-api"), + FF_ARG(device->main, "is-main"), + FF_ARG(device->name, "name"), + FF_ARG(percentageNum, "volume-percentage"), + FF_ARG(device->identifier, "identifier"), + FF_ARG(percentageBar, "volume-percentage-bar"), + FF_ARG(device->platformApi, "platform-api"), })); } } diff --git a/src/modules/swap/swap.c b/src/modules/swap/swap.c index 5ad50ff9d..1511b6a4f 100644 --- a/src/modules/swap/swap.c +++ b/src/modules/swap/swap.c @@ -21,9 +21,9 @@ void printSwap(FFSwapOptions* options, uint8_t index, FFSwapResult* storage) { ffStrbufClear(&key); FF_PARSE_FORMAT_STRING_CHECKED(&key, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(storage->name, "name"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(storage->name, "name"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -82,11 +82,11 @@ void printSwap(FFSwapOptions* options, uint8_t index, FFSwapResult* storage) if (percentType & FF_PERCENTAGE_TYPE_BAR_BIT) ffPercentAppendBar(&percentageBar, percentage, options->percent, &options->moduleArgs); FF_PRINT_FORMAT_CHECKED(key.chars, index, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]){ - FF_FORMAT_ARG(usedPretty, "used"), - FF_FORMAT_ARG(totalPretty, "total"), - FF_FORMAT_ARG(percentageNum, "percentage"), - FF_FORMAT_ARG(percentageBar, "percentage-bar"), - FF_FORMAT_ARG(storage->name, "name"), + FF_ARG(usedPretty, "used"), + FF_ARG(totalPretty, "total"), + FF_ARG(percentageNum, "percentage"), + FF_ARG(percentageBar, "percentage-bar"), + FF_ARG(storage->name, "name"), })); } } diff --git a/src/modules/terminal/terminal.c b/src/modules/terminal/terminal.c index c9b6b0277..4595b729c 100644 --- a/src/modules/terminal/terminal.c +++ b/src/modules/terminal/terminal.c @@ -26,14 +26,14 @@ bool ffPrintTerminal(FFTerminalOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_TERMINAL_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result->processName, "process-name"), - FF_FORMAT_ARG(result->exe, "exe"), - FF_FORMAT_ARG(result->exeName, "exe-name"), - FF_FORMAT_ARG(result->pid, "pid"), - FF_FORMAT_ARG(result->prettyName, "pretty-name"), - FF_FORMAT_ARG(result->version, "version"), - FF_FORMAT_ARG(result->exePath, "exe-path"), - FF_FORMAT_ARG(result->tty, "tty"), + FF_ARG(result->processName, "process-name"), + FF_ARG(result->exe, "exe"), + FF_ARG(result->exeName, "exe-name"), + FF_ARG(result->pid, "pid"), + FF_ARG(result->prettyName, "pretty-name"), + FF_ARG(result->version, "version"), + FF_ARG(result->exePath, "exe-path"), + FF_ARG(result->tty, "tty"), })); } diff --git a/src/modules/terminalfont/terminalfont.c b/src/modules/terminalfont/terminalfont.c index 808a35146..e0f02874c 100644 --- a/src/modules/terminalfont/terminalfont.c +++ b/src/modules/terminalfont/terminalfont.c @@ -34,10 +34,10 @@ bool ffPrintTerminalFont(FFTerminalFontOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_TERMINALFONT_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(terminalFont.font.pretty, "combined"), - FF_FORMAT_ARG(terminalFont.font.name, "name"), - FF_FORMAT_ARG(terminalFont.font.size, "size"), - FF_FORMAT_ARG(terminalFont.font.styles, "styles"), + FF_ARG(terminalFont.font.pretty, "combined"), + FF_ARG(terminalFont.font.name, "name"), + FF_ARG(terminalFont.font.size, "size"), + FF_ARG(terminalFont.font.styles, "styles"), })); } success = true; diff --git a/src/modules/terminalsize/terminalsize.c b/src/modules/terminalsize/terminalsize.c index d0e04af93..413060995 100644 --- a/src/modules/terminalsize/terminalsize.c +++ b/src/modules/terminalsize/terminalsize.c @@ -29,10 +29,10 @@ bool ffPrintTerminalSize(FFTerminalSizeOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_TERMINALSIZE_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result.rows, "rows"), - FF_FORMAT_ARG(result.columns, "columns"), - FF_FORMAT_ARG(result.width, "width"), - FF_FORMAT_ARG(result.height, "height"), + FF_ARG(result.rows, "rows"), + FF_ARG(result.columns, "columns"), + FF_ARG(result.width, "width"), + FF_ARG(result.height, "height"), })); } return true; diff --git a/src/modules/terminaltheme/terminaltheme.c b/src/modules/terminaltheme/terminaltheme.c index 1272d1267..f20233d4c 100644 --- a/src/modules/terminaltheme/terminaltheme.c +++ b/src/modules/terminaltheme/terminaltheme.c @@ -34,10 +34,10 @@ bool ffPrintTerminalTheme(FFTerminalThemeOptions* options) snprintf(fg, ARRAY_SIZE(fg), "#%02" PRIX16 "%02" PRIX16 "%02" PRIX16, result.fg.r, result.fg.g, result.fg.b); snprintf(bg, ARRAY_SIZE(bg), "#%02" PRIX16 "%02" PRIX16 "%02" PRIX16, result.bg.r, result.bg.g, result.bg.b); FF_PRINT_FORMAT_CHECKED(FF_TERMINALTHEME_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(fg, "fg-color"), - FF_FORMAT_ARG(fgType, "fg-type"), - FF_FORMAT_ARG(bg, "bg-color"), - FF_FORMAT_ARG(bgType, "bg-type"), + FF_ARG(fg, "fg-color"), + FF_ARG(fgType, "fg-type"), + FF_ARG(bg, "bg-color"), + FF_ARG(bgType, "bg-type"), })); } diff --git a/src/modules/theme/theme.c b/src/modules/theme/theme.c index 470babf22..751873ee3 100644 --- a/src/modules/theme/theme.c +++ b/src/modules/theme/theme.c @@ -34,8 +34,8 @@ bool ffPrintTheme(FFThemeOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_THEME_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result.theme1, "theme1"), - FF_FORMAT_ARG(result.theme2, "theme2"), + FF_ARG(result.theme1, "theme1"), + FF_ARG(result.theme2, "theme2"), })); } diff --git a/src/modules/title/title.c b/src/modules/title/title.c index 89320a32c..75c261b8b 100644 --- a/src/modules/title/title.c +++ b/src/modules/title/title.c @@ -71,22 +71,22 @@ bool ffPrintTitle(FFTitleOptions* options) if (cwdTilde.length > 1) ffStrbufTrimRight(&cwdTilde, '/'); FF_PRINT_FORMAT_CHECKED(FF_TITLE_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(instance.state.platform.userName, "user-name"), - FF_FORMAT_ARG(hostName, "host-name"), - FF_FORMAT_ARG(instance.state.platform.homeDir, "home-dir"), - FF_FORMAT_ARG(instance.state.platform.exePath, "exe-path"), - FF_FORMAT_ARG(instance.state.platform.userShell, "user-shell"), - FF_FORMAT_ARG(userNameColored, "user-name-colored"), - FF_FORMAT_ARG(atColored, "at-symbol-colored"), - FF_FORMAT_ARG(hostNameColored, "host-name-colored"), - FF_FORMAT_ARG(instance.state.platform.fullUserName, "full-user-name"), + FF_ARG(instance.state.platform.userName, "user-name"), + FF_ARG(hostName, "host-name"), + FF_ARG(instance.state.platform.homeDir, "home-dir"), + FF_ARG(instance.state.platform.exePath, "exe-path"), + FF_ARG(instance.state.platform.userShell, "user-shell"), + FF_ARG(userNameColored, "user-name-colored"), + FF_ARG(atColored, "at-symbol-colored"), + FF_ARG(hostNameColored, "host-name-colored"), + FF_ARG(instance.state.platform.fullUserName, "full-user-name"), #ifndef _WIN32 - FF_FORMAT_ARG(instance.state.platform.uid, "user-id"), + FF_ARG(instance.state.platform.uid, "user-id"), #else - FF_FORMAT_ARG(instance.state.platform.sid, "user-id"), + FF_ARG(instance.state.platform.sid, "user-id"), #endif - FF_FORMAT_ARG(instance.state.platform.pid, "pid"), - FF_FORMAT_ARG(cwdTilde, "cwd"), + FF_ARG(instance.state.platform.pid, "pid"), + FF_ARG(cwdTilde, "cwd"), })); } diff --git a/src/modules/tpm/tpm.c b/src/modules/tpm/tpm.c index 8ab9e12df..748d4cd03 100644 --- a/src/modules/tpm/tpm.c +++ b/src/modules/tpm/tpm.c @@ -29,8 +29,8 @@ bool ffPrintTPM(FFTPMOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_TPM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result.version, "version"), - FF_FORMAT_ARG(result.description, "description"), + FF_ARG(result.version, "version"), + FF_ARG(result.description, "description"), })); } diff --git a/src/modules/uptime/uptime.c b/src/modules/uptime/uptime.c index 5d4b5d2e3..95da11501 100644 --- a/src/modules/uptime/uptime.c +++ b/src/modules/uptime/uptime.c @@ -42,16 +42,16 @@ 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_FORMAT_ARG(days, "days"), - FF_FORMAT_ARG(hours, "hours"), - FF_FORMAT_ARG(minutes, "minutes"), - FF_FORMAT_ARG(seconds, "seconds"), - FF_FORMAT_ARG(milliseconds, "milliseconds"), - {FF_FORMAT_ARG_TYPE_STRING, ffTimeToShortStr(result.bootTime), "boot-time"}, - FF_FORMAT_ARG(age.years, "years"), - FF_FORMAT_ARG(age.daysOfYear, "days-of-year"), - FF_FORMAT_ARG(age.yearsFraction, "years-fraction"), - FF_FORMAT_ARG(buffer, "formatted") + 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") })); } diff --git a/src/modules/users/users.c b/src/modules/users/users.c index 7169b7bda..56c6cda66 100644 --- a/src/modules/users/users.c +++ b/src/modules/users/users.c @@ -81,19 +81,19 @@ bool ffPrintUsers(FFUsersOptions* options) FFTimeGetAgeResult age = ffTimeGetAge(user->loginTime, ffTimeGetNow()); FF_PRINT_FORMAT_CHECKED(FF_USERS_MODULE_NAME, users.length == 1 ? 0 : (uint8_t) (i + 1), &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(user->name, "name"), - FF_FORMAT_ARG(user->hostName, "host-name"), - FF_FORMAT_ARG(user->sessionName, "session-name"), - FF_FORMAT_ARG(user->clientIp, "client-ip"), - {FF_FORMAT_ARG_TYPE_STRING, ffTimeToShortStr(user->loginTime), "login-time"}, - FF_FORMAT_ARG(days, "days"), - FF_FORMAT_ARG(hours, "hours"), - FF_FORMAT_ARG(minutes, "minutes"), - FF_FORMAT_ARG(seconds, "seconds"), - FF_FORMAT_ARG(milliseconds, "milliseconds"), - FF_FORMAT_ARG(age.years, "years"), - FF_FORMAT_ARG(age.daysOfYear, "days-of-year"), - FF_FORMAT_ARG(age.yearsFraction, "years-fraction"), + FF_ARG(user->name, "name"), + 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(days, "days"), + FF_ARG(hours, "hours"), + FF_ARG(minutes, "minutes"), + FF_ARG(seconds, "seconds"), + FF_ARG(milliseconds, "milliseconds"), + FF_ARG(age.years, "years"), + FF_ARG(age.daysOfYear, "days-of-year"), + FF_ARG(age.yearsFraction, "years-fraction"), })); } } diff --git a/src/modules/version/version.c b/src/modules/version/version.c index 2e21f8645..84ccd5a0c 100644 --- a/src/modules/version/version.c +++ b/src/modules/version/version.c @@ -30,16 +30,16 @@ bool ffPrintVersion(FFVersionOptions* options) const char* buildType = result->debugMode ? "debug" : "release"; FF_PRINT_FORMAT_CHECKED(FF_VERSION_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result->projectName, "project-name"), - FF_FORMAT_ARG(result->version, "version"), - FF_FORMAT_ARG(result->versionTweak, "version-tweak"), - FF_FORMAT_ARG(buildType, "build-type"), - FF_FORMAT_ARG(result->sysName, "sysname"), - FF_FORMAT_ARG(result->architecture, "arch"), - FF_FORMAT_ARG(result->cmakeBuiltType, "cmake-built-type"), - FF_FORMAT_ARG(result->compileTime, "compile-time"), - FF_FORMAT_ARG(result->compiler, "compiler"), - FF_FORMAT_ARG(buf, "libc"), + FF_ARG(result->projectName, "project-name"), + FF_ARG(result->version, "version"), + FF_ARG(result->versionTweak, "version-tweak"), + FF_ARG(buildType, "build-type"), + FF_ARG(result->sysName, "sysname"), + FF_ARG(result->architecture, "arch"), + FF_ARG(result->cmakeBuiltType, "cmake-built-type"), + FF_ARG(result->compileTime, "compile-time"), + FF_ARG(result->compiler, "compiler"), + FF_ARG(buf, "libc"), })); } diff --git a/src/modules/vulkan/vulkan.c b/src/modules/vulkan/vulkan.c index 69d1884ba..159d3d743 100644 --- a/src/modules/vulkan/vulkan.c +++ b/src/modules/vulkan/vulkan.c @@ -43,10 +43,10 @@ bool ffPrintVulkan(FFVulkanOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_VULKAN_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(vulkan->driver, "driver"), - FF_FORMAT_ARG(vulkan->apiVersion, "api-version"), - FF_FORMAT_ARG(vulkan->conformanceVersion, "conformance-version"), - FF_FORMAT_ARG(vulkan->instanceVersion, "instance-version"), + FF_ARG(vulkan->driver, "driver"), + FF_ARG(vulkan->apiVersion, "api-version"), + FF_ARG(vulkan->conformanceVersion, "conformance-version"), + FF_ARG(vulkan->instanceVersion, "instance-version"), })); } diff --git a/src/modules/wallpaper/wallpaper.c b/src/modules/wallpaper/wallpaper.c index 76de9577b..c997a2591 100644 --- a/src/modules/wallpaper/wallpaper.c +++ b/src/modules/wallpaper/wallpaper.c @@ -34,8 +34,8 @@ bool ffPrintWallpaper(FFWallpaperOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_WALLPAPER_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(filename, "file-name"), - FF_FORMAT_ARG(fullpath, "full-path"), + FF_ARG(filename, "file-name"), + FF_ARG(fullpath, "full-path"), })); } diff --git a/src/modules/weather/weather.c b/src/modules/weather/weather.c index 3321c7dba..2717d6979 100644 --- a/src/modules/weather/weather.c +++ b/src/modules/weather/weather.c @@ -23,7 +23,7 @@ bool ffPrintWeather(FFWeatherOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_WEATHER_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]) { - FF_FORMAT_ARG(result, "result"), + FF_ARG(result, "result"), })); } diff --git a/src/modules/wifi/wifi.c b/src/modules/wifi/wifi.c index 16df168c5..9efabafad 100644 --- a/src/modules/wifi/wifi.c +++ b/src/modules/wifi/wifi.c @@ -110,19 +110,19 @@ bool ffPrintWifi(FFWifiOptions* options) ffPercentAppendBar(&percentBar, item->conn.signalQuality, options->percent, &options->moduleArgs); FF_PRINT_FORMAT_CHECKED(FF_WIFI_MODULE_NAME, moduleIndex, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(item->inf.description, "inf-desc"), - FF_FORMAT_ARG(item->inf.status, "inf-status"), - FF_FORMAT_ARG(item->conn.status, "status"), - FF_FORMAT_ARG(item->conn.ssid, "ssid"), - FF_FORMAT_ARG(item->conn.bssid, "bssid"), - FF_FORMAT_ARG(item->conn.protocol, "protocol"), - FF_FORMAT_ARG(percentNum, "signal-quality"), - FF_FORMAT_ARG(item->conn.rxRate, "rx-rate"), - FF_FORMAT_ARG(item->conn.txRate, "tx-rate"), - FF_FORMAT_ARG(item->conn.security, "security"), - FF_FORMAT_ARG(percentBar, "signal-quality-bar"), - FF_FORMAT_ARG(item->conn.channel, "channel"), - FF_FORMAT_ARG(bandStr, "band"), + FF_ARG(item->inf.description, "inf-desc"), + FF_ARG(item->inf.status, "inf-status"), + FF_ARG(item->conn.status, "status"), + FF_ARG(item->conn.ssid, "ssid"), + FF_ARG(item->conn.bssid, "bssid"), + FF_ARG(item->conn.protocol, "protocol"), + FF_ARG(percentNum, "signal-quality"), + FF_ARG(item->conn.rxRate, "rx-rate"), + FF_ARG(item->conn.txRate, "tx-rate"), + FF_ARG(item->conn.security, "security"), + FF_ARG(percentBar, "signal-quality-bar"), + FF_ARG(item->conn.channel, "channel"), + FF_ARG(bandStr, "band"), })); } } diff --git a/src/modules/wm/wm.c b/src/modules/wm/wm.c index 94a440bc5..2c2efd2d1 100644 --- a/src/modules/wm/wm.c +++ b/src/modules/wm/wm.c @@ -54,11 +54,11 @@ bool ffPrintWM(FFWMOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_WM_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(result->wmProcessName, "process-name"), - FF_FORMAT_ARG(result->wmPrettyName, "pretty-name"), - FF_FORMAT_ARG(result->wmProtocolName, "protocol-name"), - FF_FORMAT_ARG(pluginName, "plugin-name"), - FF_FORMAT_ARG(version, "version"), + FF_ARG(result->wmProcessName, "process-name"), + FF_ARG(result->wmPrettyName, "pretty-name"), + FF_ARG(result->wmProtocolName, "protocol-name"), + FF_ARG(pluginName, "plugin-name"), + FF_ARG(version, "version"), })); } diff --git a/src/modules/wmtheme/wmtheme.c b/src/modules/wmtheme/wmtheme.c index 0289307dc..a7de721f9 100644 --- a/src/modules/wmtheme/wmtheme.c +++ b/src/modules/wmtheme/wmtheme.c @@ -23,7 +23,7 @@ bool ffPrintWMTheme(FFWMThemeOptions* options) else { FF_PRINT_FORMAT_CHECKED(FF_WMTHEME_DISPLAY_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){ - FF_FORMAT_ARG(themeOrError, "result"), + FF_ARG(themeOrError, "result"), })); } diff --git a/src/modules/zpool/zpool.c b/src/modules/zpool/zpool.c index 7fc3b8c8d..0a9ede81b 100644 --- a/src/modules/zpool/zpool.c +++ b/src/modules/zpool/zpool.c @@ -21,10 +21,10 @@ static void printZpool(FFZpoolOptions* options, FFZpoolResult* result, uint8_t i { ffStrbufClear(&buffer); FF_PARSE_FORMAT_STRING_CHECKED(&buffer, &options->moduleArgs.key, ((FFformatarg[]) { - FF_FORMAT_ARG(index, "index"), - FF_FORMAT_ARG(result->name, "name"), - FF_FORMAT_ARG(result->guid, "guid"), - FF_FORMAT_ARG(options->moduleArgs.keyIcon, "icon"), + FF_ARG(index, "index"), + FF_ARG(result->name, "name"), + FF_ARG(result->guid, "guid"), + FF_ARG(options->moduleArgs.keyIcon, "icon"), })); } @@ -81,19 +81,19 @@ static void printZpool(FFZpoolOptions* options, FFZpoolResult* result, uint8_t i ffPercentAppendBar(&fragPercentageBar, result->fragmentation, options->percent, &options->moduleArgs); FF_PRINT_FORMAT_CHECKED(buffer.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) { - FF_FORMAT_ARG(result->name, "name"), - FF_FORMAT_ARG(result->guid, "guid"), - FF_FORMAT_ARG(result->state, "state"), - FF_FORMAT_ARG(usedPretty, "size-used"), - FF_FORMAT_ARG(allocatedPretty, "size-allocated"), - FF_FORMAT_ARG(totalPretty, "size-total"), - FF_FORMAT_ARG(usedPercentageNum, "used-percentage"), - FF_FORMAT_ARG(allocatedPercentageNum, "allocated-percentage"), - FF_FORMAT_ARG(fragPercentageNum, "frag-percentage"), - FF_FORMAT_ARG(usedPercentageBar, "used-percentage-bar"), - FF_FORMAT_ARG(allocatedPercentageBar, "allocated-percentage-bar"), - FF_FORMAT_ARG(fragPercentageBar, "frag-percentage-bar"), - FF_FORMAT_ARG(result->readOnly, "is-readonly"), + FF_ARG(result->name, "name"), + FF_ARG(result->guid, "guid"), + FF_ARG(result->state, "state"), + FF_ARG(usedPretty, "size-used"), + FF_ARG(allocatedPretty, "size-allocated"), + FF_ARG(totalPretty, "size-total"), + FF_ARG(usedPercentageNum, "used-percentage"), + FF_ARG(allocatedPercentageNum, "allocated-percentage"), + FF_ARG(fragPercentageNum, "frag-percentage"), + FF_ARG(usedPercentageBar, "used-percentage-bar"), + FF_ARG(allocatedPercentageBar, "allocated-percentage-bar"), + FF_ARG(fragPercentageBar, "frag-percentage-bar"), + FF_ARG(result->readOnly, "is-readonly"), })); } }