From 831659966f40e8553e944d040edb10375bc312ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=80=9A=E6=B4=B2?= Date: Mon, 30 Mar 2026 10:27:23 +0800 Subject: [PATCH] Style: adds `Cpp11BracedListStyle: Block` --- .clang-format | 1 + src/common/apple/smc_temps.c | 10 +- src/common/argType.h | 4 +- src/common/impl/FFPlatform_unix.c | 4 +- src/common/impl/FFPlatform_windows.c | 2 +- src/common/impl/FFstrbuf.c | 6 +- src/common/impl/edidHelper.c | 2 +- src/common/impl/init.c | 2 +- src/common/impl/io_unix.c | 4 +- src/common/impl/io_windows.c | 4 +- src/common/impl/netif_apple.c | 4 +- src/common/impl/netif_bsd.c | 4 +- src/common/impl/netif_linux.c | 2 +- src/common/impl/networking_linux.c | 3 +- src/common/impl/processing_linux.c | 14 +- src/common/impl/processing_windows.c | 6 +- src/common/impl/settings.c | 18 +- src/common/impl/size.c | 8 +- src/common/impl/sysctl.c | 8 +- src/common/option.h | 2 +- src/common/parsing.h | 2 +- src/common/properties.h | 10 +- src/common/settings.h | 2 +- src/common/thread.h | 2 +- src/common/time.h | 2 +- src/common/windows/variant.hpp | 2 +- src/detection/battery/battery_android.c | 2 +- src/detection/battery/battery_windows.c | 6 +- src/detection/bluetooth/bluetooth_windows.c | 3 +- src/detection/bluetooth/bluetooth_windows.cpp | 2 +- .../bluetoothradio/bluetoothradio_windows.c | 5 +- src/detection/bootmgr/bootmgr_bsd.c | 8 +- src/detection/bootmgr/bootmgr_windows.c | 3 +- src/detection/brightness/brightness_apple.c | 4 +- src/detection/camera/camera_android.c | 2 +- src/detection/camera/camera_linux.c | 2 +- src/detection/command/command.c | 5 +- src/detection/cpu/cpu.c | 2 +- src/detection/cpu/cpu_apple.c | 2 +- src/detection/cpu/cpu_obsd.c | 2 +- src/detection/cpu/cpu_sunos.c | 4 +- src/detection/cpu/cpu_windows.c | 2 +- src/detection/cpuusage/cpuusage_bsd.c | 4 +- src/detection/cpuusage/cpuusage_windows.c | 2 +- src/detection/cursor/cursor_linux.c | 4 +- src/detection/de/de_linux.c | 18 +- src/detection/diskio/diskio_nbsd.c | 2 +- src/detection/diskio/diskio_obsd.c | 2 +- .../wayland/kde-output-device-v2-protocol.c | 92 +- .../wayland/kde-output-order-v1-protocol.c | 6 +- .../displayserver/linux/wayland/kde-output.c | 2 +- .../displayserver/linux/wayland/wayland.c | 2 +- ...r-output-management-unstable-v1-protocol.c | 78 +- .../wayland/xdg-output-unstable-v1-protocol.c | 16 +- .../displayserver/linux/wayland/zwlr-output.c | 2 +- src/detection/displayserver/linux/wmde.c | 4 +- src/detection/font/font_haiku.cpp | 2 +- src/detection/font/font_windows.c | 10 +- src/detection/gamepad/gamepad_apple.c | 6 +- src/detection/gpu/gpu.c | 2 +- src/detection/gpu/gpu_amd.c | 2 +- src/detection/gpu/gpu_drm.c | 2 +- src/detection/gpu/gpu_intel.c | 4 +- src/detection/gpu/gpu_nvidia.c | 2 +- src/detection/gpu/gpu_windows.c | 8 +- src/detection/gpu/gpu_windows.cpp | 2 +- src/detection/gpu/gpu_wsl.c | 8 +- src/detection/gtk_qt/gtk.c | 2 +- src/detection/gtk_qt/qt.c | 8 +- src/detection/keyboard/keyboard_apple.c | 2 +- src/detection/lm/lm_linux.c | 16 +- src/detection/loadavg/loadavg_bsd.c | 2 +- src/detection/localip/localip_linux.c | 4 +- src/detection/localip/localip_windows.c | 2 +- src/detection/media/media_linux.c | 4 +- src/detection/memory/memory_apple.c | 2 +- src/detection/memory/memory_bsd.c | 2 +- src/detection/memory/memory_nbsd.c | 2 +- src/detection/memory/memory_obsd.c | 2 +- src/detection/mouse/mouse_apple.c | 2 +- src/detection/netio/netio_apple.c | 2 +- src/detection/netio/netio_bsd.c | 4 +- src/detection/netio/netio_windows.c | 2 +- src/detection/opengl/opengl_linux.c | 2 +- src/detection/opengl/opengl_shared.c | 8 +- src/detection/os/os_linux.c | 36 +- src/detection/packages/packages_linux.c | 4 +- src/detection/packages/packages_nix.c | 4 +- .../physicaldisk/physicaldisk_sunos.c | 2 +- src/detection/processes/processes_bsd.c | 2 +- src/detection/processes/processes_nbsd.c | 2 +- src/detection/publicip/publicip.c | 2 +- src/detection/sound/sound_apple.c | 26 +- src/detection/sound/sound_bsd.c | 4 +- src/detection/sound/sound_sunos.c | 6 +- src/detection/swap/swap_apple.c | 2 +- src/detection/swap/swap_linux.c | 2 +- src/detection/terminalfont/terminalfont.c | 22 +- .../terminalfont/terminalfont_linux.c | 32 +- .../terminalfont/terminalfont_windows.c | 16 +- src/detection/terminalshell/terminalshell.c | 46 +- .../terminalsize/terminalsize_windows.c | 2 +- src/detection/terminaltheme/terminaltheme.c | 34 +- src/detection/uptime/uptime_bsd.c | 2 +- src/detection/users/users_linux.c | 16 +- src/detection/vulkan/vulkan.c | 6 +- src/detection/wifi/wifi_android.c | 2 +- src/detection/wifi/wifi_linux.c | 2 +- src/detection/wm/wm_linux.c | 16 +- src/detection/wm/wm_windows.c | 2 +- src/fastfetch.c | 4 +- src/logo/builtin.c | 1187 ++++++++--------- src/logo/image/image.c | 2 +- src/logo/logo.c | 3 +- src/modules/battery/battery.c | 34 +- src/modules/bios/bios.c | 10 +- src/modules/bluetooth/bluetooth.c | 14 +- src/modules/bluetoothradio/bluetoothradio.c | 16 +- src/modules/board/board.c | 8 +- src/modules/bootmgr/bootmgr.c | 10 +- src/modules/brightness/brightness.c | 16 +- src/modules/btrfs/btrfs.c | 28 +- src/modules/camera/camera.c | 12 +- src/modules/chassis/chassis.c | 8 +- src/modules/colors/colors.c | 22 +- src/modules/command/command.c | 6 +- src/modules/cpu/cpu.c | 26 +- src/modules/cpucache/cpucache.c | 4 +- src/modules/cpuusage/cpuusage.c | 18 +- src/modules/cursor/cursor.c | 4 +- src/modules/datetime/datetime.c | 46 +- src/modules/de/de.c | 8 +- src/modules/disk/disk.c | 56 +- src/modules/diskio/diskio.c | 16 +- src/modules/display/display.c | 66 +- src/modules/dns/dns.c | 8 +- src/modules/editor/editor.c | 10 +- src/modules/font/font.c | 10 +- src/modules/gamepad/gamepad.c | 10 +- src/modules/gpu/gpu.c | 62 +- src/modules/host/host.c | 14 +- src/modules/icons/icons.c | 4 +- src/modules/initsystem/initsystem.c | 8 +- src/modules/kernel/kernel.c | 12 +- src/modules/keyboard/keyboard.c | 4 +- src/modules/lm/lm.c | 6 +- src/modules/loadavg/loadavg.c | 12 +- src/modules/locale/locale.c | 4 +- src/modules/localip/localip.c | 26 +- src/modules/media/media.c | 10 +- src/modules/memory/memory.c | 10 +- src/modules/monitor/monitor.c | 24 +- src/modules/mouse/mouse.c | 4 +- src/modules/netio/netio.c | 24 +- src/modules/opencl/opencl.c | 6 +- src/modules/opengl/opengl.c | 16 +- src/modules/os/os.c | 24 +- src/modules/packages/packages.c | 98 +- src/modules/physicaldisk/physicaldisk.c | 22 +- src/modules/physicalmemory/physicalmemory.c | 24 +- src/modules/player/player.c | 8 +- src/modules/poweradapter/poweradapter.c | 12 +- src/modules/processes/processes.c | 5 +- src/modules/publicip/publicip.c | 4 +- src/modules/shell/shell.c | 16 +- src/modules/sound/sound.c | 20 +- src/modules/swap/swap.c | 12 +- 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 | 24 +- src/modules/tpm/tpm.c | 4 +- src/modules/uptime/uptime.c | 22 +- src/modules/users/users.c | 28 +- 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 | 28 +- src/modules/wm/wm.c | 10 +- src/modules/wmtheme/wmtheme.c | 2 +- src/modules/zpool/zpool.c | 28 +- src/options/display.c | 120 +- src/options/general.c | 6 +- src/options/logo.c | 128 +- tests/format.c | 2 +- tests/strbuf.c | 2 +- 189 files changed, 1724 insertions(+), 1733 deletions(-) diff --git a/.clang-format b/.clang-format index 3787e5eac..0cd95c24a 100644 --- a/.clang-format +++ b/.clang-format @@ -55,6 +55,7 @@ BinPackParameters: false BinPackArguments: false AlignAfterOpenBracket: DontAlign BracedInitializerIndentWidth: 4 +Cpp11BracedListStyle: Block ForEachMacros: - FF_LIST_FOR_EACH diff --git a/src/common/apple/smc_temps.c b/src/common/apple/smc_temps.c index 4d0e64f89..07b2d3bc9 100644 --- a/src/common/apple/smc_temps.c +++ b/src/common/apple/smc_temps.c @@ -92,8 +92,8 @@ static const char* smcCall(io_connect_t conn, uint32_t selector, SmcKeyData_t* i // Provides key info, using a cache to dramatically improve the energy impact of smcFanControl static const char* smcGetKeyInfo(io_connect_t conn, const uint32_t key, SmcKeyData_keyInfo_t* key_info) { - SmcKeyData_t inputStructure = {0}; - SmcKeyData_t outputStructure = {0}; + SmcKeyData_t inputStructure = { 0 }; + SmcKeyData_t outputStructure = { 0 }; inputStructure.key = key; inputStructure.data8 = kSmcCmdReadKeyInfo; @@ -108,8 +108,8 @@ static const char* smcGetKeyInfo(io_connect_t conn, const uint32_t key, SmcKeyDa } static const char* smcReadSmcVal(io_connect_t conn, const UInt32Char_t key, SmcVal_t* val) { - SmcKeyData_t inputStructure = {0}; - SmcKeyData_t outputStructure = {0}; + SmcKeyData_t inputStructure = { 0 }; + SmcKeyData_t outputStructure = { 0 }; inputStructure.key = smcStrtoul(key, 4, 16); strcpy(val->key, key); @@ -148,7 +148,7 @@ static const char* smcOpen(io_connect_t* conn) { } static const char* smcReadValue(io_connect_t conn, const UInt32Char_t key, double* value) { - SmcVal_t val = {0}; + SmcVal_t val = { 0 }; const char* error = smcReadSmcVal(conn, key, &val); if (error != NULL) { return error; diff --git a/src/common/argType.h b/src/common/argType.h index ff8b6c4cd..49871e7af 100644 --- a/src/common/argType.h +++ b/src/common/argType.h @@ -26,7 +26,7 @@ typedef enum __attribute__((__packed__)) FFArgType { FF_ARG_TYPE_BUFFER, } FFArgType; -#define FF_ARG(variable, var_name) {_Generic((variable), \ +#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, \ @@ -41,4 +41,4 @@ typedef enum __attribute__((__packed__)) FFArgType { bool: FF_ARG_TYPE_BOOL, \ FFArgBuffer: FF_ARG_TYPE_BUFFER), \ _Generic((variable), char*: (variable), const char*: (variable), default: &(variable)), \ - (var_name)} + (var_name) } diff --git a/src/common/impl/FFPlatform_unix.c b/src/common/impl/FFPlatform_unix.c index 1a07b011e..4c54feed1 100644 --- a/src/common/impl/FFPlatform_unix.c +++ b/src/common/impl/FFPlatform_unix.c @@ -42,7 +42,7 @@ static void getExePath(FFPlatform* platform) { #elif defined(__FreeBSD__) || defined(__NetBSD__) size_t exePathLen = sizeof(exePath); if (sysctl( - (int[]) {CTL_KERN, + (int[]) { CTL_KERN, # ifdef __FreeBSD__ KERN_PROC, KERN_PROC_PATHNAME, @@ -281,7 +281,7 @@ static void getSysinfo(FFPlatformSysinfo* info, const struct utsname* uts) { #if defined(__FreeBSD__) || defined(__APPLE__) || defined(__OpenBSD__) || defined(__NetBSD__) size_t length = sizeof(info->pageSize); - sysctl((int[]) {CTL_HW, HW_PAGESIZE}, 2, &info->pageSize, &length, NULL, 0); + sysctl((int[]) { CTL_HW, HW_PAGESIZE }, 2, &info->pageSize, &length, NULL, 0); #else info->pageSize = (uint32_t) sysconf(_SC_PAGESIZE); #endif diff --git a/src/common/impl/FFPlatform_windows.c b/src/common/impl/FFPlatform_windows.c index 5490ca689..13a687168 100644 --- a/src/common/impl/FFPlatform_windows.c +++ b/src/common/impl/FFPlatform_windows.c @@ -149,7 +149,7 @@ static void getUserName(FFPlatform* platform) { alignas(TOKEN_USER) char buf[SECURITY_MAX_SID_SIZE + sizeof(TOKEN_USER)]; if (NT_SUCCESS(NtQueryInformationToken(NtCurrentProcessToken(), TokenUser, buf, sizeof(buf), &size))) { TOKEN_USER* tokenUser = (TOKEN_USER*) buf; - UNICODE_STRING sidString = {.Buffer = buffer, .Length = 0, .MaximumLength = sizeof(buffer)}; + UNICODE_STRING sidString = { .Buffer = buffer, .Length = 0, .MaximumLength = sizeof(buffer) }; if (NT_SUCCESS(RtlConvertSidToUnicodeString(&sidString, tokenUser->User.Sid, FALSE))) { ffStrbufSetNWS(&platform->sid, sidString.Length / sizeof(wchar_t), sidString.Buffer); } diff --git a/src/common/impl/FFstrbuf.c b/src/common/impl/FFstrbuf.c index aef8eef64..ac0933843 100644 --- a/src/common/impl/FFstrbuf.c +++ b/src/common/impl/FFstrbuf.c @@ -835,13 +835,13 @@ int ffStrbufAppendUtf32CodePoint(FFstrbuf* strbuf, uint32_t codepoint) { ffStrbufAppendC(strbuf, (char) codepoint); return 1; } else if (codepoint <= 0x7FF) { - ffStrbufAppendNS(strbuf, 2, (char[]) {(char) (0xC0 | (codepoint >> 6)), (char) (0x80 | (codepoint & 0x3F))}); + ffStrbufAppendNS(strbuf, 2, (char[]) { (char) (0xC0 | (codepoint >> 6)), (char) (0x80 | (codepoint & 0x3F)) }); return 2; } else if (codepoint <= 0xFFFF) { - ffStrbufAppendNS(strbuf, 3, (char[]) {(char) (0xE0 | (codepoint >> 12)), (char) (0x80 | ((codepoint >> 6) & 0x3F)), (char) (0x80 | (codepoint & 0x3F))}); + ffStrbufAppendNS(strbuf, 3, (char[]) { (char) (0xE0 | (codepoint >> 12)), (char) (0x80 | ((codepoint >> 6) & 0x3F)), (char) (0x80 | (codepoint & 0x3F)) }); return 3; } else if (codepoint <= 0x10FFFF) { - ffStrbufAppendNS(strbuf, 4, (char[]) {(char) (0xF0 | (codepoint >> 18)), (char) (0x80 | ((codepoint >> 12) & 0x3F)), (char) (0x80 | ((codepoint >> 6) & 0x3F)), (char) (0x80 | (codepoint & 0x3F))}); + ffStrbufAppendNS(strbuf, 4, (char[]) { (char) (0xF0 | (codepoint >> 18)), (char) (0x80 | ((codepoint >> 12) & 0x3F)), (char) (0x80 | ((codepoint >> 6) & 0x3F)), (char) (0x80 | (codepoint & 0x3F)) }); return 4; } diff --git a/src/common/impl/edidHelper.c b/src/common/impl/edidHelper.c index b18f1b9eb..1e3310e2a 100644 --- a/src/common/impl/edidHelper.c +++ b/src/common/impl/edidHelper.c @@ -118,7 +118,7 @@ bool ffEdidIsValid(const uint8_t edid[128], uint32_t length) { return false; } - static const uint8_t edidHeader[] = {0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00}; + static const uint8_t edidHeader[] = { 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00 }; if (memcmp(edid, edidHeader, sizeof(edidHeader)) != 0) { return false; } diff --git a/src/common/impl/init.c b/src/common/impl/init.c index d38937021..4d631b05c 100644 --- a/src/common/impl/init.c +++ b/src/common/impl/init.c @@ -122,7 +122,7 @@ void ffStart(void) { if (instance.config.display.noBuffer) { setvbuf(stdout, NULL, _IONBF, 0); } - struct sigaction action = {.sa_handler = exitSignalHandler}; + struct sigaction action = { .sa_handler = exitSignalHandler }; sigaction(SIGINT, &action, NULL); sigaction(SIGTERM, &action, NULL); sigaction(SIGQUIT, &action, NULL); diff --git a/src/common/impl/io_unix.c b/src/common/impl/io_unix.c index 30dcb970a..a9ee941b9 100644 --- a/src/common/impl/io_unix.c +++ b/src/common/impl/io_unix.c @@ -164,7 +164,7 @@ const char* ffGetTerminalResponse(const char* request, int nParams, const char* // Give the terminal some time to respond #ifndef __APPLE__ - if (poll(&(struct pollfd) {.fd = ftty, .events = POLLIN}, 1, FF_IO_TERM_RESP_WAIT_MS) <= 0) { + if (poll(&(struct pollfd) { .fd = ftty, .events = POLLIN }, 1, FF_IO_TERM_RESP_WAIT_MS) <= 0) { return "poll(/dev/tty) timeout or failed"; } #else @@ -174,7 +174,7 @@ const char* ffGetTerminalResponse(const char* request, int nParams, const char* fd_set rd; FD_ZERO(&rd); FD_SET(ftty, &rd); - if (select(ftty + 1, &rd, NULL, NULL, &(struct timeval) {.tv_sec = FF_IO_TERM_RESP_WAIT_MS / 1000, .tv_usec = (FF_IO_TERM_RESP_WAIT_MS % 1000) * 1000}) <= 0) { + if (select(ftty + 1, &rd, NULL, NULL, &(struct timeval) { .tv_sec = FF_IO_TERM_RESP_WAIT_MS / 1000, .tv_usec = (FF_IO_TERM_RESP_WAIT_MS % 1000) * 1000 }) <= 0) { return "select(/dev/tty) timeout or failed"; } } diff --git a/src/common/impl/io_windows.c b/src/common/impl/io_windows.c index 9b6ef383e..992a0aded 100644 --- a/src/common/impl/io_windows.c +++ b/src/common/impl/io_windows.c @@ -68,7 +68,7 @@ static bool createSubfolders(wchar_t* fileName) { // Rooted path on current drive: \foo\bar else if (ptr[0] == L'\\') { UNICODE_STRING* dosPath = &ffGetPeb()->ProcessParameters->CurrentDirectory.DosPath; - wchar_t driveRoot[] = {dosPath->Buffer[0], L':', L'\\', L'\0'}; + wchar_t driveRoot[] = { dosPath->Buffer[0], L':', L'\\', L'\0' }; hRoot = CreateFileW( driveRoot, FILE_LIST_DIRECTORY | FILE_TRAVERSE | SYNCHRONIZE, @@ -409,7 +409,7 @@ const char* ffGetTerminalResponse(const char* request, int nParams, const char* } while (true) { - if (NtWaitForSingleObject(hInput, FALSE, &(LARGE_INTEGER) {.QuadPart = (int64_t) FF_IO_TERM_RESP_WAIT_MS * -10000}) != STATUS_WAIT_0) { + if (NtWaitForSingleObject(hInput, FALSE, &(LARGE_INTEGER) { .QuadPart = (int64_t) FF_IO_TERM_RESP_WAIT_MS * -10000 }) != STATUS_WAIT_0) { SetConsoleMode(hInput, inputMode); return "NtWaitForSingleObject() failed or timeout"; } diff --git a/src/common/impl/netif_apple.c b/src/common/impl/netif_apple.c index 9f7e05e88..f4e0a2f90 100644 --- a/src/common/impl/netif_apple.c +++ b/src/common/impl/netif_apple.c @@ -65,7 +65,7 @@ bool ffNetifGetDefaultRouteImplV4(FFNetifDefaultRouteResult* result) { } { - struct timeval timeout = {1, 0}; + struct timeval timeout = { 1, 0 }; setsockopt(pfRoute, SOL_SOCKET, SO_RCVTIMEO, (char*) &timeout, sizeof(timeout)); setsockopt(pfRoute, SOL_SOCKET, SO_SNDTIMEO, (char*) &timeout, sizeof(timeout)); } @@ -138,7 +138,7 @@ bool ffNetifGetDefaultRouteImplV6(FFNetifDefaultRouteResult* result) { } { - struct timeval timeout = {1, 0}; + struct timeval timeout = { 1, 0 }; setsockopt(pfRoute, SOL_SOCKET, SO_RCVTIMEO, (char*) &timeout, sizeof(timeout)); setsockopt(pfRoute, SOL_SOCKET, SO_SNDTIMEO, (char*) &timeout, sizeof(timeout)); } diff --git a/src/common/impl/netif_bsd.c b/src/common/impl/netif_bsd.c index 8e2b5674e..a163cb766 100644 --- a/src/common/impl/netif_bsd.c +++ b/src/common/impl/netif_bsd.c @@ -43,7 +43,7 @@ get_rt_address(struct rt_msghdr* rtm, int desired) { } bool ffNetifGetDefaultRouteImplV4(FFNetifDefaultRouteResult* result) { - int mib[6] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_GATEWAY}; + int mib[6] = { CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_FLAGS, RTF_GATEWAY }; size_t needed; if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0 || needed == 0) { @@ -84,7 +84,7 @@ bool ffNetifGetDefaultRouteImplV4(FFNetifDefaultRouteResult* result) { } bool ffNetifGetDefaultRouteImplV6(FFNetifDefaultRouteResult* result) { - int mib[6] = {CTL_NET, PF_ROUTE, 0, AF_INET6, NET_RT_FLAGS, RTF_GATEWAY}; + int mib[6] = { CTL_NET, PF_ROUTE, 0, AF_INET6, NET_RT_FLAGS, RTF_GATEWAY }; size_t needed; if (sysctl(mib, 6, NULL, &needed, NULL, 0) < 0 || needed == 0) { diff --git a/src/common/impl/netif_linux.c b/src/common/impl/netif_linux.c index f24218ecf..a4b185865 100644 --- a/src/common/impl/netif_linux.c +++ b/src/common/impl/netif_linux.c @@ -177,7 +177,7 @@ bool ffNetifGetDefaultRouteImplV4(FFNetifDefaultRouteResult* result) { uint32_t rta_data = *(uint32_t*) RTA_DATA(rta); switch (rta->rta_type) { case RTA_DST: - FF_DEBUG("Unexpected RTA_DST: %s (len=%u)", inet_ntoa((struct in_addr) {.s_addr = rta_data}), rtm->rtm_dst_len); + FF_DEBUG("Unexpected RTA_DST: %s (len=%u)", inet_ntoa((struct in_addr) { .s_addr = rta_data }), rtm->rtm_dst_len); goto next; case RTA_OIF: entry.ifindex = rta_data; diff --git a/src/common/impl/networking_linux.c b/src/common/impl/networking_linux.c index 207d9562b..4506b9e17 100644 --- a/src/common/impl/networking_linux.c +++ b/src/common/impl/networking_linux.c @@ -378,8 +378,7 @@ const char* ffNetworkingRecvHttpResponse(FFNetworkingState* state, FFstrbuf* buf { int pollRes = poll(&(struct pollfd) { .fd = state->sockfd, - .events = POLLIN - }, + .events = POLLIN }, 1, timeout > 0 ? (int) timeout : -1); if (pollRes == 0) { diff --git a/src/common/impl/processing_linux.c b/src/common/impl/processing_linux.c index a24d3f6c0..41f44a25a 100644 --- a/src/common/impl/processing_linux.c +++ b/src/common/impl/processing_linux.c @@ -169,7 +169,7 @@ const char* ffProcessReadOutput(FFProcessHandle* handle, FFstrbuf* buffer) { for (;;) { if (timeout >= 0) { - struct pollfd pollfd = {childPipeFd, POLLIN, 0}; + struct pollfd pollfd = { childPipeFd, POLLIN, 0 }; int pollret = poll(&pollfd, 1, timeout); if (pollret == 0) { kill(childPid, SIGTERM); @@ -277,7 +277,7 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons #elif defined(__APPLE__) size_t len = 0; - int mibs[] = {CTL_KERN, KERN_PROCARGS2, pid}; + int mibs[] = { CTL_KERN, KERN_PROCARGS2, pid }; if (sysctl(mibs, ARRAY_SIZE(mibs), NULL, &len, NULL, 0) == 0) { // try get arg0 // don't know why if don't let len longer, proArgs2 and len will change during the following sysctl() in old MacOS version. len++; @@ -340,7 +340,7 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons static_assert(ARG_MAX > PATH_MAX, ""); - if (exePath && sysctl((int[]) {CTL_KERN, + if (exePath && sysctl((int[]) { CTL_KERN, # if __FreeBSD__ KERN_PROC, KERN_PROC_PATHNAME, @@ -360,7 +360,7 @@ void ffProcessGetInfoLinux(pid_t pid, FFstrbuf* processName, FFstrbuf* exe, cons size = ARG_MAX; if (sysctl( - (int[]) {CTL_KERN, + (int[]) { CTL_KERN, # if __FreeBSD__ KERN_PROC, KERN_PROC_ARGS, @@ -542,7 +542,7 @@ const char* ffProcessGetBasicInfoLinux(pid_t pid, FFstrbuf* name, pid_t* ppid, i struct kinfo_proc proc; size_t size = sizeof(proc); if (sysctl( - (int[]) {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid}, 4, &proc, &size, NULL, 0)) { + (int[]) { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid }, 4, &proc, &size, NULL, 0)) { return "sysctl(KERN_PROC_PID) failed"; } @@ -568,7 +568,7 @@ const char* ffProcessGetBasicInfoLinux(pid_t pid, FFstrbuf* name, pid_t* ppid, i struct kinfo_proc proc; size_t size = sizeof(proc); if (sysctl( - (int[]) {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid}, 4, &proc, &size, NULL, 0)) { + (int[]) { CTL_KERN, KERN_PROC, KERN_PROC_PID, pid }, 4, &proc, &size, NULL, 0)) { return "sysctl(KERN_PROC_PID) failed"; } @@ -594,7 +594,7 @@ const char* ffProcessGetBasicInfoLinux(pid_t pid, FFstrbuf* name, pid_t* ppid, i struct kinfo_proc2 proc; size_t size = sizeof(proc); if (sysctl( - (int[]) {CTL_KERN, KERN_PROC2, KERN_PROC_PID, pid, sizeof(proc), 1}, 6, &proc, &size, NULL, 0) != 0) { + (int[]) { CTL_KERN, KERN_PROC2, KERN_PROC_PID, pid, sizeof(proc), 1 }, 6, &proc, &size, NULL, 0) != 0) { return "sysctl(KERN_PROC_PID) failed"; } diff --git a/src/common/impl/processing_windows.c b/src/common/impl/processing_windows.c index 768c4cc5d..846276b59 100644 --- a/src/common/impl/processing_windows.c +++ b/src/common/impl/processing_windows.c @@ -141,7 +141,7 @@ static void terminateChildProcess(HANDLE hProcess, HANDLE hChildPipeRead, HANDLE IO_STATUS_BLOCK cancelIosb = {}; if (NT_SUCCESS(NtCancelIoFileEx(hChildPipeRead, piosb, &cancelIosb))) { if (hReadEvent) { - NtWaitForSingleObject(hReadEvent, FALSE, &(LARGE_INTEGER) {.QuadPart = -100000}); // wait for cancellation to complete + NtWaitForSingleObject(hReadEvent, FALSE, &(LARGE_INTEGER) { .QuadPart = -100000 }); // wait for cancellation to complete } } NtTerminateProcess(hProcess, 1); @@ -177,7 +177,7 @@ const char* ffProcessReadOutput(FFProcessHandle* handle, FFstrbuf* buffer) { NULL, NULL); if (status == STATUS_PENDING) { - switch (NtWaitForSingleObject(hReadEvent, FALSE, &(LARGE_INTEGER) {.QuadPart = (int64_t) timeout * -10000})) { + switch (NtWaitForSingleObject(hReadEvent, FALSE, &(LARGE_INTEGER) { .QuadPart = (int64_t) timeout * -10000 })) { case STATUS_WAIT_0: status = iosb.Status; break; @@ -228,7 +228,7 @@ bool ffProcessGetInfoWindows(uint32_t pid, uint32_t* ppid, FFstrbuf* pname, FFst if (!NT_SUCCESS(NtOpenProcess(&hProcess, PROCESS_QUERY_LIMITED_INFORMATION, &(OBJECT_ATTRIBUTES) { .Length = sizeof(OBJECT_ATTRIBUTES), }, - &(CLIENT_ID) {.UniqueProcess = (HANDLE) (uintptr_t) pid}))) { + &(CLIENT_ID) { .UniqueProcess = (HANDLE) (uintptr_t) pid }))) { return false; } } diff --git a/src/common/impl/settings.c b/src/common/impl/settings.c index 911e1ff0f..6e9d55372 100644 --- a/src/common/impl/settings.c +++ b/src/common/impl/settings.c @@ -22,11 +22,11 @@ static FFvariant getGVariantValue(GVariant* variant, FFvarianttype type, const G if (variant == NULL) { result = FF_VARIANT_NULL; } else if (type == FF_VARIANT_TYPE_STRING) { - result = (FFvariant) {.strValue = variantGetters->ffg_variant_dup_string(variant, NULL)}; // Dup string, so that variant itself can be freed + result = (FFvariant) { .strValue = variantGetters->ffg_variant_dup_string(variant, NULL) }; // Dup string, so that variant itself can be freed } else if (type == FF_VARIANT_TYPE_BOOL) { - result = (FFvariant) {.boolValue = (bool) variantGetters->ffg_variant_get_boolean(variant), .boolValueSet = true}; + result = (FFvariant) { .boolValue = (bool) variantGetters->ffg_variant_get_boolean(variant), .boolValueSet = true }; } else if (type == FF_VARIANT_TYPE_INT) { - result = (FFvariant) {.intValue = variantGetters->ffg_variant_get_int32(variant)}; + result = (FFvariant) { .intValue = variantGetters->ffg_variant_get_int32(variant) }; } else { result = FF_VARIANT_NULL; } @@ -223,7 +223,7 @@ FFvariant ffSettingsGetXFConf(const char* channelName, const char* propertyName, int32_t value; if (ffDBusGetInt(&dbus, &rootIterator, &value)) { dbus.lib->ffdbus_message_unref(reply); - return (FFvariant) {.intValue = value}; + return (FFvariant) { .intValue = value }; } return FF_VARIANT_NULL; } @@ -232,7 +232,7 @@ FFvariant ffSettingsGetXFConf(const char* channelName, const char* propertyName, FFstrbuf value = ffStrbufCreate(); if (ffDBusGetString(&dbus, &rootIterator, &value)) { dbus.lib->ffdbus_message_unref(reply); - return (FFvariant) {.strValue = value.chars}; // Leaks value.chars + return (FFvariant) { .strValue = value.chars }; // Leaks value.chars } return FF_VARIANT_NULL; } @@ -241,7 +241,7 @@ FFvariant ffSettingsGetXFConf(const char* channelName, const char* propertyName, bool value; if (ffDBusGetBool(&dbus, &rootIterator, &value)) { dbus.lib->ffdbus_message_unref(reply); - return (FFvariant) {.boolValue = value, .boolValueSet = true}; + return (FFvariant) { .boolValue = value, .boolValueSet = true }; } } @@ -295,7 +295,7 @@ FFvariant ffSettingsGetXFConfFirstMatch(const char* channelName, const char* pro int32_t value; if (ffDBusGetInt(&dbus, &dictIterator, &value)) { dbus.lib->ffdbus_message_unref(reply); - return (FFvariant) {.intValue = value}; + return (FFvariant) { .intValue = value }; } return FF_VARIANT_NULL; } @@ -304,7 +304,7 @@ FFvariant ffSettingsGetXFConfFirstMatch(const char* channelName, const char* pro FFstrbuf value = ffStrbufCreate(); if (ffDBusGetString(&dbus, &dictIterator, &value)) { dbus.lib->ffdbus_message_unref(reply); - return (FFvariant) {.strValue = value.chars}; // Leaks value.chars + return (FFvariant) { .strValue = value.chars }; // Leaks value.chars } return FF_VARIANT_NULL; } @@ -313,7 +313,7 @@ FFvariant ffSettingsGetXFConfFirstMatch(const char* channelName, const char* pro bool value; if (ffDBusGetBool(&dbus, &dictIterator, &value)) { dbus.lib->ffdbus_message_unref(reply); - return (FFvariant) {.boolValue = value, .boolValueSet = true}; + return (FFvariant) { .boolValue = value, .boolValueSet = true }; } } diff --git a/src/common/impl/size.c b/src/common/impl/size.c index 789c0f6a5..4e8d1e371 100644 --- a/src/common/impl/size.c +++ b/src/common/impl/size.c @@ -27,16 +27,16 @@ void ffSizeAppendNum(uint64_t bytes, FFstrbuf* result) { const FFOptionsDisplay* options = &instance.config.display; switch (options->sizeBinaryPrefix) { case FF_SIZE_BINARY_PREFIX_TYPE_IEC: - appendNum(result, bytes, 1024, (const char*[]) {"B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB", NULL}); + appendNum(result, bytes, 1024, (const char*[]) { "B", "KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB", NULL }); break; case FF_SIZE_BINARY_PREFIX_TYPE_SI: - appendNum(result, bytes, 1000, (const char*[]) {"B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", NULL}); + appendNum(result, bytes, 1000, (const char*[]) { "B", "kB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB", NULL }); break; case FF_SIZE_BINARY_PREFIX_TYPE_JEDEC: - appendNum(result, bytes, 1024, (const char*[]) {"B", "KB", "MB", "GB", "TB", NULL}); + appendNum(result, bytes, 1024, (const char*[]) { "B", "KB", "MB", "GB", "TB", NULL }); break; default: - appendNum(result, bytes, 1024, (const char*[]) {"B", NULL}); + appendNum(result, bytes, 1024, (const char*[]) { "B", NULL }); break; } } diff --git a/src/common/impl/sysctl.c b/src/common/impl/sysctl.c index 62ba31c0d..10801a473 100644 --- a/src/common/impl/sysctl.c +++ b/src/common/impl/sysctl.c @@ -5,13 +5,13 @@ #ifdef __OpenBSD__ const char* ffSysctlGetString(int mib1, int mib2, FFstrbuf* result) { size_t neededLength; - if (sysctl((int[]) {mib1, mib2}, 2, NULL, &neededLength, NULL, 0) != 0 || neededLength == 1) { // neededLength is 1 for empty strings, because of the null terminator + if (sysctl((int[]) { mib1, mib2 }, 2, NULL, &neededLength, NULL, 0) != 0 || neededLength == 1) { // neededLength is 1 for empty strings, because of the null terminator return "sysctlbyname() failed"; } ffStrbufEnsureFree(result, (uint32_t) neededLength - 1); - if (sysctl((int[]) {mib1, mib2}, 2, result->chars + result->length, &neededLength, NULL, 0) == 0) { + if (sysctl((int[]) { mib1, mib2 }, 2, result->chars + result->length, &neededLength, NULL, 0) == 0) { result->length += (uint32_t) neededLength - 1; } @@ -23,7 +23,7 @@ const char* ffSysctlGetString(int mib1, int mib2, FFstrbuf* result) { int ffSysctlGetInt(int mib1, int mib2, int defaultValue) { int result; size_t neededLength = sizeof(result); - if (sysctl((int[]) {mib1, mib2}, 2, &result, &neededLength, NULL, 0) != 0) { + if (sysctl((int[]) { mib1, mib2 }, 2, &result, &neededLength, NULL, 0) != 0) { return defaultValue; } return result; @@ -32,7 +32,7 @@ int ffSysctlGetInt(int mib1, int mib2, int defaultValue) { int64_t ffSysctlGetInt64(int mib1, int mib2, int64_t defaultValue) { int64_t result; size_t neededLength = sizeof(result); - if (sysctl((int[]) {mib1, mib2}, 2, &result, &neededLength, NULL, 0) != 0) { + if (sysctl((int[]) { mib1, mib2 }, 2, &result, &neededLength, NULL, 0) != 0) { return defaultValue; } return result; diff --git a/src/common/option.h b/src/common/option.h index 76f6620fa..1c866a28b 100644 --- a/src/common/option.h +++ b/src/common/option.h @@ -16,7 +16,7 @@ typedef struct FFModuleFormatArgList { uint32_t count; } FFModuleFormatArgList; -#define FF_FORMAT_ARG_LIST(list) {.args = list, .count = sizeof(list) / sizeof(FFModuleFormatArg)} +#define FF_FORMAT_ARG_LIST(list) { .args = list, .count = sizeof(list) / sizeof(FFModuleFormatArg) } // Must be the first field of FFModuleOptions typedef struct FFModuleBaseInfo { diff --git a/src/common/parsing.h b/src/common/parsing.h index 17097722f..c3a4bee93 100644 --- a/src/common/parsing.h +++ b/src/common/parsing.h @@ -15,7 +15,7 @@ typedef struct FFColorRangeConfig { uint8_t yellow; } FFColorRangeConfig; -#define FF_VERSION_INIT ((FFVersion) {0}) +#define FF_VERSION_INIT ((FFVersion) { 0 }) void ffParseSemver(FFstrbuf* buffer, const FFstrbuf* major, const FFstrbuf* minor, const FFstrbuf* patch); void ffParseGTK(FFstrbuf* buffer, const FFstrbuf* gtk2, const FFstrbuf* gtk3, const FFstrbuf* gtk4); diff --git a/src/common/properties.h b/src/common/properties.h index 319854886..789a757c3 100644 --- a/src/common/properties.h +++ b/src/common/properties.h @@ -19,15 +19,15 @@ static inline bool ffParsePropLine(const char* line, const char* start, FFstrbuf } static inline bool ffParsePropFile(const char* filename, const char* start, FFstrbuf* buffer) { - return ffParsePropFileValues(filename, 1, (FFpropquery[]) {{start, buffer}}); + return ffParsePropFileValues(filename, 1, (FFpropquery[]) { { start, buffer } }); } static inline bool ffParsePropFileHome(const char* relativeFile, const char* start, FFstrbuf* buffer) { - return ffParsePropFileHomeValues(relativeFile, 1, (FFpropquery[]) {{start, buffer}}); + return ffParsePropFileHomeValues(relativeFile, 1, (FFpropquery[]) { { start, buffer } }); } static inline bool ffParsePropFileList(const FFlist* list, const char* relativeFile, const char* start, FFstrbuf* buffer) { - return ffParsePropFileListValues(list, relativeFile, 1, (FFpropquery[]) {{start, buffer}}); + return ffParsePropFileListValues(list, relativeFile, 1, (FFpropquery[]) { { start, buffer } }); } static inline bool ffParsePropFileConfigValues(const char* relativeFile, uint32_t numQueries, FFpropquery* queries) { @@ -35,7 +35,7 @@ static inline bool ffParsePropFileConfigValues(const char* relativeFile, uint32_ } static inline bool ffParsePropFileConfig(const char* relativeFile, const char* start, FFstrbuf* buffer) { - return ffParsePropFileConfigValues(relativeFile, 1, (FFpropquery[]) {{start, buffer}}); + return ffParsePropFileConfigValues(relativeFile, 1, (FFpropquery[]) { { start, buffer } }); } static inline bool ffParsePropFileDataValues(const char* relativeFile, uint32_t numQueries, FFpropquery* queries) { @@ -43,5 +43,5 @@ static inline bool ffParsePropFileDataValues(const char* relativeFile, uint32_t } static inline bool ffParsePropFileData(const char* relativeFile, const char* start, FFstrbuf* buffer) { - return ffParsePropFileDataValues(relativeFile, 1, (FFpropquery[]) {{start, buffer}}); + return ffParsePropFileDataValues(relativeFile, 1, (FFpropquery[]) { { start, buffer } }); } diff --git a/src/common/settings.h b/src/common/settings.h index 32419b9c1..967de9576 100644 --- a/src/common/settings.h +++ b/src/common/settings.h @@ -18,7 +18,7 @@ typedef union FFvariant { }; } FFvariant; -#define FF_VARIANT_NULL ((FFvariant) {.strValue = NULL}) +#define FF_VARIANT_NULL ((FFvariant) { .strValue = NULL }) FFvariant ffSettingsGetDConf(const char* key, FFvarianttype type); FFvariant ffSettingsGetGSettings(const char* schemaName, const char* path, const char* key, FFvarianttype type); diff --git a/src/common/thread.h b/src/common/thread.h index 94679be09..8dcba25c3 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -34,7 +34,7 @@ static inline void ffThreadDetach(FFThreadType thread) { NtClose(thread); } static inline bool ffThreadJoin(FFThreadType thread, uint32_t timeout) { - if (NtWaitForSingleObject(thread, FALSE, timeout == 0 ? NULL : &(LARGE_INTEGER) {.QuadPart = (int64_t) timeout * -10000}) != STATUS_WAIT_0) { + if (NtWaitForSingleObject(thread, FALSE, timeout == 0 ? NULL : &(LARGE_INTEGER) { .QuadPart = (int64_t) timeout * -10000 }) != STATUS_WAIT_0) { TerminateThread(thread, (DWORD) -1); NtClose(thread); return false; diff --git a/src/common/time.h b/src/common/time.h index af950802b..97c5c269e 100644 --- a/src/common/time.h +++ b/src/common/time.h @@ -58,7 +58,7 @@ static inline bool ffTimeSleep(uint32_t msec) { interval.QuadPart = -(int64_t) msec * 10000; // Relative time in 100-nanosecond intervals return NT_SUCCESS(NtDelayExecution(TRUE, &interval)); #else - return nanosleep(&(struct timespec) {msec / 1000, (long) (msec % 1000) * 1000000}, NULL) == 0; + return nanosleep(&(struct timespec) { msec / 1000, (long) (msec % 1000) * 1000000 }, NULL) == 0; #endif } diff --git a/src/common/windows/variant.hpp b/src/common/windows/variant.hpp index afa1317ba..58e46b7d7 100644 --- a/src/common/windows/variant.hpp +++ b/src/common/windows/variant.hpp @@ -72,7 +72,7 @@ struct FFBaseVariant : TVariant { if (this->vt == VT_LPWSTR) { return this->bstrVal; } else { - return {this->bstrVal, SysStringLen(this->bstrVal)}; + return { this->bstrVal, SysStringLen(this->bstrVal) }; } } diff --git a/src/detection/battery/battery_android.c b/src/detection/battery/battery_android.c index 7a4e8150a..062d2a533 100644 --- a/src/detection/battery/battery_android.c +++ b/src/detection/battery/battery_android.c @@ -17,7 +17,7 @@ static inline void wrapYyjsonFree(yyjson_doc** doc) { static const char* parseTermuxApi(FFBatteryOptions* options, FFlist* results) { FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate(); - if (ffProcessAppendStdOut(&buffer, (char* const[]) {FF_TERMUX_API_PATH, FF_TERMUX_API_PARAM, NULL})) { + if (ffProcessAppendStdOut(&buffer, (char* const[]) { FF_TERMUX_API_PATH, FF_TERMUX_API_PARAM, NULL })) { return "Starting `" FF_TERMUX_API_PATH " " FF_TERMUX_API_PARAM "` failed"; } diff --git a/src/detection/battery/battery_windows.c b/src/detection/battery/battery_windows.c index 308e73e18..41f772ceb 100644 --- a/src/detection/battery/battery_windows.c +++ b/src/detection/battery/battery_windows.c @@ -38,7 +38,7 @@ static const char* detectWithCmApi(FFBatteryOptions* options, FFlist* results) { continue; } - BATTERY_QUERY_INFORMATION bqi = {.InformationLevel = BatteryInformation}; + BATTERY_QUERY_INFORMATION bqi = { .InformationLevel = BatteryInformation }; DWORD dwWait = 0; DWORD dwOut; @@ -47,7 +47,7 @@ static const char* detectWithCmApi(FFBatteryOptions* options, FFlist* results) { continue; } - BATTERY_INFORMATION bi = {0}; + BATTERY_INFORMATION bi = { 0 }; if (!DeviceIoControl(hBattery, IOCTL_BATTERY_QUERY_INFORMATION, &bqi, sizeof(bqi), &bi, sizeof(bi), &dwOut, NULL)) { continue; } @@ -131,7 +131,7 @@ static const char* detectWithCmApi(FFBatteryOptions* options, FFlist* results) { { BATTERY_STATUS bs; - BATTERY_WAIT_STATUS bws = {.BatteryTag = bqi.BatteryTag}; + BATTERY_WAIT_STATUS bws = { .BatteryTag = bqi.BatteryTag }; if (DeviceIoControl(hBattery, IOCTL_BATTERY_QUERY_STATUS, &bws, sizeof(bws), &bs, sizeof(bs), &dwOut, NULL) && bs.Capacity != BATTERY_UNKNOWN_CAPACITY && bi.FullChargedCapacity != 0) { battery->capacity = bs.Capacity * 100.0 / bi.FullChargedCapacity; } else { diff --git a/src/detection/bluetooth/bluetooth_windows.c b/src/detection/bluetooth/bluetooth_windows.c index 925101907..8cfd78053 100644 --- a/src/detection/bluetooth/bluetooth_windows.c +++ b/src/detection/bluetooth/bluetooth_windows.c @@ -20,8 +20,7 @@ const char* ffDetectBluetooth(FFBluetoothOptions* options, FFlist* devices /* FF .fReturnConnected = TRUE, .fReturnRemembered = options->showDisconnected, .fReturnAuthenticated = options->showDisconnected, - .dwSize = sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS) - }, + .dwSize = sizeof(BLUETOOTH_DEVICE_SEARCH_PARAMS) }, &btdi); if (!hFind) { if (GetLastError() == ERROR_NO_MORE_ITEMS) { diff --git a/src/detection/bluetooth/bluetooth_windows.cpp b/src/detection/bluetooth/bluetooth_windows.cpp index da3abbbf5..61f462efa 100644 --- a/src/detection/bluetooth/bluetooth_windows.cpp +++ b/src/detection/bluetooth/bluetooth_windows.cpp @@ -25,7 +25,7 @@ extern "C" const char* ffBluetoothDetectBattery(FFlist* devices) { return "Failed to get GetDeviceProperties method"; } - FFWmiVariant devicePropertyKeys({L"{104EA319-6EE2-4701-BD47-8DDBF425BBE5} 2", L"DEVPKEY_Bluetooth_DeviceAddress"}); + FFWmiVariant devicePropertyKeys({ L"{104EA319-6EE2-4701-BD47-8DDBF425BBE5} 2", L"DEVPKEY_Bluetooth_DeviceAddress" }); if (FAILED(pInParams->Put(L"devicePropertyKeys", 0, &devicePropertyKeys, CIM_FLAG_ARRAY | CIM_STRING))) { return "Failed to put devicePropertyKeys"; } diff --git a/src/detection/bluetoothradio/bluetoothradio_windows.c b/src/detection/bluetoothradio/bluetoothradio_windows.c index 8d709cb2e..88978bbc4 100644 --- a/src/detection/bluetoothradio/bluetoothradio_windows.c +++ b/src/detection/bluetoothradio/bluetoothradio_windows.c @@ -60,8 +60,7 @@ const char* ffDetectBluetoothRadio(FFlist* devices /* FFBluetoothRadioResult */) HANDLE hRadio = NULL; HBLUETOOTH_DEVICE_FIND hFind = ffBluetoothFindFirstRadio(&(BLUETOOTH_FIND_RADIO_PARAMS) { - .dwSize = sizeof(BLUETOOTH_FIND_RADIO_PARAMS) - }, + .dwSize = sizeof(BLUETOOTH_FIND_RADIO_PARAMS) }, &hRadio); if (!hFind) { if (GetLastError() == ERROR_NO_MORE_ITEMS) { @@ -81,7 +80,7 @@ const char* ffDetectBluetoothRadio(FFlist* devices /* FFBluetoothRadioResult */) FFBluetoothRadioResult* device = ffListAdd(devices); ffStrbufInitS(&device->name, blri.localInfo.name); - BLUETOOTH_ADDRESS_STRUCT addr = {.ullLong = blri.localInfo.address}; + BLUETOOTH_ADDRESS_STRUCT addr = { .ullLong = blri.localInfo.address }; ffStrbufInitF(&device->address, "%02X:%02X:%02X:%02X:%02X:%02X", addr.rgBytes[5], addr.rgBytes[4], addr.rgBytes[3], addr.rgBytes[2], addr.rgBytes[1], addr.rgBytes[0]); device->lmpVersion = blri.radioInfo.lmpVersion; diff --git a/src/detection/bootmgr/bootmgr_bsd.c b/src/detection/bootmgr/bootmgr_bsd.c index 0815af057..47fad6de3 100644 --- a/src/detection/bootmgr/bootmgr_bsd.c +++ b/src/detection/bootmgr/bootmgr_bsd.c @@ -16,7 +16,7 @@ typedef uint16_t efi_char; #endif #ifndef EFI_GLOBAL_VARIABLE -# define EFI_GLOBAL_VARIABLE {0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, {0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c}} +# define EFI_GLOBAL_VARIABLE { 0x8be4df61, 0x93ca, 0x11d2, 0xaa, 0x0d, { 0x00, 0xe0, 0x98, 0x03, 0x2b, 0x8c } } #endif const char* ffDetectBootmgr(FFBootmgrResult* result) { @@ -32,7 +32,7 @@ const char* ffDetectBootmgr(FFBootmgrResult* result) { }; ioc.datasize = sizeof(buffer); - ioc.name = (efi_char[]) {'B', 'o', 'o', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', '\0'}; + ioc.name = (efi_char[]) { 'B', 'o', 'o', 't', 'C', 'u', 'r', 'r', 'e', 'n', 't', '\0' }; ioc.namesize = sizeof("BootCurrent") * 2; if (ioctl(efifd, EFIIOC_VAR_GET, &ioc) < 0 || ioc.datasize != 2) { return "ioctl(EFIIOC_VAR_GET, BootCurrent) failed"; @@ -43,7 +43,7 @@ const char* ffDetectBootmgr(FFBootmgrResult* result) { unsigned char hex[5]; snprintf((char*) hex, sizeof(hex), "%04X", result->order); ioc.datasize = sizeof(buffer); - ioc.name = (efi_char[]) {'B', 'o', 'o', 't', hex[0], hex[1], hex[2], hex[3], '\0'}; + ioc.name = (efi_char[]) { 'B', 'o', 'o', 't', hex[0], hex[1], hex[2], hex[3], '\0' }; ioc.namesize = sizeof("Boot####") * 2; if (ioctl(efifd, EFIIOC_VAR_GET, &ioc) < 0 || ioc.datasize == sizeof(buffer)) { return "ioctl(EFIIOC_VAR_GET, Boot####) failed"; @@ -51,7 +51,7 @@ const char* ffDetectBootmgr(FFBootmgrResult* result) { ffEfiFillLoadOption((FFEfiLoadOption*) buffer, result); - ioc.name = (efi_char[]) {'S', 'e', 'c', 'u', 'r', 'e', 'B', 'o', 'o', 't', '\0'}; + ioc.name = (efi_char[]) { 'S', 'e', 'c', 'u', 'r', 'e', 'B', 'o', 'o', 't', '\0' }; ioc.namesize = sizeof("SecureBoot") * 2; ioc.datasize = sizeof(buffer); if (ioctl(efifd, EFIIOC_VAR_GET, &ioc) == 0 && ioc.datasize == 1) { diff --git a/src/detection/bootmgr/bootmgr_windows.c b/src/detection/bootmgr/bootmgr_windows.c index fadf2c342..e83e1e2a1 100644 --- a/src/detection/bootmgr/bootmgr_windows.c +++ b/src/detection/bootmgr/bootmgr_windows.c @@ -15,8 +15,7 @@ const char* enablePrivilege(const wchar_t* privilege) { TOKEN_PRIVILEGES tp = { .PrivilegeCount = 1, .Privileges = { - (LUID_AND_ATTRIBUTES) {.Attributes = SE_PRIVILEGE_ENABLED} - }, + (LUID_AND_ATTRIBUTES) { .Attributes = SE_PRIVILEGE_ENABLED } }, }; if (!LookupPrivilegeValueW(NULL, privilege, &tp.Privileges[0].Luid)) { return "LookupPrivilegeValue() failed"; diff --git a/src/detection/brightness/brightness_apple.c b/src/detection/brightness/brightness_apple.c index 6b652bbd3..602220358 100644 --- a/src/detection/brightness/brightness_apple.c +++ b/src/detection/brightness/brightness_apple.c @@ -85,7 +85,7 @@ static const char* detectWithDdcci(FF_MAYBE_UNUSED const FFDisplayServerResult* } { - uint8_t i2cIn[4] = {0x82, 0x01, 0x10 /* luminance */}; + uint8_t i2cIn[4] = { 0x82, 0x01, 0x10 /* luminance */ }; i2cIn[3] = 0x6e ^ i2cIn[0] ^ i2cIn[1] ^ i2cIn[2]; for (uint32_t i = 0; i < 2; ++i) { @@ -185,7 +185,7 @@ static const char* detectWithDdcci(const FFDisplayServerResult* displayServer, F continue; } - uint8_t i2cIn[] = {0x51, 0x82, 0x01, 0x10 /* luminance */, 0}; + uint8_t i2cIn[] = { 0x51, 0x82, 0x01, 0x10 /* luminance */, 0 }; i2cIn[4] = 0x6E ^ i2cIn[0] ^ i2cIn[1] ^ i2cIn[2] ^ i2cIn[3]; IOI2CRequest request = { diff --git a/src/detection/camera/camera_android.c b/src/detection/camera/camera_android.c index cb427de88..d950829b9 100644 --- a/src/detection/camera/camera_android.c +++ b/src/detection/camera/camera_android.c @@ -16,7 +16,7 @@ static inline void wrapYyjsonFree(yyjson_doc** doc) { const char* ffDetectCamera(FF_MAYBE_UNUSED FFlist* result) { FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate(); - if (ffProcessAppendStdOut(&buffer, (char* const[]) {FF_TERMUX_API_PATH, FF_TERMUX_API_PARAM, NULL})) { + if (ffProcessAppendStdOut(&buffer, (char* const[]) { FF_TERMUX_API_PATH, FF_TERMUX_API_PARAM, NULL })) { return "Starting `" FF_TERMUX_API_PATH " " FF_TERMUX_API_PARAM "` failed"; } diff --git a/src/detection/camera/camera_linux.c b/src/detection/camera/camera_linux.c index 924f02a96..fa2dd03ff 100644 --- a/src/detection/camera/camera_linux.c +++ b/src/detection/camera/camera_linux.c @@ -34,7 +34,7 @@ const char* ffDetectCamera(FFlist* result) { continue; } - struct v4l2_format fmt = {.type = V4L2_BUF_TYPE_VIDEO_CAPTURE}; + struct v4l2_format fmt = { .type = V4L2_BUF_TYPE_VIDEO_CAPTURE }; if (ioctl(fd, VIDIOC_G_FMT, &fmt) < 0) { continue; } diff --git a/src/detection/command/command.c b/src/detection/command/command.c index 66ae36c36..112fb0ba0 100644 --- a/src/detection/command/command.c +++ b/src/detection/command/command.c @@ -21,9 +21,8 @@ static const char* spawnProcess(FFCommandOptions* options, FFProcessHandle* hand options->shell.chars, options->param.chars, options->text.chars, - NULL - } - : (char* const[]) {options->shell.chars, options->text.chars, NULL}, + NULL } + : (char* const[]) { options->shell.chars, options->text.chars, NULL }, options->useStdErr, handle); } diff --git a/src/detection/cpu/cpu.c b/src/detection/cpu/cpu.c index 4518d3aad..75e2fa326 100644 --- a/src/detection/cpu/cpu.c +++ b/src/detection/cpu/cpu.c @@ -291,7 +291,7 @@ void ffCPUDetectByCpuid(FFCPUResult* cpu) { // #include // Not available in macOS 14- void ffCPUDetectByCpuid(FFCPUResult* cpu) { - uint64_t caps[2] = {0}; // 80-bit capability mask, split into two 64-bit values + uint64_t caps[2] = { 0 }; // 80-bit capability mask, split into two 64-bit values size_t size = sizeof(caps); if (sysctlbyname("hw.optional.arm.caps", caps, &size, NULL, 0) != 0) { diff --git a/src/detection/cpu/cpu_apple.c b/src/detection/cpu/cpu_apple.c index c7cdc3de3..d51501838 100644 --- a/src/detection/cpu/cpu_apple.c +++ b/src/detection/cpu/cpu_apple.c @@ -92,7 +92,7 @@ static const char* detectFrequency(FFCPUResult* cpu) { if (cpu->frequencyBase == 0) { unsigned current = 0; size_t size = sizeof(current); - if (sysctl((int[]) {CTL_HW, HW_CPU_FREQ}, 2, ¤t, &size, NULL, 0) == 0) { + if (sysctl((int[]) { CTL_HW, HW_CPU_FREQ }, 2, ¤t, &size, NULL, 0) == 0) { cpu->frequencyBase = (uint32_t) (current / 1000 / 1000); } } diff --git a/src/detection/cpu/cpu_obsd.c b/src/detection/cpu/cpu_obsd.c index 2b49c2205..47e6bfb9e 100644 --- a/src/detection/cpu/cpu_obsd.c +++ b/src/detection/cpu/cpu_obsd.c @@ -7,7 +7,7 @@ #include static const char* detectCPUTemp(const FFCPUOptions* options, FFCPUResult* cpu) { - int mib[5] = {CTL_HW, HW_SENSORS, 0, SENSOR_TEMP, 0}; + int mib[5] = { CTL_HW, HW_SENSORS, 0, SENSOR_TEMP, 0 }; for (mib[2] = 0; mib[2] < 1024; mib[2]++) { struct sensordev sensordev; diff --git a/src/detection/cpu/cpu_sunos.c b/src/detection/cpu/cpu_sunos.c index e400a0437..01a761758 100644 --- a/src/detection/cpu/cpu_sunos.c +++ b/src/detection/cpu/cpu_sunos.c @@ -4,7 +4,7 @@ #include static const char* detectCPUTempByKstat(const FFCPUOptions* options, kstat_ctl_t* kc, FFCPUResult* cpu) { - const char* possibleModules[] = {"temperature", "cpu_temp", "acpi_thermal", NULL}; + const char* possibleModules[] = { "temperature", "cpu_temp", "acpi_thermal", NULL }; if (options->tempSensor.length > 0) { possibleModules[0] = options->tempSensor.chars; @@ -36,7 +36,7 @@ static const char* detectCPUTempByKstat(const FFCPUOptions* options, kstat_ctl_t static const char* detectCPUTempByIpmiTool(FFCPUResult* cpu) { FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate(); - const char* error = ffProcessAppendStdOut(&buffer, (char* const[]) {"ipmitool", "-c", "sdr", "list", NULL}); + const char* error = ffProcessAppendStdOut(&buffer, (char* const[]) { "ipmitool", "-c", "sdr", "list", NULL }); if (error) { return error; diff --git a/src/detection/cpu/cpu_windows.c b/src/detection/cpu/cpu_windows.c index bb0f6e1b4..f29b60477 100644 --- a/src/detection/cpu/cpu_windows.c +++ b/src/detection/cpu/cpu_windows.c @@ -24,7 +24,7 @@ const char* detectThermalTemp(const FFCPUOptions* options, double* result) { .Identifier = { // Thermal Zone Information // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{383487a6-3676-4870-a4e7-d45b30c35629}\{52bc5412-dac2-449c-8bc2-96443888fe6b} - .CounterSetGuid = {0x52bc5412, 0xdac2, 0x449c, {0x8b, 0xc2, 0x96, 0x44, 0x38, 0x88, 0xfe, 0x6b}}, + .CounterSetGuid = { 0x52bc5412, 0xdac2, 0x449c, { 0x8b, 0xc2, 0x96, 0x44, 0x38, 0x88, 0xfe, 0x6b } }, .Size = sizeof(querySpec), .CounterId = PERF_WILDCARD_COUNTER, .InstanceId = PERF_WILDCARD_COUNTER, diff --git a/src/detection/cpuusage/cpuusage_bsd.c b/src/detection/cpuusage/cpuusage_bsd.c index ba37ea331..73cd9fd57 100644 --- a/src/detection/cpuusage/cpuusage_bsd.c +++ b/src/detection/cpuusage/cpuusage_bsd.c @@ -14,9 +14,9 @@ const char* ffGetCpuUsageInfo(FFlist* cpuTimes) { size_t neededLength = 0; #if __OpenBSD__ || __NetBSD__ # ifdef KERN_CPTIME - int ctls[] = {CTL_KERN, KERN_CPTIME}; + int ctls[] = { CTL_KERN, KERN_CPTIME }; # else - int ctls[] = {CTL_KERN, KERN_CP_TIME}; + int ctls[] = { CTL_KERN, KERN_CP_TIME }; # endif if (sysctl(ctls, 2, NULL, &neededLength, NULL, 0) != 0) { return "sysctl({CTL_KERN, KERN_CPTIME}, 2, NULL) failed"; diff --git a/src/detection/cpuusage/cpuusage_windows.c b/src/detection/cpuusage/cpuusage_windows.c index 05505577e..d2f984b84 100644 --- a/src/detection/cpuusage/cpuusage_windows.c +++ b/src/detection/cpuusage/cpuusage_windows.c @@ -49,7 +49,7 @@ static const char* getInfoByPerflib(FFlist* cpuTimes) { .Identifier = { // Processor Information GUID // HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\_V2Providers\{383487a6-3676-4870-a4e7-d45b30c35629}\{b4fc721a-0378-476f-89ba-a5a79f810b36} - .CounterSetGuid = {0xb4fc721a, 0x0378, 0x476f, {0x89, 0xba, 0xa5, 0xa7, 0x9f, 0x81, 0x0b, 0x36}}, + .CounterSetGuid = { 0xb4fc721a, 0x0378, 0x476f, { 0x89, 0xba, 0xa5, 0xa7, 0x9f, 0x81, 0x0b, 0x36 } }, .Size = sizeof(querySpec), .CounterId = PERF_WILDCARD_COUNTER, // https://learn.microsoft.com/en-us/windows/win32/perfctrs/using-the-perflib-functions-to-consume-counter-data .InstanceId = PERF_WILDCARD_COUNTER, diff --git a/src/detection/cursor/cursor_linux.c b/src/detection/cursor/cursor_linux.c index ae7b01c73..11e341ea6 100644 --- a/src/detection/cursor/cursor_linux.c +++ b/src/detection/cursor/cursor_linux.c @@ -30,7 +30,7 @@ static bool detectCursorGTK(FFCursorResult* result) { } static void detectCursorFromConfigFile(const char* relativeFilePath, const char* themeStart, const char* themeDefault, const char* sizeStart, const char* sizeDefault, FFCursorResult* result) { - if (ffParsePropFileConfigValues(relativeFilePath, 2, (FFpropquery[]) {{themeStart, &result->theme}, {sizeStart, &result->size}})) { + if (ffParsePropFileConfigValues(relativeFilePath, 2, (FFpropquery[]) { { themeStart, &result->theme }, { sizeStart, &result->size } })) { if (result->theme.length == 0) { ffStrbufAppendS(&result->theme, themeDefault); } @@ -46,7 +46,7 @@ static void detectCursorFromConfigFile(const char* relativeFilePath, const char* } static bool detectCursorFromXResources(FFCursorResult* result) { - ffParsePropFileHomeValues(".Xresources", 2, (FFpropquery[]) {{"Xcursor.theme :", &result->theme}, {"Xcursor.size :", &result->size}}); + ffParsePropFileHomeValues(".Xresources", 2, (FFpropquery[]) { { "Xcursor.theme :", &result->theme }, { "Xcursor.size :", &result->size } }); return result->theme.length > 0; } diff --git a/src/detection/de/de_linux.c b/src/detection/de/de_linux.c index 7c83aa6f1..f754568b4 100644 --- a/src/detection/de/de_linux.c +++ b/src/detection/de/de_linux.c @@ -50,7 +50,7 @@ static void getKDE(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) { } if (result->length == 0) { - if (ffProcessAppendStdOut(result, (char* const[]) {"plasmashell", "--version", NULL}) == NULL) { // plasmashell 5.27.5 + if (ffProcessAppendStdOut(result, (char* const[]) { "plasmashell", "--version", NULL }) == NULL) { // plasmashell 5.27.5 ffStrbufSubstrAfterLastC(result, ' '); } } @@ -74,7 +74,7 @@ static void getGnome(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) { getGnomeByDbus(result); if (result->length == 0) { - if (ffProcessAppendStdOut(result, (char* const[]) {"gnome-shell", "--version", NULL}) == NULL) { // GNOME Shell 44.1 + if (ffProcessAppendStdOut(result, (char* const[]) { "gnome-shell", "--version", NULL }) == NULL) { // GNOME Shell 44.1 ffStrbufSubstrAfterLastC(result, ' '); } } @@ -88,7 +88,7 @@ static void getCinnamon(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) } if (result->length == 0) { - if (ffProcessAppendStdOut(result, (char* const[]) {"cinnamon", "--version", NULL}) == NULL) { // Cinnamon 6.2.2 + if (ffProcessAppendStdOut(result, (char* const[]) { "cinnamon", "--version", NULL }) == NULL) { // Cinnamon 6.2.2 ffStrbufSubstrAfterLastC(result, ' '); } } @@ -99,12 +99,12 @@ static void getMate(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) { FF_STRBUF_AUTO_DESTROY minor = ffStrbufCreate(); FF_STRBUF_AUTO_DESTROY micro = ffStrbufCreate(); - ffParsePropFileDataValues("mate-about/mate-version.xml", 3, (FFpropquery[]) {{"", &major}, {"", &minor}, {"", µ}}); + ffParsePropFileDataValues("mate-about/mate-version.xml", 3, (FFpropquery[]) { { "", &major }, { "", &minor }, { "", µ } }); ffParseSemver(result, &major, &minor, µ); if (result->length == 0) { - ffProcessAppendStdOut(result, (char* const[]) {"mate-session", "--version", NULL}); + ffProcessAppendStdOut(result, (char* const[]) { "mate-session", "--version", NULL }); ffStrbufSubstrAfterFirstC(result, ' '); ffStrbufTrim(result, ' '); @@ -129,7 +129,7 @@ static void getXFCE4(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) { if (result->length == 0) { // This is somewhat slow - ffProcessAppendStdOut(result, (char* const[]) {"xfce4-session", "--version", NULL}); + ffProcessAppendStdOut(result, (char* const[]) { "xfce4-session", "--version", NULL }); ffStrbufSubstrBeforeFirstC(result, ')'); ffStrbufSubstrAfterLastC(result, ' '); @@ -149,7 +149,7 @@ static void getLXQt(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) { if (result->length == 0) { // This is really, really, really slow. Thank you, LXQt developers - ffProcessAppendStdOut(result, (char* const[]) {"lxqt-session", "-v", NULL}); + ffProcessAppendStdOut(result, (char* const[]) { "lxqt-session", "-v", NULL }); result->length = 0; // don't set '\0' byte ffParsePropLines(result->chars, "liblxqt", result); @@ -192,7 +192,7 @@ static const char* getTrinity(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* opt } ffStrbufClear(&path); - if (ffProcessAppendStdOut(&path, (char* const[]) {"tde-config", "--version", NULL}) == NULL) { + if (ffProcessAppendStdOut(&path, (char* const[]) { "tde-config", "--version", NULL }) == NULL) { ffParsePropLines(path.chars, "TDE: ", result); return NULL; } @@ -201,7 +201,7 @@ static const char* getTrinity(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* opt } static const char* getCosmic(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) { - if (ffProcessAppendStdOut(result, (char* const[]) {"cosmic-comp", "--version", NULL}) == NULL) { + if (ffProcessAppendStdOut(result, (char* const[]) { "cosmic-comp", "--version", NULL }) == NULL) { // cosmic-comp 0.1.0 (git commit fa88002ba41d2edec25dd7ffdee9719fbb928fc0) ffStrbufSubstrAfterFirstC(result, ' '); ffStrbufSubstrBeforeFirstC(result, ' '); diff --git a/src/detection/diskio/diskio_nbsd.c b/src/detection/diskio/diskio_nbsd.c index 0a72680ea..e68b28567 100644 --- a/src/detection/diskio/diskio_nbsd.c +++ b/src/detection/diskio/diskio_nbsd.c @@ -6,7 +6,7 @@ #include const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options) { - int mib[] = {CTL_HW, HW_IOSTATS, sizeof(struct io_sysctl)}; + int mib[] = { CTL_HW, HW_IOSTATS, sizeof(struct io_sysctl) }; size_t len; if (sysctl(mib, ARRAY_SIZE(mib), NULL, &len, NULL, 0) < 0) { return "sysctl({HW_IOSTATS}, NULL) failed"; diff --git a/src/detection/diskio/diskio_obsd.c b/src/detection/diskio/diskio_obsd.c index 6f449d042..34a58f438 100644 --- a/src/detection/diskio/diskio_obsd.c +++ b/src/detection/diskio/diskio_obsd.c @@ -6,7 +6,7 @@ #include const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options) { - int mib[] = {CTL_HW, HW_DISKSTATS}; + int mib[] = { CTL_HW, HW_DISKSTATS }; size_t len; if (sysctl(mib, ARRAY_SIZE(mib), NULL, &len, NULL, 0) < 0) { return "sysctl({HW_DISKSTATS}, NULL) failed"; diff --git a/src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c b/src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c index e27af2518..7d15867f7 100644 --- a/src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c +++ b/src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c @@ -35,12 +35,12 @@ static const struct wl_interface* kde_output_device_v2_types[] = { }; static const struct wl_message kde_output_device_registry_v2_requests[] = { - {"stop", "21", kde_output_device_v2_types + 0}, + { "stop", "21", kde_output_device_v2_types + 0 }, }; static const struct wl_message kde_output_device_registry_v2_events[] = { - {"finished", "21", kde_output_device_v2_types + 0}, - {"output", "21n", kde_output_device_v2_types + 8}, + { "finished", "21", kde_output_device_v2_types + 0 }, + { "output", "21n", kde_output_device_v2_types + 8 }, }; WL_EXPORT const struct wl_interface kde_output_device_registry_v2_interface = { @@ -53,47 +53,47 @@ WL_EXPORT const struct wl_interface kde_output_device_registry_v2_interface = { }; static const struct wl_message kde_output_device_v2_requests[] = { - {"release", "21", kde_output_device_v2_types + 0}, + { "release", "21", kde_output_device_v2_types + 0 }, }; static const struct wl_message kde_output_device_v2_events[] = { - {"geometry", "iiiiissi", kde_output_device_v2_types + 0}, - {"current_mode", "o", kde_output_device_v2_types + 9}, - {"mode", "n", kde_output_device_v2_types + 10}, - {"done", "", kde_output_device_v2_types + 0}, - {"scale", "f", kde_output_device_v2_types + 0}, - {"edid", "s", kde_output_device_v2_types + 0}, - {"enabled", "i", kde_output_device_v2_types + 0}, - {"uuid", "s", kde_output_device_v2_types + 0}, - {"serial_number", "s", kde_output_device_v2_types + 0}, - {"eisa_id", "s", kde_output_device_v2_types + 0}, - {"capabilities", "u", kde_output_device_v2_types + 0}, - {"overscan", "u", kde_output_device_v2_types + 0}, - {"vrr_policy", "u", kde_output_device_v2_types + 0}, - {"rgb_range", "u", kde_output_device_v2_types + 0}, - {"name", "2s", kde_output_device_v2_types + 0}, - {"high_dynamic_range", "3u", kde_output_device_v2_types + 0}, - {"sdr_brightness", "3u", kde_output_device_v2_types + 0}, - {"wide_color_gamut", "3u", kde_output_device_v2_types + 0}, - {"auto_rotate_policy", "4u", kde_output_device_v2_types + 0}, - {"icc_profile_path", "5s", kde_output_device_v2_types + 0}, - {"brightness_metadata", "6uuu", kde_output_device_v2_types + 0}, - {"brightness_overrides", "6iii", kde_output_device_v2_types + 0}, - {"sdr_gamut_wideness", "6u", kde_output_device_v2_types + 0}, - {"color_profile_source", "7u", kde_output_device_v2_types + 0}, - {"brightness", "8u", kde_output_device_v2_types + 0}, - {"color_power_tradeoff", "10u", kde_output_device_v2_types + 0}, - {"dimming", "11u", kde_output_device_v2_types + 0}, - {"replication_source", "13s", kde_output_device_v2_types + 0}, - {"ddc_ci_allowed", "14u", kde_output_device_v2_types + 0}, - {"max_bits_per_color", "15u", kde_output_device_v2_types + 0}, - {"max_bits_per_color_range", "15uu", kde_output_device_v2_types + 0}, - {"automatic_max_bits_per_color_limit", "15u", kde_output_device_v2_types + 0}, - {"edr_policy", "16u", kde_output_device_v2_types + 0}, - {"sharpness", "17u", kde_output_device_v2_types + 0}, - {"priority", "18u", kde_output_device_v2_types + 0}, - {"auto_brightness", "20u", kde_output_device_v2_types + 0}, - {"removed", "21", kde_output_device_v2_types + 0}, + { "geometry", "iiiiissi", kde_output_device_v2_types + 0 }, + { "current_mode", "o", kde_output_device_v2_types + 9 }, + { "mode", "n", kde_output_device_v2_types + 10 }, + { "done", "", kde_output_device_v2_types + 0 }, + { "scale", "f", kde_output_device_v2_types + 0 }, + { "edid", "s", kde_output_device_v2_types + 0 }, + { "enabled", "i", kde_output_device_v2_types + 0 }, + { "uuid", "s", kde_output_device_v2_types + 0 }, + { "serial_number", "s", kde_output_device_v2_types + 0 }, + { "eisa_id", "s", kde_output_device_v2_types + 0 }, + { "capabilities", "u", kde_output_device_v2_types + 0 }, + { "overscan", "u", kde_output_device_v2_types + 0 }, + { "vrr_policy", "u", kde_output_device_v2_types + 0 }, + { "rgb_range", "u", kde_output_device_v2_types + 0 }, + { "name", "2s", kde_output_device_v2_types + 0 }, + { "high_dynamic_range", "3u", kde_output_device_v2_types + 0 }, + { "sdr_brightness", "3u", kde_output_device_v2_types + 0 }, + { "wide_color_gamut", "3u", kde_output_device_v2_types + 0 }, + { "auto_rotate_policy", "4u", kde_output_device_v2_types + 0 }, + { "icc_profile_path", "5s", kde_output_device_v2_types + 0 }, + { "brightness_metadata", "6uuu", kde_output_device_v2_types + 0 }, + { "brightness_overrides", "6iii", kde_output_device_v2_types + 0 }, + { "sdr_gamut_wideness", "6u", kde_output_device_v2_types + 0 }, + { "color_profile_source", "7u", kde_output_device_v2_types + 0 }, + { "brightness", "8u", kde_output_device_v2_types + 0 }, + { "color_power_tradeoff", "10u", kde_output_device_v2_types + 0 }, + { "dimming", "11u", kde_output_device_v2_types + 0 }, + { "replication_source", "13s", kde_output_device_v2_types + 0 }, + { "ddc_ci_allowed", "14u", kde_output_device_v2_types + 0 }, + { "max_bits_per_color", "15u", kde_output_device_v2_types + 0 }, + { "max_bits_per_color_range", "15uu", kde_output_device_v2_types + 0 }, + { "automatic_max_bits_per_color_limit", "15u", kde_output_device_v2_types + 0 }, + { "edr_policy", "16u", kde_output_device_v2_types + 0 }, + { "sharpness", "17u", kde_output_device_v2_types + 0 }, + { "priority", "18u", kde_output_device_v2_types + 0 }, + { "auto_brightness", "20u", kde_output_device_v2_types + 0 }, + { "removed", "21", kde_output_device_v2_types + 0 }, }; WL_EXPORT const struct wl_interface kde_output_device_v2_interface = { @@ -106,11 +106,11 @@ WL_EXPORT const struct wl_interface kde_output_device_v2_interface = { }; static const struct wl_message kde_output_device_mode_v2_events[] = { - {"size", "ii", kde_output_device_v2_types + 0}, - {"refresh", "i", kde_output_device_v2_types + 0}, - {"preferred", "", kde_output_device_v2_types + 0}, - {"removed", "", kde_output_device_v2_types + 0}, - {"flags", "19u", kde_output_device_v2_types + 0}, + { "size", "ii", kde_output_device_v2_types + 0 }, + { "refresh", "i", kde_output_device_v2_types + 0 }, + { "preferred", "", kde_output_device_v2_types + 0 }, + { "removed", "", kde_output_device_v2_types + 0 }, + { "flags", "19u", kde_output_device_v2_types + 0 }, }; WL_EXPORT const struct wl_interface kde_output_device_mode_v2_interface = { diff --git a/src/detection/displayserver/linux/wayland/kde-output-order-v1-protocol.c b/src/detection/displayserver/linux/wayland/kde-output-order-v1-protocol.c index 89a76c67b..378d7546f 100644 --- a/src/detection/displayserver/linux/wayland/kde-output-order-v1-protocol.c +++ b/src/detection/displayserver/linux/wayland/kde-output-order-v1-protocol.c @@ -17,12 +17,12 @@ static const struct wl_interface* kde_output_order_v1_types[] = { }; static const struct wl_message kde_output_order_v1_requests[] = { - {"destroy", "", kde_output_order_v1_types + 0}, + { "destroy", "", kde_output_order_v1_types + 0 }, }; static const struct wl_message kde_output_order_v1_events[] = { - {"output", "s", kde_output_order_v1_types + 0}, - {"done", "", kde_output_order_v1_types + 0}, + { "output", "s", kde_output_order_v1_types + 0 }, + { "done", "", kde_output_order_v1_types + 0 }, }; WL_EXPORT const struct wl_interface kde_output_order_v1_interface = { diff --git a/src/detection/displayserver/linux/wayland/kde-output.c b/src/detection/displayserver/linux/wayland/kde-output.c index 555362ec7..80161551a 100644 --- a/src/detection/displayserver/linux/wayland/kde-output.c +++ b/src/detection/displayserver/linux/wayland/kde-output.c @@ -45,7 +45,7 @@ static void waylandKdeModeListener(void* data, FF_MAYBE_UNUSED struct kde_output } WaylandKdeMode* newMode = ffListAdd((FFlist*) wldata->internal); - *newMode = (WaylandKdeMode) {.pMode = mode}; + *newMode = (WaylandKdeMode) { .pMode = mode }; // Strangely, the listener is called only in this function, but not in `waylandKdeCurrentModeListener` wldata->parent->ffwl_proxy_add_listener((struct wl_proxy*) mode, (void (**)(void)) &modeListener, newMode); diff --git a/src/detection/displayserver/linux/wayland/wayland.c b/src/detection/displayserver/linux/wayland/wayland.c index ca553fddb..c6943c40d 100644 --- a/src/detection/displayserver/linux/wayland/wayland.c +++ b/src/detection/displayserver/linux/wayland/wayland.c @@ -49,7 +49,7 @@ static bool waylandDetectWM(int fd, FFDisplayServerResult* result) { size_t size = 4096; ffStrbufEnsureFixedLengthFree(&result->wmProcessName, (uint32_t) size); - if (sysctl((int[]) {CTL_KERN, KERN_PROC, KERN_PROC_ARGS, ucred.cr_pid}, 4, result->wmProcessName.chars, &size, NULL, 0) != 0) { + if (sysctl((int[]) { CTL_KERN, KERN_PROC, KERN_PROC_ARGS, ucred.cr_pid }, 4, result->wmProcessName.chars, &size, NULL, 0) != 0) { return false; } result->wmProcessName.length = (uint32_t) size - 1; diff --git a/src/detection/displayserver/linux/wayland/wlr-output-management-unstable-v1-protocol.c b/src/detection/displayserver/linux/wayland/wlr-output-management-unstable-v1-protocol.c index 77261f0a8..0f183f18e 100644 --- a/src/detection/displayserver/linux/wayland/wlr-output-management-unstable-v1-protocol.c +++ b/src/detection/displayserver/linux/wayland/wlr-output-management-unstable-v1-protocol.c @@ -63,14 +63,14 @@ static const struct wl_interface* wlr_output_management_unstable_v1_types[] = { }; static const struct wl_message zwlr_output_manager_v1_requests[] = { - {"create_configuration", "nu", wlr_output_management_unstable_v1_types + 3}, - {"stop", "", wlr_output_management_unstable_v1_types + 0}, + { "create_configuration", "nu", wlr_output_management_unstable_v1_types + 3 }, + { "stop", "", wlr_output_management_unstable_v1_types + 0 }, }; static const struct wl_message zwlr_output_manager_v1_events[] = { - {"head", "n", wlr_output_management_unstable_v1_types + 5}, - {"done", "u", wlr_output_management_unstable_v1_types + 0}, - {"finished", "", wlr_output_management_unstable_v1_types + 0}, + { "head", "n", wlr_output_management_unstable_v1_types + 5 }, + { "done", "u", wlr_output_management_unstable_v1_types + 0 }, + { "finished", "", wlr_output_management_unstable_v1_types + 0 }, }; WL_PRIVATE const struct wl_interface zwlr_output_manager_v1_interface = { @@ -83,24 +83,24 @@ WL_PRIVATE const struct wl_interface zwlr_output_manager_v1_interface = { }; static const struct wl_message zwlr_output_head_v1_requests[] = { - {"release", "3", wlr_output_management_unstable_v1_types + 0}, + { "release", "3", wlr_output_management_unstable_v1_types + 0 }, }; static const struct wl_message zwlr_output_head_v1_events[] = { - {"name", "s", wlr_output_management_unstable_v1_types + 0}, - {"description", "s", wlr_output_management_unstable_v1_types + 0}, - {"physical_size", "ii", wlr_output_management_unstable_v1_types + 0}, - {"mode", "n", wlr_output_management_unstable_v1_types + 6}, - {"enabled", "i", wlr_output_management_unstable_v1_types + 0}, - {"current_mode", "o", wlr_output_management_unstable_v1_types + 7}, - {"position", "ii", wlr_output_management_unstable_v1_types + 0}, - {"transform", "i", wlr_output_management_unstable_v1_types + 0}, - {"scale", "f", wlr_output_management_unstable_v1_types + 0}, - {"finished", "", wlr_output_management_unstable_v1_types + 0}, - {"make", "2s", wlr_output_management_unstable_v1_types + 0}, - {"model", "2s", wlr_output_management_unstable_v1_types + 0}, - {"serial_number", "2s", wlr_output_management_unstable_v1_types + 0}, - {"adaptive_sync", "4u", wlr_output_management_unstable_v1_types + 0}, + { "name", "s", wlr_output_management_unstable_v1_types + 0 }, + { "description", "s", wlr_output_management_unstable_v1_types + 0 }, + { "physical_size", "ii", wlr_output_management_unstable_v1_types + 0 }, + { "mode", "n", wlr_output_management_unstable_v1_types + 6 }, + { "enabled", "i", wlr_output_management_unstable_v1_types + 0 }, + { "current_mode", "o", wlr_output_management_unstable_v1_types + 7 }, + { "position", "ii", wlr_output_management_unstable_v1_types + 0 }, + { "transform", "i", wlr_output_management_unstable_v1_types + 0 }, + { "scale", "f", wlr_output_management_unstable_v1_types + 0 }, + { "finished", "", wlr_output_management_unstable_v1_types + 0 }, + { "make", "2s", wlr_output_management_unstable_v1_types + 0 }, + { "model", "2s", wlr_output_management_unstable_v1_types + 0 }, + { "serial_number", "2s", wlr_output_management_unstable_v1_types + 0 }, + { "adaptive_sync", "4u", wlr_output_management_unstable_v1_types + 0 }, }; WL_PRIVATE const struct wl_interface zwlr_output_head_v1_interface = { @@ -113,14 +113,14 @@ WL_PRIVATE const struct wl_interface zwlr_output_head_v1_interface = { }; static const struct wl_message zwlr_output_mode_v1_requests[] = { - {"release", "3", wlr_output_management_unstable_v1_types + 0}, + { "release", "3", wlr_output_management_unstable_v1_types + 0 }, }; static const struct wl_message zwlr_output_mode_v1_events[] = { - {"size", "ii", wlr_output_management_unstable_v1_types + 0}, - {"refresh", "i", wlr_output_management_unstable_v1_types + 0}, - {"preferred", "", wlr_output_management_unstable_v1_types + 0}, - {"finished", "", wlr_output_management_unstable_v1_types + 0}, + { "size", "ii", wlr_output_management_unstable_v1_types + 0 }, + { "refresh", "i", wlr_output_management_unstable_v1_types + 0 }, + { "preferred", "", wlr_output_management_unstable_v1_types + 0 }, + { "finished", "", wlr_output_management_unstable_v1_types + 0 }, }; WL_PRIVATE const struct wl_interface zwlr_output_mode_v1_interface = { @@ -133,17 +133,17 @@ WL_PRIVATE const struct wl_interface zwlr_output_mode_v1_interface = { }; static const struct wl_message zwlr_output_configuration_v1_requests[] = { - {"enable_head", "no", wlr_output_management_unstable_v1_types + 8}, - {"disable_head", "o", wlr_output_management_unstable_v1_types + 10}, - {"apply", "", wlr_output_management_unstable_v1_types + 0}, - {"test", "", wlr_output_management_unstable_v1_types + 0}, - {"destroy", "", wlr_output_management_unstable_v1_types + 0}, + { "enable_head", "no", wlr_output_management_unstable_v1_types + 8 }, + { "disable_head", "o", wlr_output_management_unstable_v1_types + 10 }, + { "apply", "", wlr_output_management_unstable_v1_types + 0 }, + { "test", "", wlr_output_management_unstable_v1_types + 0 }, + { "destroy", "", wlr_output_management_unstable_v1_types + 0 }, }; static const struct wl_message zwlr_output_configuration_v1_events[] = { - {"succeeded", "", wlr_output_management_unstable_v1_types + 0}, - {"failed", "", wlr_output_management_unstable_v1_types + 0}, - {"cancelled", "", wlr_output_management_unstable_v1_types + 0}, + { "succeeded", "", wlr_output_management_unstable_v1_types + 0 }, + { "failed", "", wlr_output_management_unstable_v1_types + 0 }, + { "cancelled", "", wlr_output_management_unstable_v1_types + 0 }, }; WL_PRIVATE const struct wl_interface zwlr_output_configuration_v1_interface = { @@ -156,12 +156,12 @@ WL_PRIVATE const struct wl_interface zwlr_output_configuration_v1_interface = { }; static const struct wl_message zwlr_output_configuration_head_v1_requests[] = { - {"set_mode", "o", wlr_output_management_unstable_v1_types + 11}, - {"set_custom_mode", "iii", wlr_output_management_unstable_v1_types + 0}, - {"set_position", "ii", wlr_output_management_unstable_v1_types + 0}, - {"set_transform", "i", wlr_output_management_unstable_v1_types + 0}, - {"set_scale", "f", wlr_output_management_unstable_v1_types + 0}, - {"set_adaptive_sync", "4u", wlr_output_management_unstable_v1_types + 0}, + { "set_mode", "o", wlr_output_management_unstable_v1_types + 11 }, + { "set_custom_mode", "iii", wlr_output_management_unstable_v1_types + 0 }, + { "set_position", "ii", wlr_output_management_unstable_v1_types + 0 }, + { "set_transform", "i", wlr_output_management_unstable_v1_types + 0 }, + { "set_scale", "f", wlr_output_management_unstable_v1_types + 0 }, + { "set_adaptive_sync", "4u", wlr_output_management_unstable_v1_types + 0 }, }; WL_PRIVATE const struct wl_interface zwlr_output_configuration_head_v1_interface = { diff --git a/src/detection/displayserver/linux/wayland/xdg-output-unstable-v1-protocol.c b/src/detection/displayserver/linux/wayland/xdg-output-unstable-v1-protocol.c index 67cc522b1..dde8b15ea 100644 --- a/src/detection/displayserver/linux/wayland/xdg-output-unstable-v1-protocol.c +++ b/src/detection/displayserver/linux/wayland/xdg-output-unstable-v1-protocol.c @@ -39,8 +39,8 @@ static const struct wl_interface* xdg_output_unstable_v1_types[] = { }; static const struct wl_message zxdg_output_manager_v1_requests[] = { - {"destroy", "", xdg_output_unstable_v1_types + 0}, - {"get_xdg_output", "no", xdg_output_unstable_v1_types + 2}, + { "destroy", "", xdg_output_unstable_v1_types + 0 }, + { "get_xdg_output", "no", xdg_output_unstable_v1_types + 2 }, }; WL_EXPORT const struct wl_interface zxdg_output_manager_v1_interface = { @@ -53,15 +53,15 @@ WL_EXPORT const struct wl_interface zxdg_output_manager_v1_interface = { }; static const struct wl_message zxdg_output_v1_requests[] = { - {"destroy", "", xdg_output_unstable_v1_types + 0}, + { "destroy", "", xdg_output_unstable_v1_types + 0 }, }; static const struct wl_message zxdg_output_v1_events[] = { - {"logical_position", "ii", xdg_output_unstable_v1_types + 0}, - {"logical_size", "ii", xdg_output_unstable_v1_types + 0}, - {"done", "", xdg_output_unstable_v1_types + 0}, - {"name", "2s", xdg_output_unstable_v1_types + 0}, - {"description", "2s", xdg_output_unstable_v1_types + 0}, + { "logical_position", "ii", xdg_output_unstable_v1_types + 0 }, + { "logical_size", "ii", xdg_output_unstable_v1_types + 0 }, + { "done", "", xdg_output_unstable_v1_types + 0 }, + { "name", "2s", xdg_output_unstable_v1_types + 0 }, + { "description", "2s", xdg_output_unstable_v1_types + 0 }, }; WL_EXPORT const struct wl_interface zxdg_output_v1_interface = { diff --git a/src/detection/displayserver/linux/wayland/zwlr-output.c b/src/detection/displayserver/linux/wayland/zwlr-output.c index 9a4797009..92743d913 100644 --- a/src/detection/displayserver/linux/wayland/zwlr-output.c +++ b/src/detection/displayserver/linux/wayland/zwlr-output.c @@ -51,7 +51,7 @@ static void waylandZwlrModeListener(void* data, FF_MAYBE_UNUSED struct zwlr_outp } WaylandZwlrMode* newMode = ffListAdd((FFlist*) wldata->internal); - *newMode = (WaylandZwlrMode) {.pMode = mode}; + *newMode = (WaylandZwlrMode) { .pMode = mode }; // Strangely, the listener is called only in this function, but not in `waylandZwlrCurrentModeListener` wldata->parent->ffwl_proxy_add_listener((struct wl_proxy*) mode, (void (**)(void)) &modeListener, newMode); diff --git a/src/detection/displayserver/linux/wmde.c b/src/detection/displayserver/linux/wmde.c index 4932c3b89..0afb33aa8 100644 --- a/src/detection/displayserver/linux/wmde.c +++ b/src/detection/displayserver/linux/wmde.c @@ -277,7 +277,7 @@ static const char* getFromProcesses(FFDisplayServerResult* result) { # define ki_comm kp_comm # endif - int request[] = {CTL_KERN, KERN_PROC, KERN_PROC_UID, (int) userId}; + int request[] = { CTL_KERN, KERN_PROC, KERN_PROC_UID, (int) userId }; size_t length = 0; if (sysctl(request, ARRAY_SIZE(request), NULL, &length, NULL, 0) != 0) { @@ -420,7 +420,7 @@ static const char* getFromProcesses(FFDisplayServerResult* result) { } } #elif __NetBSD__ - int request[] = {CTL_KERN, KERN_PROC2, KERN_PROC_UID, (int) userId, sizeof(struct kinfo_proc2), INT_MAX}; + int request[] = { CTL_KERN, KERN_PROC2, KERN_PROC_UID, (int) userId, sizeof(struct kinfo_proc2), INT_MAX }; size_t size = 0; if (sysctl(request, ARRAY_SIZE(request), NULL, &size, NULL, 0) != 0) { diff --git a/src/detection/font/font_haiku.cpp b/src/detection/font/font_haiku.cpp index a7827d932..dc29dd004 100644 --- a/src/detection/font/font_haiku.cpp +++ b/src/detection/font/font_haiku.cpp @@ -11,7 +11,7 @@ const char* ffDetectFontImpl(FFFontResult* result); } static void generateString(FFFontResult* font) { - const char* types[] = {"Plain", "Menu", "Bold", "Mono"}; + const char* types[] = { "Plain", "Menu", "Bold", "Mono" }; for (uint32_t i = 0; i < ARRAY_SIZE(types); ++i) { if (i == 0 || !ffStrbufEqual(&font->fonts[i - 1], &font->fonts[i])) { if (i > 0) { diff --git a/src/detection/font/font_windows.c b/src/detection/font/font_windows.c index e3e890175..4fc28d320 100644 --- a/src/detection/font/font_windows.c +++ b/src/detection/font/font_windows.c @@ -5,7 +5,7 @@ #include static void generateString(FFFontResult* font) { - const char* types[] = {"Caption", "Menu", "Message", "Status"}; + const char* types[] = { "Caption", "Menu", "Message", "Status" }; for (uint32_t i = 0; i < ARRAY_SIZE(types); ++i) { if (i == 0 || !ffStrbufEqual(&font->fonts[i - 1], &font->fonts[i])) { if (i > 0) { @@ -28,10 +28,10 @@ const char* ffDetectFontImpl(FFFontResult* result) { LOGFONTW fonts[4]; FFArgBuffer fontBuffers[4] = { - {.data = &fonts[0], .length = sizeof(fonts[0])}, - {.data = &fonts[1], .length = sizeof(fonts[1])}, - {.data = &fonts[2], .length = sizeof(fonts[2])}, - {.data = &fonts[3], .length = sizeof(fonts[3])}, + { .data = &fonts[0], .length = sizeof(fonts[0]) }, + { .data = &fonts[1], .length = sizeof(fonts[1]) }, + { .data = &fonts[2], .length = sizeof(fonts[2]) }, + { .data = &fonts[3], .length = sizeof(fonts[3]) }, }; if (!ffRegReadValues(hKey, 4, (FFRegValueArg[]) { diff --git a/src/detection/gamepad/gamepad_apple.c b/src/detection/gamepad/gamepad_apple.c index 758722d00..b10b04b7f 100644 --- a/src/detection/gamepad/gamepad_apple.c +++ b/src/detection/gamepad/gamepad_apple.c @@ -33,9 +33,9 @@ const char* ffDetectGamepad(FFlist* devices /* List of FFGamepadDevice */) { return "IOHIDManagerOpen() failed"; } - CFDictionaryRef FF_CFTYPE_AUTO_RELEASE matching1 = CFDictionaryCreate(kCFAllocatorDefault, (const void**) (CFStringRef[]) {CFSTR(kIOHIDDeviceUsagePageKey), CFSTR(kIOHIDDeviceUsageKey)}, (const void**) (CFNumberRef[]) {ffCfCreateInt(kHIDPage_GenericDesktop), ffCfCreateInt(kHIDUsage_GD_Joystick)}, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFDictionaryRef FF_CFTYPE_AUTO_RELEASE matching2 = CFDictionaryCreate(kCFAllocatorDefault, (const void**) (CFStringRef[]) {CFSTR(kIOHIDDeviceUsagePageKey), CFSTR(kIOHIDDeviceUsageKey)}, (const void**) (CFNumberRef[]) {ffCfCreateInt(kHIDPage_GenericDesktop), ffCfCreateInt(kHIDUsage_GD_GamePad)}, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); - CFArrayRef FF_CFTYPE_AUTO_RELEASE matchings = CFArrayCreate(kCFAllocatorDefault, (const void**) (CFTypeRef[]) {matching1, matching2}, 2, &kCFTypeArrayCallBacks); + CFDictionaryRef FF_CFTYPE_AUTO_RELEASE matching1 = CFDictionaryCreate(kCFAllocatorDefault, (const void**) (CFStringRef[]) { CFSTR(kIOHIDDeviceUsagePageKey), CFSTR(kIOHIDDeviceUsageKey) }, (const void**) (CFNumberRef[]) { ffCfCreateInt(kHIDPage_GenericDesktop), ffCfCreateInt(kHIDUsage_GD_Joystick) }, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + CFDictionaryRef FF_CFTYPE_AUTO_RELEASE matching2 = CFDictionaryCreate(kCFAllocatorDefault, (const void**) (CFStringRef[]) { CFSTR(kIOHIDDeviceUsagePageKey), CFSTR(kIOHIDDeviceUsageKey) }, (const void**) (CFNumberRef[]) { ffCfCreateInt(kHIDPage_GenericDesktop), ffCfCreateInt(kHIDUsage_GD_GamePad) }, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + CFArrayRef FF_CFTYPE_AUTO_RELEASE matchings = CFArrayCreate(kCFAllocatorDefault, (const void**) (CFTypeRef[]) { matching1, matching2 }, 2, &kCFTypeArrayCallBacks); IOHIDManagerSetDeviceMatchingMultiple(manager, matchings); CFSetRef FF_CFTYPE_AUTO_RELEASE set = IOHIDManagerCopyDevices(manager); diff --git a/src/detection/gpu/gpu.c b/src/detection/gpu/gpu.c index 2687bd0ea..7cae61570 100644 --- a/src/detection/gpu/gpu.c +++ b/src/detection/gpu/gpu.c @@ -101,7 +101,7 @@ const char* detectByOpenGL(FFlist* gpus) { gpu->coreCount = FF_GPU_CORE_COUNT_UNSET; gpu->frequency = FF_GPU_FREQUENCY_UNSET; gpu->coreUsage = FF_GPU_CORE_USAGE_UNSET; - gpu->dedicated = gpu->shared = (FFGPUMemory) {0, 0}; + gpu->dedicated = gpu->shared = (FFGPUMemory) { 0, 0 }; gpu->deviceId = 0; FF_DEBUG("OpenGL reported renderer='%s', vendor='%s', version='%s'", diff --git a/src/detection/gpu/gpu_amd.c b/src/detection/gpu/gpu_amd.c index 5fcb45fe0..d45e00a21 100644 --- a/src/detection/gpu/gpu_amd.c +++ b/src/detection/gpu/gpu_amd.c @@ -255,7 +255,7 @@ const char* ffDetectAmdGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverResu FF_DEBUG("Using Overdrive8 API (odVersion=%d)", odVersion); if (result.frequency) { - ADLOD8CurrentSetting currentSetting = {.count = OD8_COUNT}; + ADLOD8CurrentSetting currentSetting = { .count = OD8_COUNT }; int status = adlData.ffADL2_Overdrive8_Current_Setting_Get(adlData.apiHandle, device->iAdapterIndex, ¤tSetting); FF_DEBUG("ADL2_Overdrive8_Current_Setting_Get returned %s (%d)", ffAdlStatusToString(status), status); if (status == ADL_OK) { diff --git a/src/detection/gpu/gpu_drm.c b/src/detection/gpu/gpu_drm.c index 7e2fd651d..538d23fe4 100644 --- a/src/detection/gpu/gpu_drm.c +++ b/src/detection/gpu/gpu_drm.c @@ -168,7 +168,7 @@ const char* ffDrmDetectAmdgpu(const FFGPUOptions* options, FFGPUResult* gpu, con const char* ffDrmDetectI915(FFGPUResult* gpu, int fd) { { int value; - drm_i915_getparam_t getparam = {.param = I915_PARAM_EU_TOTAL, .value = &value}; + drm_i915_getparam_t getparam = { .param = I915_PARAM_EU_TOTAL, .value = &value }; if (ioctl(fd, DRM_IOCTL_I915_GETPARAM, &getparam) >= 0) { gpu->coreCount = value; } diff --git a/src/detection/gpu/gpu_intel.c b/src/detection/gpu/gpu_intel.c index 1ea67a596..7d94c802a 100644 --- a/src/detection/gpu/gpu_intel.c +++ b/src/detection/gpu/gpu_intel.c @@ -193,7 +193,7 @@ const char* ffDetectIntelGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverRe uint32_t sensorCount = ARRAY_SIZE(sensors); if (igclData.ffctlEnumTemperatureSensors(device, &sensorCount, sensors) == CTL_RESULT_SUCCESS && sensorCount > 0) { for (uint32_t iSensor = 0; iSensor < sensorCount; iSensor++) { - ctl_temp_properties_t props = {.Size = sizeof(props)}; + ctl_temp_properties_t props = { .Size = sizeof(props) }; // The official sample code does not set Version // https://github.com/intel/drivers.gpu.control-library/blob/1bbacbf3814f2fd0d2b930cdf42fad83f3628db9/Samples/Telemetry_Samples/Sample_TelemetryAPP.cpp#L256 if (igclData.ffctlTemperatureGetProperties(sensors[iSensor], &props) == CTL_RESULT_SUCCESS) { @@ -211,7 +211,7 @@ const char* ffDetectIntelGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverRe uint32_t domainCount = ARRAY_SIZE(domains); if (igclData.ffctlEnumFrequencyDomains(device, &domainCount, domains) == CTL_RESULT_SUCCESS && domainCount > 0) { double maxValue = 0; - ctl_freq_properties_t props = {.Size = sizeof(props), .Version = 0}; + ctl_freq_properties_t props = { .Size = sizeof(props), .Version = 0 }; for (uint32_t iDomain = 0; iDomain < domainCount; iDomain++) { if (igclData.ffctlFrequencyGetProperties(domains[iDomain], &props) == CTL_RESULT_SUCCESS) { if (props.type == CTL_FREQ_DOMAIN_GPU && props.max > maxValue) { diff --git a/src/detection/gpu/gpu_nvidia.c b/src/detection/gpu/gpu_nvidia.c index 28a2913d2..9bb1be902 100644 --- a/src/detection/gpu/gpu_nvidia.c +++ b/src/detection/gpu/gpu_nvidia.c @@ -253,7 +253,7 @@ const char* ffDetectNvidiaGpuInfo(const FFGpuDriverCondition* cond, FFGpuDriverR } if (result.memory) { - nvmlMemory_v2_t memory = {.version = nvmlMemory_v2}; + nvmlMemory_v2_t memory = { .version = nvmlMemory_v2 }; if (nvmlData.ffnvmlDeviceGetMemoryInfo_v2(device, &memory) == NVML_SUCCESS) { result.memory->total = memory.used + memory.free; result.memory->used = memory.used; diff --git a/src/detection/gpu/gpu_windows.c b/src/detection/gpu/gpu_windows.c index 7dcc8b16a..f3faf9871 100644 --- a/src/detection/gpu/gpu_windows.c +++ b/src/detection/gpu/gpu_windows.c @@ -286,7 +286,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist* if (gpu->type == FF_GPU_TYPE_UNKNOWN && adapterLuid > 0) { FF_DEBUG("Trying to determine GPU type using D3DKMT APIs"); - D3DKMT_OPENADAPTERFROMLUID openAdapterFromLuid = {.AdapterLuid = *(LUID*) &adapterLuid}; + D3DKMT_OPENADAPTERFROMLUID openAdapterFromLuid = { .AdapterLuid = *(LUID*) &adapterLuid }; if (NT_SUCCESS(D3DKMTOpenAdapterFromLuid(&openAdapterFromLuid))) { FF_DEBUG("Successfully opened adapter from LUID"); @@ -332,7 +332,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist* D3DKMT_QUERYSTATISTICS queryStatistics = { .Type = D3DKMT_QUERYSTATISTICS_NODE2, // Windows 11 (22H2) and later .AdapterLuid = *(LUID*) &adapterLuid, - .QueryNode2 = {.PhysicalAdapterIndex = 0, .NodeOrdinal = (UINT16) nodeIdx}, + .QueryNode2 = { .PhysicalAdapterIndex = 0, .NodeOrdinal = (UINT16) nodeIdx }, }; if (NT_SUCCESS(D3DKMTQueryStatistics(&queryStatistics))) { gpu->frequency = (uint32_t) (queryStatistics.QueryResult.NodeInformation.NodePerfData.MaxFrequency / 1000 / 1000); @@ -344,7 +344,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist* } } - D3DKMT_CLOSEADAPTER closeAdapter = {.hAdapter = openAdapterFromLuid.hAdapter}; + D3DKMT_CLOSEADAPTER closeAdapter = { .hAdapter = openAdapterFromLuid.hAdapter }; (void) D3DKMTCloseAdapter(&closeAdapter); openAdapterFromLuid.hAdapter = (D3DKMT_HANDLE) {}; FF_DEBUG("Closed adapter handle"); @@ -357,7 +357,7 @@ const char* ffDetectGPUImpl(FF_MAYBE_UNUSED const FFGPUOptions* options, FFlist* D3DKMT_QUERYSTATISTICS queryStatistics = { .Type = D3DKMT_QUERYSTATISTICS_PHYSICAL_ADAPTER, // Windows 10 (1803) and later .AdapterLuid = *(LUID*) &adapterLuid, - .QueryPhysAdapter = {.PhysicalAdapterIndex = 0}, + .QueryPhysAdapter = { .PhysicalAdapterIndex = 0 }, }; if (NT_SUCCESS(D3DKMTQueryStatistics(&queryStatistics)) && queryStatistics.QueryResult.PhysAdapterInformation.AdapterPerfData.Temperature != 0) { diff --git a/src/detection/gpu/gpu_windows.cpp b/src/detection/gpu/gpu_windows.cpp index c22112aa8..a64bad96f 100644 --- a/src/detection/gpu/gpu_windows.cpp +++ b/src/detection/gpu/gpu_windows.cpp @@ -55,7 +55,7 @@ extern "C" const char* ffGPUDetectTypeWithDXCore(LUID adapterLuid, FFGPUResult* return "Failed to get adapter by LUID"; } - on_scope_exit releaseAdapter{[adapter] { adapter->Release(); }}; + on_scope_exit releaseAdapter{ [adapter] { adapter->Release(); } }; bool isIntegrated = false; hr = adapter->GetProperty(DXCoreAdapterProperty::IsIntegrated, sizeof(isIntegrated), &isIntegrated); diff --git a/src/detection/gpu/gpu_wsl.c b/src/detection/gpu/gpu_wsl.c index 654e6b104..56b8c96fe 100644 --- a/src/detection/gpu/gpu_wsl.c +++ b/src/detection/gpu/gpu_wsl.c @@ -91,7 +91,7 @@ const char* ffGPUDetectWsl2(const FFGPUOptions* options, FFlist* gpus) { const char* vendorStr = NULL; - D3DKMT_QUERY_DEVICE_IDS deviceIds = {.PhysicalAdapterIndex = 0}; + D3DKMT_QUERY_DEVICE_IDS deviceIds = { .PhysicalAdapterIndex = 0 }; if (NT_SUCCESS(D3DKMTQueryAdapterInfo(dxg, &(D3DKMT_QUERYADAPTERINFO) { .hAdapter = adapter->hAdapter, .Type = KMTQAITYPE_PHYSICALADAPTERDEVICEIDS, @@ -274,7 +274,7 @@ const char* ffGPUDetectWsl2(const FFGPUOptions* options, FFlist* gpus) { D3DKMT_QUERYSTATISTICS queryStatistics = { .Type = D3DKMT_QUERYSTATISTICS_NODE2, .AdapterLuid = adapter->AdapterLuid, - .QueryNode2 = {.PhysicalAdapterIndex = 0, .NodeOrdinal = (UINT16) nodeIdx}, + .QueryNode2 = { .PhysicalAdapterIndex = 0, .NodeOrdinal = (UINT16) nodeIdx }, }; if (NT_SUCCESS(D3DKMTQueryStatistics(dxg, &queryStatistics))) { gpu->frequency = (uint32_t) (queryStatistics.QueryResult.NodeInformation.NodePerfData.MaxFrequency / 1000 / 1000); @@ -290,7 +290,7 @@ const char* ffGPUDetectWsl2(const FFGPUOptions* options, FFlist* gpus) { D3DKMT_QUERYSTATISTICS queryStatistics = { .Type = D3DKMT_QUERYSTATISTICS_PHYSICAL_ADAPTER, .AdapterLuid = adapter->AdapterLuid, - .QueryPhysAdapter = {.PhysicalAdapterIndex = 0}, + .QueryPhysAdapter = { .PhysicalAdapterIndex = 0 }, }; if (NT_SUCCESS(D3DKMTQueryStatistics(dxg, &queryStatistics)) && queryStatistics.QueryResult.PhysAdapterInformation.AdapterPerfData.Temperature != 0) { @@ -325,7 +325,7 @@ const char* ffGPUDetectWsl2(const FFGPUOptions* options, FFlist* gpus) { (unsigned) gpu->type, (unsigned long) gpu->deviceId); - if (NT_SUCCESS(D3DKMTCloseAdapter(dxg, &(D3DKMT_CLOSEADAPTER) {.hAdapter = adapter->hAdapter}))) { + if (NT_SUCCESS(D3DKMTCloseAdapter(dxg, &(D3DKMT_CLOSEADAPTER) { .hAdapter = adapter->hAdapter }))) { FF_DEBUG("Closed adapter #%u successfully", i); } else { FF_DEBUG("Failed to close adapter #%u: %s", i, strerror(errno)); diff --git a/src/detection/gtk_qt/gtk.c b/src/detection/gtk_qt/gtk.c index bfe602b51..79339b0f7 100644 --- a/src/detection/gtk_qt/gtk.c +++ b/src/detection/gtk_qt/gtk.c @@ -100,7 +100,7 @@ static void detectGTKFromSettings(FFGTKResult* result) { } static void detectGTKFromConfigFile(const char* filename, FFGTKResult* result) { - ffParsePropFileValues(filename, 5, (FFpropquery[]) {{"gtk-theme-name =", &result->theme}, {"gtk-icon-theme-name =", &result->icons}, {"gtk-font-name =", &result->font}, {"gtk-cursor-theme-name =", &result->cursor}, {"gtk-cursor-theme-size =", &result->cursorSize}}); + ffParsePropFileValues(filename, 5, (FFpropquery[]) { { "gtk-theme-name =", &result->theme }, { "gtk-icon-theme-name =", &result->icons }, { "gtk-font-name =", &result->font }, { "gtk-cursor-theme-name =", &result->cursor }, { "gtk-cursor-theme-size =", &result->cursorSize } }); } static void detectGTKFromConfigDir(FFstrbuf* configDir, const char* version, FFGTKResult* result) { diff --git a/src/detection/gtk_qt/qt.c b/src/detection/gtk_qt/qt.c index 260e5a701..67b787d5e 100644 --- a/src/detection/gtk_qt/qt.c +++ b/src/detection/gtk_qt/qt.c @@ -127,7 +127,7 @@ static void detectPlasma(FFQtResult* result) { } static void detectLXQt(FFQtResult* result) { - ffParsePropFileConfigValues("lxqt/lxqt.conf", 3, (FFpropquery[]) {{"style = ", &result->widgetStyle}, {"icon_theme = ", &result->icons}, {"font = ", &result->font}}); + ffParsePropFileConfigValues("lxqt/lxqt.conf", 3, (FFpropquery[]) { { "style = ", &result->widgetStyle }, { "icon_theme = ", &result->icons }, { "font = ", &result->font } }); ffParsePropFileConfig("pcmanfm-qt/lxqt/settings.conf", "Wallpaper=", &result->wallpaper); } @@ -140,7 +140,7 @@ static void detectQtCt(char qver, FFQtResult* result) { FF_STRBUF_AUTO_DESTROY font = ffStrbufCreate(); - ffParsePropFileConfigValues(file, 3, (FFpropquery[]) {{"style=", &result->widgetStyle}, {"icon_theme=", &result->icons}, {"general=", &font}}); + ffParsePropFileConfigValues(file, 3, (FFpropquery[]) { { "style=", &result->widgetStyle }, { "icon_theme=", &result->icons }, { "general=", &font } }); if (ffStrbufStartsWithC(&font, '@')) { // See QVariant notes on https://doc.qt.io/qt-5/qsettings.html and @@ -153,7 +153,7 @@ static void detectQtCt(char qver, FFQtResult* result) { while (*p) { if (p[0] == '\\' && p[1] == 'x' && isxdigit(p[2]) && isxdigit(p[3]) && isxdigit(p[4]) && isxdigit(p[5])) { - uint32_t codepoint = (uint32_t) strtoul((char[]) {p[2], p[3], p[4], p[5], '\0'}, NULL, 16); + uint32_t codepoint = (uint32_t) strtoul((char[]) { p[2], p[3], p[4], p[5], '\0' }, NULL, 16); ffStrbufAppendUtf32CodePoint(&result->font, codepoint); p += 6; } else { @@ -168,7 +168,7 @@ static void detectQtCt(char qver, FFQtResult* result) { static void detectKvantum(FFQtResult* result) { ffParsePropFileConfigValues("Kvantum/kvantum.kvconfig", 1, (FFpropquery[]) { - {"theme=", &result->widgetStyle}, + { "theme=", &result->widgetStyle }, }); } diff --git a/src/detection/keyboard/keyboard_apple.c b/src/detection/keyboard/keyboard_apple.c index a2b9292a0..2a230aed2 100644 --- a/src/detection/keyboard/keyboard_apple.c +++ b/src/detection/keyboard/keyboard_apple.c @@ -23,7 +23,7 @@ const char* ffDetectKeyboard(FFlist* devices /* List of FFKeyboardDevice */) { return "IOHIDManagerOpen() failed"; } - CFDictionaryRef FF_CFTYPE_AUTO_RELEASE matching1 = CFDictionaryCreate(kCFAllocatorDefault, (const void**) (CFStringRef[]) {CFSTR(kIOHIDDeviceUsagePageKey), CFSTR(kIOHIDDeviceUsageKey)}, (const void**) (CFNumberRef[]) {ffCfCreateInt(kHIDPage_GenericDesktop), ffCfCreateInt(kHIDUsage_GD_Keyboard)}, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + CFDictionaryRef FF_CFTYPE_AUTO_RELEASE matching1 = CFDictionaryCreate(kCFAllocatorDefault, (const void**) (CFStringRef[]) { CFSTR(kIOHIDDeviceUsagePageKey), CFSTR(kIOHIDDeviceUsageKey) }, (const void**) (CFNumberRef[]) { ffCfCreateInt(kHIDPage_GenericDesktop), ffCfCreateInt(kHIDUsage_GD_Keyboard) }, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); IOHIDManagerSetDeviceMatching(manager, matching1); CFSetRef FF_CFTYPE_AUTO_RELEASE set = IOHIDManagerCopyDevices(manager); diff --git a/src/detection/lm/lm_linux.c b/src/detection/lm/lm_linux.c index 6701d97e1..d84e5c3ff 100644 --- a/src/detection/lm/lm_linux.c +++ b/src/detection/lm/lm_linux.c @@ -10,9 +10,9 @@ #define FF_SYSTEMD_USERS_PATH "/run/systemd/users/" static const char* getGdmVersion(FFstrbuf* version) { - const char* error = ffProcessAppendStdOut(version, (char* const[]) {"gdm", "--version", NULL}); + const char* error = ffProcessAppendStdOut(version, (char* const[]) { "gdm", "--version", NULL }); if (error || version->length == 0) { - error = ffProcessAppendStdOut(version, (char* const[]) {"gdm3", "--version", NULL}); + error = ffProcessAppendStdOut(version, (char* const[]) { "gdm3", "--version", NULL }); if (error || version->length == 0) { return "Failed to get GDM version"; } @@ -24,7 +24,7 @@ static const char* getGdmVersion(FFstrbuf* version) { } static const char* getSshdVersion(FFstrbuf* version) { - const char* error = ffProcessAppendStdErr(version, (char* const[]) {"sshd", "-V", NULL}); + const char* error = ffProcessAppendStdErr(version, (char* const[]) { "sshd", "-V", NULL }); if (error) { return error; } @@ -87,7 +87,7 @@ static const char* getSddmVersion(FF_MAYBE_UNUSED FFstrbuf* version) { #endif static const char* getXfwmVersion(FFstrbuf* version) { - const char* error = ffProcessAppendStdOut(version, (char* const[]) {"xfwm4", "--version", NULL}); + const char* error = ffProcessAppendStdOut(version, (char* const[]) { "xfwm4", "--version", NULL }); if (error) { return error; } @@ -100,7 +100,7 @@ static const char* getXfwmVersion(FFstrbuf* version) { } static const char* getLightdmVersion(FFstrbuf* version) { - const char* error = ffProcessAppendStdErr(version, (char* const[]) {"lightdm", "--version", NULL}); + const char* error = ffProcessAppendStdErr(version, (char* const[]) { "lightdm", "--version", NULL }); if (error) { return error; } @@ -124,7 +124,7 @@ const char* ffDetectLM(FFLMResult* result) { // This is actually buggy, and assumes current user is using DE // `sd_pid_get_session` can be a better option, but we need to find a pid to use if (!ffParsePropFileValues(path.chars, 1, (FFpropquery[]) { - {"DISPLAY=", &sessionId}, + { "DISPLAY=", &sessionId }, })) { return "Failed to get $XDG_SESSION_ID"; } @@ -135,8 +135,8 @@ const char* ffDetectLM(FFLMResult* result) { // WARNING: This is private data. Do not parse if (!ffParsePropFileValues(path.chars, 2, (FFpropquery[]) { - {"SERVICE=", &result->service}, - {"TYPE=", &result->type}, + { "SERVICE=", &result->service }, + { "TYPE=", &result->type }, })) { return "Failed to parse " FF_SYSTEMD_SESSIONS_PATH "$XDG_SESSION_ID"; } diff --git a/src/detection/loadavg/loadavg_bsd.c b/src/detection/loadavg/loadavg_bsd.c index a3cd4bfdd..9311caccb 100644 --- a/src/detection/loadavg/loadavg_bsd.c +++ b/src/detection/loadavg/loadavg_bsd.c @@ -13,7 +13,7 @@ const char* ffDetectLoadavg(double result[3]) { struct loadavg load; size_t size = sizeof(load); - if (sysctl((int[]) {CTL_VM, VM_LOADAVG}, 2, &load, &size, NULL, 0) < 0) { + if (sysctl((int[]) { CTL_VM, VM_LOADAVG }, 2, &load, &size, NULL, 0) < 0) { return "sysctl({CTL_VM, VM_LOADAVG}) failed"; } for (int i = 0; i < 3; i++) { diff --git a/src/detection/localip/localip_linux.c b/src/detection/localip/localip_linux.c index e172b7060..b4e1aaeb2 100644 --- a/src/detection/localip/localip_linux.c +++ b/src/detection/localip/localip_linux.c @@ -46,7 +46,7 @@ static inline void kstatFreeWrap(kstat_ctl_t** pkc) { } #endif -#define FF_LOCALIP_NIFLAG(name) {IFF_##name, #name} +#define FF_LOCALIP_NIFLAG(name) { IFF_##name, #name } static const FFLocalIpNIFlag niFlagOptions[] = { FF_LOCALIP_NIFLAG(UP), @@ -567,7 +567,7 @@ const char* ffDetectLocalIps(const FFLocalIpOptions* options, FFlist* results) { if (options->showType & FF_LOCALIP_TYPE_SPEED_BIT) { #ifdef __linux__ - struct ethtool_cmd edata = {.cmd = ETHTOOL_GSET}; + struct ethtool_cmd edata = { .cmd = ETHTOOL_GSET }; ifr.ifr_data = (void*) &edata; if (ioctl(sockfd, SIOCETHTOOL, &ifr) == 0) { iface->speed = (edata.speed_hi << 16) | edata.speed; diff --git a/src/detection/localip/localip_windows.c b/src/detection/localip/localip_windows.c index a633c623a..fcc351067 100644 --- a/src/detection/localip/localip_windows.c +++ b/src/detection/localip/localip_windows.c @@ -7,7 +7,7 @@ #include "common/debug.h" #include "localip.h" -#define FF_LOCALIP_NIFLAG(name) {IP_ADAPTER_##name, #name} +#define FF_LOCALIP_NIFLAG(name) { IP_ADAPTER_##name, #name } static const FFLocalIpNIFlag niFlagOptions[] = { FF_LOCALIP_NIFLAG(DDNS_ENABLED), diff --git a/src/detection/media/media_linux.c b/src/detection/media/media_linux.c index 162db1b4f..461a4bc07 100644 --- a/src/detection/media/media_linux.c +++ b/src/detection/media/media_linux.c @@ -80,7 +80,7 @@ static bool parseMprisMetadata(FFDBusData* data, DBusMessageIter* rootIterator, if (i + 2 >= path.length) { break; } - char str[] = {path.chars[i + 1], path.chars[i + 2], 0}; + char str[] = { path.chars[i + 1], path.chars[i + 2], 0 }; char* end = NULL; const char decodedChar = (char) strtoul(str, &end, 16); if (end == &str[2]) { @@ -155,7 +155,7 @@ static bool getBusProperties(FFDBusData* data, const char* busName, FFMediaResul if (fileName[1] == 0 || fileName[2] == 0) { break; } - char str[] = {fileName[1], fileName[2], 0}; + char str[] = { fileName[1], fileName[2], 0 }; ffStrbufAppendC(&result->song, (char) strtoul(str, NULL, 16)); fileName += 2; } diff --git a/src/detection/memory/memory_apple.c b/src/detection/memory/memory_apple.c index 6f6297e4e..62039493e 100644 --- a/src/detection/memory/memory_apple.c +++ b/src/detection/memory/memory_apple.c @@ -14,7 +14,7 @@ const char* ffDetectMemory(FFMemoryResult* ram) { return "Failed to read hw.memsize_usable"; } #else - if (sysctl((int[]) {CTL_HW, HW_MEMSIZE}, 2, &ram->bytesTotal, &length, NULL, 0) != 0) { + if (sysctl((int[]) { CTL_HW, HW_MEMSIZE }, 2, &ram->bytesTotal, &length, NULL, 0) != 0) { return "Failed to read hw.memsize"; } #endif diff --git a/src/detection/memory/memory_bsd.c b/src/detection/memory/memory_bsd.c index fa1b6c043..f76f6b8b4 100644 --- a/src/detection/memory/memory_bsd.c +++ b/src/detection/memory/memory_bsd.c @@ -3,7 +3,7 @@ const char* ffDetectMemory(FFMemoryResult* ram) { size_t length = sizeof(ram->bytesTotal); - if (sysctl((int[]) {CTL_HW, HW_PHYSMEM}, 2, &ram->bytesTotal, &length, NULL, 0)) { + if (sysctl((int[]) { CTL_HW, HW_PHYSMEM }, 2, &ram->bytesTotal, &length, NULL, 0)) { return "Failed to read hw.physmem"; } diff --git a/src/detection/memory/memory_nbsd.c b/src/detection/memory/memory_nbsd.c index affaaca41..ca094755e 100644 --- a/src/detection/memory/memory_nbsd.c +++ b/src/detection/memory/memory_nbsd.c @@ -7,7 +7,7 @@ const char* ffDetectMemory(FFMemoryResult* ram) { struct uvmexp_sysctl buf; size_t length = sizeof(buf); - if (sysctl((int[]) {CTL_VM, VM_UVMEXP2}, 2, &buf, &length, NULL, 0) < 0) { + if (sysctl((int[]) { CTL_VM, VM_UVMEXP2 }, 2, &buf, &length, NULL, 0) < 0) { return "sysctl(CTL_VM, VM_UVMEXP2) failed"; } diff --git a/src/detection/memory/memory_obsd.c b/src/detection/memory/memory_obsd.c index e0964b97b..c6da0877e 100644 --- a/src/detection/memory/memory_obsd.c +++ b/src/detection/memory/memory_obsd.c @@ -7,7 +7,7 @@ const char* ffDetectMemory(FFMemoryResult* ram) { struct uvmexp buf; size_t length = sizeof(buf); - if (sysctl((int[]) {CTL_VM, VM_UVMEXP}, 2, &buf, &length, NULL, 0) < 0) { + if (sysctl((int[]) { CTL_VM, VM_UVMEXP }, 2, &buf, &length, NULL, 0) < 0) { return "sysctl(CTL_VM, VM_UVMEXP) failed"; } diff --git a/src/detection/mouse/mouse_apple.c b/src/detection/mouse/mouse_apple.c index 0dc14a6be..8df2a9255 100644 --- a/src/detection/mouse/mouse_apple.c +++ b/src/detection/mouse/mouse_apple.c @@ -23,7 +23,7 @@ const char* ffDetectMouse(FFlist* devices /* List of FFMouseDevice */) { return "IOHIDManagerOpen() failed"; } - CFDictionaryRef FF_CFTYPE_AUTO_RELEASE matching1 = CFDictionaryCreate(kCFAllocatorDefault, (const void**) (CFStringRef[]) {CFSTR(kIOHIDDeviceUsagePageKey), CFSTR(kIOHIDDeviceUsageKey)}, (const void**) (CFNumberRef[]) {ffCfCreateInt(kHIDPage_GenericDesktop), ffCfCreateInt(kHIDUsage_GD_Mouse)}, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); + CFDictionaryRef FF_CFTYPE_AUTO_RELEASE matching1 = CFDictionaryCreate(kCFAllocatorDefault, (const void**) (CFStringRef[]) { CFSTR(kIOHIDDeviceUsagePageKey), CFSTR(kIOHIDDeviceUsageKey) }, (const void**) (CFNumberRef[]) { ffCfCreateInt(kHIDPage_GenericDesktop), ffCfCreateInt(kHIDUsage_GD_Mouse) }, 2, &kCFTypeDictionaryKeyCallBacks, &kCFTypeDictionaryValueCallBacks); IOHIDManagerSetDeviceMatching(manager, matching1); CFSetRef FF_CFTYPE_AUTO_RELEASE set = IOHIDManagerCopyDevices(manager); diff --git a/src/detection/netio/netio_apple.c b/src/detection/netio/netio_apple.c index c9230f7b6..72e021a79 100644 --- a/src/detection/netio/netio_apple.c +++ b/src/detection/netio/netio_apple.c @@ -8,7 +8,7 @@ #include const char* ffNetIOGetIoCounters(FFlist* result, FFNetIOOptions* options) { - int mib[] = {CTL_NET, PF_LINK, NETLINK_GENERIC, options->defaultRouteOnly ? IFMIB_IFDATA : IFMIB_IFALLDATA, options->defaultRouteOnly ? (int) ffNetifGetDefaultRouteV4()->ifIndex : 0, IFDATA_GENERAL}; + int mib[] = { CTL_NET, PF_LINK, NETLINK_GENERIC, options->defaultRouteOnly ? IFMIB_IFDATA : IFMIB_IFALLDATA, options->defaultRouteOnly ? (int) ffNetifGetDefaultRouteV4()->ifIndex : 0, IFDATA_GENERAL }; size_t bufSize = 0; if (sysctl(mib, ARRAY_SIZE(mib), NULL, &bufSize, 0, 0) < 0) { diff --git a/src/detection/netio/netio_bsd.c b/src/detection/netio/netio_bsd.c index 6e8ac29af..9bfa65053 100644 --- a/src/detection/netio/netio_bsd.c +++ b/src/detection/netio/netio_bsd.c @@ -14,12 +14,12 @@ const char* ffNetIOGetIoCounters(FFlist* result, FFNetIOOptions* options) { uint32_t defaultRouteIfIndex = ffNetifGetDefaultRouteV4()->ifIndex; size_t bufSize = 0; - if (sysctl((int[]) {CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, (options->defaultRouteOnly ? (int) defaultRouteIfIndex : 0)}, 6, NULL, &bufSize, 0, 0) < 0) { + if (sysctl((int[]) { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, (options->defaultRouteOnly ? (int) defaultRouteIfIndex : 0) }, 6, NULL, &bufSize, 0, 0) < 0) { return "sysctl({ CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, ifIndex }, 6, NULL, &bufSize, 0, 0) failed"; } FF_AUTO_FREE struct if_msghdr* buf = (struct if_msghdr*) malloc(bufSize); - if (sysctl((int[]) {CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, (options->defaultRouteOnly ? (int) defaultRouteIfIndex : 0)}, 6, buf, &bufSize, 0, 0) < 0) { + if (sysctl((int[]) { CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, (options->defaultRouteOnly ? (int) defaultRouteIfIndex : 0) }, 6, buf, &bufSize, 0, 0) < 0) { return "sysctl({ CTL_NET, PF_ROUTE, 0, 0, NET_RT_IFLIST, ifIndex }, 6, buf, &bufSize, 0, 0) failed"; } diff --git a/src/detection/netio/netio_windows.c b/src/detection/netio/netio_windows.c index 4f30bc848..3fb422870 100644 --- a/src/detection/netio/netio_windows.c +++ b/src/detection/netio/netio_windows.c @@ -49,7 +49,7 @@ const char* ffNetIOGetIoCounters(FFlist* result, FFNetIOOptions* options) { continue; } - MIB_IF_ROW2 ifRow = {.InterfaceIndex = adapter->IfIndex}; + MIB_IF_ROW2 ifRow = { .InterfaceIndex = adapter->IfIndex }; if (GetIfEntry2(&ifRow) == NO_ERROR) { FFNetIOResult* counters = (FFNetIOResult*) ffListAdd(result); *counters = (FFNetIOResult) { diff --git a/src/detection/opengl/opengl_linux.c b/src/detection/opengl/opengl_linux.c index 308a6f888..6d28115fd 100644 --- a/src/detection/opengl/opengl_linux.c +++ b/src/detection/opengl/opengl_linux.c @@ -98,7 +98,7 @@ static const char* glxHandleVisualInfo(FFOpenGLResult* result, GLXData* data) { } static const char* glxHandleDisplay(FFOpenGLResult* result, GLXData* data) { - data->visualInfo = data->ffglXChooseVisual(data->display, DefaultScreen(data->display), (int[]) {None}); + data->visualInfo = data->ffglXChooseVisual(data->display, DefaultScreen(data->display), (int[]) { None }); if (data->visualInfo == NULL) { return "glXChooseVisual returned NULL"; } diff --git a/src/detection/opengl/opengl_shared.c b/src/detection/opengl/opengl_shared.c index 9113c16b9..e0fa69456 100644 --- a/src/detection/opengl/opengl_shared.c +++ b/src/detection/opengl/opengl_shared.c @@ -73,12 +73,12 @@ static const char* eglHandleContext(FFOpenGLResult* result, EGLData* data) { static const char* eglHandleSurface(FFOpenGLResult* result, EGLData* data, bool gles) { FF_DEBUG("Creating EGL context (preferred API=%s, client version=%d)", gles ? "OpenGL ES" : "OpenGL", gles ? 2 : 1); - data->context = data->ffeglCreateContext(data->display, data->config, EGL_NO_CONTEXT, (EGLint[]) {EGL_CONTEXT_CLIENT_VERSION, gles ? 2 : 1, // Try GLES 2.0+ first - EGL_NONE}); + data->context = data->ffeglCreateContext(data->display, data->config, EGL_NO_CONTEXT, (EGLint[]) { EGL_CONTEXT_CLIENT_VERSION, gles ? 2 : 1, // Try GLES 2.0+ first + EGL_NONE }); if (data->context == EGL_NO_CONTEXT && gles) // Some ANGLE builds support GLES 1.1 only { FF_DEBUG("EGL context creation with GLES 2.x failed, retrying with default attributes (GLES 1.1 fallback)"); - data->context = data->ffeglCreateContext(data->display, data->config, EGL_NO_CONTEXT, (EGLint[]) {EGL_NONE}); + data->context = data->ffeglCreateContext(data->display, data->config, EGL_NO_CONTEXT, (EGLint[]) { EGL_NONE }); } if (data->context == EGL_NO_CONTEXT) { FF_DEBUG("eglCreateContext() returned EGL_NO_CONTEXT"); @@ -115,7 +115,7 @@ static const char* eglHandleDisplay(FFOpenGLResult* result, EGLData* data) { } FF_DEBUG("Creating EGL pbuffer surface (%dx%d)", FF_OPENGL_BUFFER_WIDTH, FF_OPENGL_BUFFER_HEIGHT); - data->surface = data->ffeglCreatePbufferSurface(data->display, data->config, (EGLint[]) {EGL_WIDTH, FF_OPENGL_BUFFER_WIDTH, EGL_HEIGHT, FF_OPENGL_BUFFER_HEIGHT, EGL_NONE}); + data->surface = data->ffeglCreatePbufferSurface(data->display, data->config, (EGLint[]) { EGL_WIDTH, FF_OPENGL_BUFFER_WIDTH, EGL_HEIGHT, FF_OPENGL_BUFFER_HEIGHT, EGL_NONE }); if (data->surface == EGL_NO_SURFACE) { FF_DEBUG("eglCreatePbufferSurface() returned EGL_NO_SURFACE"); diff --git a/src/detection/os/os_linux.c b/src/detection/os/os_linux.c index f9c5869ee..b02e252b4 100644 --- a/src/detection/os/os_linux.c +++ b/src/detection/os/os_linux.c @@ -13,26 +13,26 @@ static bool parseLsbRelease(const char* fileName, FFOSResult* result) { return ffParsePropFileValues(fileName, 4, (FFpropquery[]) { - {"DISTRIB_ID =", &result->id}, - {"DISTRIB_DESCRIPTION =", &result->prettyName}, - {"DISTRIB_RELEASE =", &result->version}, - {"DISTRIB_CODENAME =", &result->codename}, + { "DISTRIB_ID =", &result->id }, + { "DISTRIB_DESCRIPTION =", &result->prettyName }, + { "DISTRIB_RELEASE =", &result->version }, + { "DISTRIB_CODENAME =", &result->codename }, }); } static bool parseOsRelease(const char* fileName, FFOSResult* result) { return ffParsePropFileValues(fileName, 11, (FFpropquery[]) { - {"PRETTY_NAME =", &result->prettyName}, - {"NAME =", &result->name}, - {"ID =", &result->id}, - {"ID_LIKE =", &result->idLike}, - {"VARIANT =", &result->variant}, - {"VARIANT_ID =", &result->variantID}, - {"VERSION =", &result->version}, - {"VERSION_ID =", &result->versionID}, - {"VERSION_CODENAME =", &result->codename}, - {"CODENAME =", &result->codename}, - {"BUILD_ID =", &result->buildID}, + { "PRETTY_NAME =", &result->prettyName }, + { "NAME =", &result->name }, + { "ID =", &result->id }, + { "ID_LIKE =", &result->idLike }, + { "VARIANT =", &result->variant }, + { "VARIANT_ID =", &result->variantID }, + { "VERSION =", &result->version }, + { "VERSION_ID =", &result->versionID }, + { "VERSION_CODENAME =", &result->codename }, + { "CODENAME =", &result->codename }, + { "BUILD_ID =", &result->buildID }, }); } @@ -228,9 +228,9 @@ FF_MAYBE_UNUSED static bool detectDebianDerived(FFOSResult* result) { FF_STRBUF_AUTO_DESTROY sub = ffStrbufCreate(); FF_STRBUF_AUTO_DESTROY rc = ffStrbufCreate(); if (ffParsePropFileValues("/boot/dietpi/.version", 3, (FFpropquery[]) { - {"G_DIETPI_VERSION_CORE=", &core}, - {"G_DIETPI_VERSION_SUB=", &sub}, - {"G_DIETPI_VERSION_RC=", &rc}, + { "G_DIETPI_VERSION_CORE=", &core }, + { "G_DIETPI_VERSION_SUB=", &sub }, + { "G_DIETPI_VERSION_RC=", &rc }, })) { ffStrbufAppendF(&result->prettyName, " %s.%s.%s", core.chars, sub.chars, rc.chars); } diff --git a/src/detection/packages/packages_linux.c b/src/detection/packages/packages_linux.c index 9c13694d6..7f73fa142 100644 --- a/src/detection/packages/packages_linux.c +++ b/src/detection/packages/packages_linux.c @@ -413,8 +413,8 @@ static uint32_t getPacmanPackages(FFstrbuf* baseDir) { ffStrbufAppendS(baseDir, "/etc/pacman.conf"); bool confFound = ffParsePropFileValues(baseDir->chars, 2, (FFpropquery[]) { - {"DBPath =", &dbPath}, - {"RootDir =", &rootDir}, + { "DBPath =", &dbPath }, + { "RootDir =", &rootDir }, }); ffStrbufSubstrBefore(baseDir, baseDirLen); diff --git a/src/detection/packages/packages_nix.c b/src/detection/packages/packages_nix.c index bf6fa9e38..95a27e5a2 100644 --- a/src/detection/packages/packages_nix.c +++ b/src/detection/packages/packages_nix.c @@ -101,7 +101,7 @@ static uint32_t getNixPackagesImpl(char* path) { FF_STRBUF_AUTO_DESTROY cacheHash = ffStrbufCreateA(64); uint32_t count = 0; - ffProcessAppendStdOut(&hash, (char* const[]) {"nix-store", "--query", "--hash", path, NULL}); + ffProcessAppendStdOut(&hash, (char* const[]) { "nix-store", "--query", "--hash", path, NULL }); if (checkNixCache(&cacheDir, &cacheHash, &count) && ffStrbufEqual(&hash, &cacheHash)) { return count; @@ -115,7 +115,7 @@ static uint32_t getNixPackagesImpl(char* path) { FF_STRBUF_AUTO_DESTROY output = ffStrbufCreateA(1024); - ffProcessAppendStdOut(&output, (char* const[]) {"nix-store", "--query", "--requisites", path, NULL}); + ffProcessAppendStdOut(&output, (char* const[]) { "nix-store", "--query", "--requisites", path, NULL }); uint32_t lineLength = 0; for (uint32_t i = 0; i < output.length; i++) { diff --git a/src/detection/physicaldisk/physicaldisk_sunos.c b/src/detection/physicaldisk/physicaldisk_sunos.c index 89a5757d2..32b766213 100644 --- a/src/detection/physicaldisk/physicaldisk_sunos.c +++ b/src/detection/physicaldisk/physicaldisk_sunos.c @@ -71,7 +71,7 @@ const char* ffDetectPhysicalDisk(FFlist* result, FFPhysicalDiskOptions* options) if (rootNode == DI_NODE_NIL) { return "di_init() failed"; } - di_walk_minor(rootNode, DDI_NT_BLOCK, DI_WALK_CLDFIRST, &(struct FFWalkTreeBundle) {options, result}, (void*) walkDevTree); + di_walk_minor(rootNode, DDI_NT_BLOCK, DI_WALK_CLDFIRST, &(struct FFWalkTreeBundle) { options, result }, (void*) walkDevTree); di_fini(rootNode); return NULL; diff --git a/src/detection/processes/processes_bsd.c b/src/detection/processes/processes_bsd.c index e3205b5a6..a68477852 100644 --- a/src/detection/processes/processes_bsd.c +++ b/src/detection/processes/processes_bsd.c @@ -11,7 +11,7 @@ #endif const char* ffDetectProcesses(uint32_t* result) { - int request[] = {CTL_KERN, KERN_PROC, KERN_PROC_PROC}; + int request[] = { CTL_KERN, KERN_PROC, KERN_PROC_PROC }; size_t length; if (sysctl(request, ARRAY_SIZE(request), NULL, &length, NULL, 0) != 0) { diff --git a/src/detection/processes/processes_nbsd.c b/src/detection/processes/processes_nbsd.c index 915827a2b..efd3d6feb 100644 --- a/src/detection/processes/processes_nbsd.c +++ b/src/detection/processes/processes_nbsd.c @@ -3,7 +3,7 @@ #include const char* ffDetectProcesses(uint32_t* result) { - int request[] = {CTL_KERN, KERN_PROC2, KERN_PROC_ALL, -1, sizeof(struct kinfo_proc2), 0}; + int request[] = { CTL_KERN, KERN_PROC2, KERN_PROC_ALL, -1, sizeof(struct kinfo_proc2), 0 }; size_t length = 0; if (sysctl(request, ARRAY_SIZE(request), NULL, &length, NULL, 0) != 0) { diff --git a/src/detection/publicip/publicip.c b/src/detection/publicip/publicip.c index 2225abbf3..4dc56bd66 100644 --- a/src/detection/publicip/publicip.c +++ b/src/detection/publicip/publicip.c @@ -3,7 +3,7 @@ #define FF_UNITIALIZED ((const char*) (uintptr_t) -1) static FFNetworkingState states[2]; -static const char* statuses[2] = {FF_UNITIALIZED, FF_UNITIALIZED}; +static const char* statuses[2] = { FF_UNITIALIZED, FF_UNITIALIZED }; void ffPreparePublicIp(FFPublicIPOptions* options) { FFNetworkingState* state = &states[options->ipv6]; diff --git a/src/detection/sound/sound_apple.c b/src/detection/sound/sound_apple.c index c2be7f2dc..f38067387 100644 --- a/src/detection/sound/sound_apple.c +++ b/src/detection/sound/sound_apple.c @@ -11,13 +11,13 @@ const char* ffDetectSound(FFlist* devices /* List of FFSoundDevice */) { AudioDeviceID mainDeviceId; UInt32 dataSize = sizeof(mainDeviceId); - if (AudioObjectGetPropertyData(kAudioObjectSystemObject, &(AudioObjectPropertyAddress) {kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, &mainDeviceId) != kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(kAudioObjectSystemObject, &(AudioObjectPropertyAddress) { kAudioHardwarePropertyDefaultOutputDevice, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, &mainDeviceId) != kAudioHardwareNoError) { return "AudioObjectGetPropertyData(kAudioHardwarePropertyDefaultOutputDevice) failed"; } AudioObjectID deviceIds[32] = {}; dataSize = sizeof(deviceIds); - if (AudioObjectGetPropertyData(kAudioObjectSystemObject, &(AudioObjectPropertyAddress) {kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, &deviceIds) != kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(kAudioObjectSystemObject, &(AudioObjectPropertyAddress) { kAudioHardwarePropertyDevices, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, &deviceIds) != kAudioHardwareNoError) { return "AudioObjectGetPropertyData(kAudioHardwarePropertyDevices) failed"; } @@ -25,16 +25,16 @@ const char* ffDetectSound(FFlist* devices /* List of FFSoundDevice */) { AudioDeviceID deviceId = deviceIds[index]; // Ignore input devices - if (AudioObjectGetPropertyDataSize(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyStreams, kAudioObjectPropertyScopeInput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize) == kAudioHardwareNoError && dataSize > 0) { + if (AudioObjectGetPropertyDataSize(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyStreams, kAudioObjectPropertyScopeInput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize) == kAudioHardwareNoError && dataSize > 0) { continue; } uint32_t dataSource; dataSize = sizeof(dataSource); - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyDataSource, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, &dataSource) == kAudioHardwareNoError && dataSource == 'hdpn') { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyDataSource, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, &dataSource) == kAudioHardwareNoError && dataSource == 'hdpn') { uint32_t connected; dataSize = sizeof(connected); - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyJackIsConnected, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, &connected) == kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyJackIsConnected, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, &connected) == kAudioHardwareNoError) { if (!connected) { continue; } @@ -51,7 +51,7 @@ const char* ffDetectSound(FFlist* devices /* List of FFSoundDevice */) { FF_CFTYPE_AUTO_RELEASE CFStringRef uid = NULL; dataSize = sizeof(uid); - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyDeviceUID, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, &uid) == kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyDeviceUID, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, &uid) == kAudioHardwareNoError) { ffCfStrGetString(uid, &device->identifier); } else { ffStrbufAppendF(&device->identifier, "ID-%u", (unsigned) deviceId); @@ -59,7 +59,7 @@ const char* ffDetectSound(FFlist* devices /* List of FFSoundDevice */) { FF_CFTYPE_AUTO_RELEASE CFStringRef name = NULL; dataSize = sizeof(name); - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioObjectPropertyName, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, &name) == kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioObjectPropertyName, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, &name) == kAudioHardwareNoError) { ffCfStrGetString(name, &device->name); } else { ffStrbufSet(&device->name, &device->identifier); @@ -67,13 +67,13 @@ const char* ffDetectSound(FFlist* devices /* List of FFSoundDevice */) { uint32_t muted; dataSize = sizeof(muted); - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyMute, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, &muted) != kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyMute, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, &muted) != kAudioHardwareNoError) { muted = false; // Device may not support volume control } uint32_t active; dataSize = sizeof(active); - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyDeviceIsAlive, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, &active) == kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyDeviceIsAlive, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, &active) == kAudioHardwareNoError) { device->active = !!active; } @@ -82,17 +82,17 @@ const char* ffDetectSound(FFlist* devices /* List of FFSoundDevice */) { } else { float volume; dataSize = sizeof(volume); - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyVolumeScalar, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, &volume) == kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyVolumeScalar, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, &volume) == kAudioHardwareNoError) { device->volume = (uint8_t) (volume * 100 + 0.5); } else { // Try detecting volume from channels uint32_t channels[2]; dataSize = sizeof(channels); - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyPreferredChannelsForStereo, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain}, 0, NULL, &dataSize, channels) == kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyPreferredChannelsForStereo, kAudioObjectPropertyScopeOutput, kAudioObjectPropertyElementMain }, 0, NULL, &dataSize, channels) == kAudioHardwareNoError) { dataSize = sizeof(volume); - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyVolumeScalar, kAudioObjectPropertyScopeOutput, channels[0]}, 0, NULL, &dataSize, &volume) == kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyVolumeScalar, kAudioObjectPropertyScopeOutput, channels[0] }, 0, NULL, &dataSize, &volume) == kAudioHardwareNoError) { float temp; - if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) {kAudioDevicePropertyVolumeScalar, kAudioObjectPropertyScopeOutput, channels[1]}, 0, NULL, &dataSize, &temp) == kAudioHardwareNoError) { + if (AudioObjectGetPropertyData(deviceId, &(AudioObjectPropertyAddress) { kAudioDevicePropertyVolumeScalar, kAudioObjectPropertyScopeOutput, channels[1] }, 0, NULL, &dataSize, &temp) == kAudioHardwareNoError) { device->volume = (uint8_t) ((volume + temp) / 2 * 100 + 0.5); } } diff --git a/src/detection/sound/sound_bsd.c b/src/detection/sound/sound_bsd.c index e6716ed4b..68f3b4f44 100644 --- a/src/detection/sound/sound_bsd.c +++ b/src/detection/sound/sound_bsd.c @@ -29,7 +29,7 @@ const char* ffDetectSound(FFlist* devices) { char path[] = "/dev/mixer0"; - struct oss_sysinfo info = {.nummixers = 9}; + struct oss_sysinfo info = { .nummixers = 9 }; for (int idev = 0; idev <= info.nummixers; ++idev) { path[strlen("/dev/mixer")] = (char) ('0' + idev); @@ -58,7 +58,7 @@ const char* ffDetectSound(FFlist* devices) { ioctl(fd, SOUND_MIXER_READ_MUTE, &mutemask); #endif - struct oss_card_info ci = {.card = idev}; + struct oss_card_info ci = { .card = idev }; if (ioctl(fd, SNDCTL_CARDINFO, &ci) < 0) { continue; } diff --git a/src/detection/sound/sound_sunos.c b/src/detection/sound/sound_sunos.c index 2bc0d5326..6ce6c358c 100644 --- a/src/detection/sound/sound_sunos.c +++ b/src/detection/sound/sound_sunos.c @@ -29,7 +29,7 @@ const char* ffDetectSound(FFlist* devices) { FF_STRBUF_AUTO_DESTROY sndstat = ffStrbufCreate(); - struct oss_sysinfo info = {.nummixers = 9}; + struct oss_sysinfo info = { .nummixers = 9 }; // The implementation is very different from *BSD's. They call it OSS4 for (int idev = 0; idev < info.nummixers; ++idev) { @@ -55,12 +55,12 @@ const char* ffDetectSound(FFlist* devices) { int volume = -1; for (int iext = 0; iext < mi.nrext; ++iext) { - struct oss_mixext me = {.dev = mi.dev, .ctrl = iext}; + struct oss_mixext me = { .dev = mi.dev, .ctrl = iext }; if (ioctl(fd, SNDCTL_MIX_EXTINFO, &me) < 0) { continue; } if (me.flags & MIXF_PCMVOL) { - struct oss_mixer_value mv = {.dev = mi.dev, .ctrl = iext, .timestamp = me.timestamp}; + struct oss_mixer_value mv = { .dev = mi.dev, .ctrl = iext, .timestamp = me.timestamp }; if (ioctl(fd, SNDCTL_MIX_READ, &mv) >= 0) { mv.value -= me.minvalue; me.maxvalue -= me.minvalue; diff --git a/src/detection/swap/swap_apple.c b/src/detection/swap/swap_apple.c index a4ebe8b4a..21fa866d2 100644 --- a/src/detection/swap/swap_apple.c +++ b/src/detection/swap/swap_apple.c @@ -6,7 +6,7 @@ const char* ffDetectSwap(FFlist* result) { struct xsw_usage xsw; size_t size = sizeof(xsw); - if (sysctl((int[]) {CTL_VM, VM_SWAPUSAGE}, 2, &xsw, &size, NULL, 0) != 0) { + if (sysctl((int[]) { CTL_VM, VM_SWAPUSAGE }, 2, &xsw, &size, NULL, 0) != 0) { return "Failed to read vm.swapusage"; } diff --git a/src/detection/swap/swap_linux.c b/src/detection/swap/swap_linux.c index 3967d26ce..b0fbe32e5 100644 --- a/src/detection/swap/swap_linux.c +++ b/src/detection/swap/swap_linux.c @@ -58,7 +58,7 @@ static const char* detectByProcSwaps(FFlist* result) { ffStrbufInitA(&swap->name, nameLen); for (size_t i = 0; i < nameLen; ++i) { if (name[i] == '\\') { - char octal[4] = {name[i + 1], name[i + 2], name[i + 3], '\0'}; + char octal[4] = { name[i + 1], name[i + 2], name[i + 3], '\0' }; ffStrbufAppendC(&swap->name, (char) strtol(octal, NULL, 8)); i += 3; } else { diff --git a/src/detection/terminalfont/terminalfont.c b/src/detection/terminalfont/terminalfont.c index bc938387d..ffde5f51d 100644 --- a/src/detection/terminalfont/terminalfont.c +++ b/src/detection/terminalfont/terminalfont.c @@ -18,8 +18,8 @@ static void detectAlacritty(FFTerminalFontResult* terminalFont) { do { FFpropquery fontQueryToml[] = { - {"normal =", &fontNormal}, - {"size =", &fontSize}, + { "normal =", &fontNormal }, + { "size =", &fontSize }, }; // alacritty parses config files in this order @@ -143,7 +143,7 @@ FF_MAYBE_UNUSED static void detectTTY(FFTerminalFontResult* terminalFont) { if (fontName.length == 0) { ffStrbufAppendS(&fontName, "VGA default kernel font "); - ffProcessAppendStdOut(&fontName, (char* const[]) {"showconsolefont", "--info", NULL}); + ffProcessAppendStdOut(&fontName, (char* const[]) { "showconsolefont", "--info", NULL }); ffStrbufTrimRight(&fontName, ' '); } @@ -193,8 +193,8 @@ FF_MAYBE_UNUSED static bool detectKitty(const FFstrbuf* exe, FFTerminalFontResul ffParsePropLines(buf.chars, "font_size: ", &fontSize); } else { FFpropquery fontQuery[] = { - {"font_family ", &fontName}, - {"font_size ", &fontSize}, + { "font_family ", &fontName }, + { "font_size ", &fontSize }, }; ffParsePropFileConfigValues("kitty/kitty.conf", 2, fontQuery); @@ -223,7 +223,7 @@ static bool detectWezterm(const FFstrbuf* exe, FFTerminalFontResult* result) { FF_STRBUF_AUTO_DESTROY fontName = ffStrbufCreate(); - ffStrbufSetS(&result->error, ffProcessAppendStdOut(&fontName, (char* const[]) {cli.chars, "ls-fonts", "--text", "a", NULL})); + ffStrbufSetS(&result->error, ffProcessAppendStdOut(&fontName, (char* const[]) { cli.chars, "ls-fonts", "--text", "a", NULL })); if (result->error.length) { return false; } @@ -247,8 +247,8 @@ static bool detectTabby(FFTerminalFontResult* result) { FF_STRBUF_AUTO_DESTROY fontSize = ffStrbufCreate(); FFpropquery fontQuery[] = { - {"font: ", &fontName}, - {"fontSize: ", &fontSize}, + { "font: ", &fontName }, + { "fontSize: ", &fontSize }, }; if (!ffParsePropFileConfigValues("tabby/config.yaml", 2, fontQuery)) { @@ -269,7 +269,7 @@ static bool detectTabby(FFTerminalFontResult* result) { static bool detectContour(const FFstrbuf* exe, FFTerminalFontResult* result) { FF_STRBUF_AUTO_DESTROY buf = ffStrbufCreate(); - if (ffProcessAppendStdOut(&buf, (char* const[]) {exe->chars, "font-locator", NULL})) { + if (ffProcessAppendStdOut(&buf, (char* const[]) { exe->chars, "font-locator", NULL })) { ffStrbufAppendS(&result->error, "`contour font-locator` failed"); return false; } @@ -297,8 +297,8 @@ static bool detectRio(FFTerminalFontResult* terminalFont) { FF_STRBUF_AUTO_DESTROY fontSize = ffStrbufCreate(); FFpropquery fontQueryToml[] = { - {"family =", &fontName}, - {"size =", &fontSize}, + { "family =", &fontName }, + { "size =", &fontSize }, }; ffParsePropFileConfigValues("rio/config.toml", 2, fontQueryToml); diff --git a/src/detection/terminalfont/terminalfont_linux.c b/src/detection/terminalfont/terminalfont_linux.c index bf45b158b..ebc0f6e91 100644 --- a/src/detection/terminalfont/terminalfont_linux.c +++ b/src/detection/terminalfont/terminalfont_linux.c @@ -137,14 +137,14 @@ static void detectXFCETerminal(FFTerminalFontResult* terminalFont) { FF_STRBUF_AUTO_DESTROY fontName = ffStrbufCreate(); const char* path = "xfce4/xfconf/xfce-perchannel-xml/xfce4-terminal.xml"; - bool configFound = ffParsePropFileConfigValues(path, 2, (FFpropquery[]) {{"error, "Could not find URxvt.font in .Xresources or .Xdefaults"); return; @@ -470,8 +470,8 @@ static void detectHaikuTerminal(FFTerminalFontResult* terminalFont) { FF_STRBUF_AUTO_DESTROY font = ffStrbufCreate(); FF_STRBUF_AUTO_DESTROY size = ffStrbufCreate(); ffParsePropFileConfigValues("Terminal/Default", 2, (FFpropquery[]) { - {"\"Half Font Family\" , ", &font}, - {"\"Half Font Size\" , ", &size}, + { "\"Half Font Family\" , ", &font }, + { "\"Half Font Size\" , ", &size }, }); if (!font.length) { ffStrbufSetStatic(&font, "Noto Sans Mono"); diff --git a/src/detection/terminalfont/terminalfont_windows.c b/src/detection/terminalfont/terminalfont_windows.c index 0bac1e579..5662b5f6b 100644 --- a/src/detection/terminalfont/terminalfont_windows.c +++ b/src/detection/terminalfont/terminalfont_windows.c @@ -137,7 +137,7 @@ static void detectFromWindowsTerminal(const FFstrbuf* terminalExe, FFTerminalFon } if (!error && json.length == 0) { - error = ffProcessAppendStdOut(&json, (char* const[]) {"cmd.exe", "/c", + error = ffProcessAppendStdOut(&json, (char* const[]) { "cmd.exe", "/c", // print the file content directly, so we don't need to handle the difference of Windows and POSIX path "if exist %LOCALAPPDATA%\\Packages\\Microsoft.WindowsTerminal_8wekyb3d8bbwe\\LocalState\\settings.json " "( type %LOCALAPPDATA%\\Packages\\Microsoft.WindowsTerminal_8wekyb3d8bbwe\\LocalState\\settings.json ) " @@ -146,7 +146,7 @@ static void detectFromWindowsTerminal(const FFstrbuf* terminalExe, FFTerminalFon "else if exist \"%LOCALAPPDATA%\\Microsoft\\Windows Terminal\\settings.json\" " "( type %LOCALAPPDATA%\\Microsoft\\Windows Terminal\\settings.json ) " "else ( call )", - NULL}); + NULL }); } if (error) { @@ -176,8 +176,8 @@ static void detectMintty(FFTerminalFontResult* terminalFont) { FF_STRBUF_AUTO_DESTROY fontName = ffStrbufCreate(); FF_STRBUF_AUTO_DESTROY fontSize = ffStrbufCreate(); - if (!ffParsePropFileConfigValues("mintty/config", 2, (FFpropquery[]) {{"Font=", &fontName}, {"FontHeight=", &fontSize}})) { - ffParsePropFileConfigValues(".minttyrc", 2, (FFpropquery[]) {{"Font=", &fontName}, {"FontHeight=", &fontSize}}); + if (!ffParsePropFileConfigValues("mintty/config", 2, (FFpropquery[]) { { "Font=", &fontName }, { "FontHeight=", &fontSize } })) { + ffParsePropFileConfigValues(".minttyrc", 2, (FFpropquery[]) { { "Font=", &fontName }, { "FontHeight=", &fontSize } }); } if (fontName.length == 0) { ffStrbufAppendS(&fontName, "Lucida Console"); @@ -190,7 +190,7 @@ static void detectMintty(FFTerminalFontResult* terminalFont) { } static void detectConhost(FFTerminalFontResult* terminalFont) { - CONSOLE_FONT_INFOEX cfi = {.cbSize = sizeof(cfi)}; + CONSOLE_FONT_INFOEX cfi = { .cbSize = sizeof(cfi) }; if (!GetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi)) { ffStrbufAppendS(&terminalFont->error, "GetCurrentConsoleFontEx() failed"); return; @@ -210,12 +210,12 @@ static void detectConEmu(FFTerminalFontResult* terminalFont) { FF_STRBUF_AUTO_DESTROY fontName = ffStrbufCreate(); FF_STRBUF_AUTO_DESTROY fontSize = ffStrbufCreate(); - const char* paths[] = {"ConEmuDir", "ConEmuBaseDir", "APPDATA"}; + const char* paths[] = { "ConEmuDir", "ConEmuBaseDir", "APPDATA" }; for (uint32_t i = 0; i < ARRAY_SIZE(paths); ++i) { ffStrbufSetS(&path, getenv(paths[i])); if (path.length > 0) { ffStrbufAppendS(&path, "/ConEmu.xml"); - if (ffParsePropFileValues(path.chars, 2, (FFpropquery[]) {{"error)) { + if (ffRegReadValues(key, 2, (FFRegValueArg[]) { FF_ARG(fontName, L"FontName"), FF_ARG(fontSize, L"FontSize") }, &terminalFont->error)) { ffStrbufTrim(&fontName, '"'); ffStrbufAppendS(&fontSize, "px"); } else { diff --git a/src/detection/terminalshell/terminalshell.c b/src/detection/terminalshell/terminalshell.c index dc5715d3a..1f5d2169c 100644 --- a/src/detection/terminalshell/terminalshell.c +++ b/src/detection/terminalshell/terminalshell.c @@ -35,7 +35,7 @@ static bool getFileVersion(const FFstrbuf* exePath, const wchar_t* stringName, F #endif static bool getExeVersionRaw(FFstrbuf* exe, FFstrbuf* version) { - return ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "--version", NULL}) == NULL; + return ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "--version", NULL }) == NULL; } static bool getExeVersionGeneral(FFstrbuf* exe, FFstrbuf* version) { @@ -117,14 +117,14 @@ static bool getShellVersionPwsh(FFstrbuf* exe, FFstrbuf* version) { } static bool getShellVersionKsh(FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdErr(version, (char* const[]) {exe->chars, "--version", NULL}) == NULL && ffStrbufSubstrAfterFirstS(version, " (AT&T Research) ")) { + if (ffProcessAppendStdErr(version, (char* const[]) { exe->chars, "--version", NULL }) == NULL && ffStrbufSubstrAfterFirstS(version, " (AT&T Research) ")) { // version sh (AT&T Research) 93u+ 2012-08-01 ffStrbufSubstrBeforeFirstC(version, ' '); return true; } ffStrbufClear(version); - if (ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "-c", "echo $KSH_VERSION", NULL}) == NULL && ffStrbufSubstrAfterFirstS(version, " KSH ")) { + if (ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "-c", "echo $KSH_VERSION", NULL }) == NULL && ffStrbufSubstrAfterFirstS(version, " KSH ")) { // OKSH: @(#)PD KSH v5.2.14 99/07/13.2 // MKSH: @(#)MIRBSD KSH R59 2025/04/26 +Debian // $OKSH_VERSION doesn't exist on OpenBSD @@ -138,7 +138,7 @@ static bool getShellVersionKsh(FFstrbuf* exe, FFstrbuf* version) { static bool getShellVersionOksh(FFstrbuf* exe, FFstrbuf* version) { // Homebrew version - if (ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "-c", "echo $OKSH_VERSION", NULL}) != NULL) { + if (ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "-c", "echo $OKSH_VERSION", NULL }) != NULL) { return false; } @@ -148,7 +148,7 @@ static bool getShellVersionOksh(FFstrbuf* exe, FFstrbuf* version) { } static bool getShellVersionOils(FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "--version", NULL}) != NULL) { + if (ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "--version", NULL }) != NULL) { return false; } @@ -167,7 +167,7 @@ static bool getShellVersionNushell(FFstrbuf* exe, FFstrbuf* version) { } static bool getShellVersionAsh(FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdErr(version, (char* const[]) {exe->chars, "--help", NULL}) != NULL) { + if (ffProcessAppendStdErr(version, (char* const[]) { exe->chars, "--help", NULL }) != NULL) { return false; } @@ -185,7 +185,7 @@ static bool getShellVersionXonsh(FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* versio } // exe is python here - if (ffProcessAppendStdErr(version, (char* const[]) {"xonsh", "--version", NULL}) != NULL) { + if (ffProcessAppendStdErr(version, (char* const[]) { "xonsh", "--version", NULL }) != NULL) { return false; } @@ -225,7 +225,7 @@ static bool getShellVersionWinPowerShell(FFstrbuf* exe, FFstrbuf* version) { return true; } - return ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "-NoLogo", "-NoProfile", "-Command", "$PSVersionTable.PSVersion.ToString()", NULL}) == NULL; + return ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "-NoLogo", "-NoProfile", "-Command", "$PSVersionTable.PSVersion.ToString()", NULL }) == NULL; } #endif @@ -315,7 +315,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionGnome(FFstrbuf* exe, FFstrbuf* ver } } - if (ffProcessAppendStdOut(version, (char* const[]) {"gnome-terminal", "--version", NULL})) { + if (ffProcessAppendStdOut(version, (char* const[]) { "gnome-terminal", "--version", NULL })) { return false; } @@ -337,7 +337,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionXfce4Terminal(FFstrbuf* exe, FFstr } FF_MAYBE_UNUSED static bool getTerminalVersionKgx(FFstrbuf* version) { - if (ffProcessAppendStdOut(version, (char* const[]) {"kgx", "--version", NULL})) { + if (ffProcessAppendStdOut(version, (char* const[]) { "kgx", "--version", NULL })) { return false; } @@ -411,7 +411,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionCockpit(FFstrbuf* exe, FFstrbuf* v FF_MAYBE_UNUSED static bool getTerminalVersionXterm(FFstrbuf* exe, FFstrbuf* version) { ffStrbufSetS(version, getenv("XTERM_VERSION")); if (!version->length) { - if (ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "-v", NULL})) { + if (ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "-v", NULL })) { return false; } } @@ -423,7 +423,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionXterm(FFstrbuf* exe, FFstrbuf* ver } FF_MAYBE_UNUSED static bool getTerminalVersionBlackbox(FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "--version", NULL})) { + if (ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "--version", NULL })) { return false; } @@ -434,9 +434,9 @@ FF_MAYBE_UNUSED static bool getTerminalVersionBlackbox(FFstrbuf* exe, FFstrbuf* } FF_MAYBE_UNUSED static bool getTerminalVersionUrxvt(FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdErr(version, (char* const[]) {"urxvt", // Don't use exe because of urxvtd + if (ffProcessAppendStdErr(version, (char* const[]) { "urxvt", // Don't use exe because of urxvtd "-invalid", - NULL})) { + NULL })) { return false; } @@ -449,7 +449,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionUrxvt(FF_MAYBE_UNUSED FFstrbuf* ex } FF_MAYBE_UNUSED static bool getTerminalVersionSt(FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdErr(version, (char* const[]) {exe->chars, "-v", NULL})) { + if (ffProcessAppendStdErr(version, (char* const[]) { exe->chars, "-v", NULL })) { return false; } @@ -470,7 +470,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionLxterminal(FFstrbuf* exe, FFstrbuf FF_MAYBE_UNUSED static bool getTerminalVersionWeston(FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version) { // weston-terminal doesn't report a version, use weston version instead - if (ffProcessAppendStdOut(version, (char* const[]) {"weston", "--version", NULL})) { + if (ffProcessAppendStdOut(version, (char* const[]) { "weston", "--version", NULL })) { return false; } @@ -505,7 +505,7 @@ static bool getTerminalVersionScreen(FFstrbuf* exe, FFstrbuf* version) { } static bool getTerminalVersionTmux(FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "-V", NULL}) != NULL) { + if (ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "-V", NULL }) != NULL) { return false; } @@ -533,7 +533,7 @@ static bool getTerminalVersionZed(FFstrbuf* exe, FFstrbuf* version) { #endif ); - if (ffProcessAppendStdOut(version, (char* const[]) {cli.chars, "--version", NULL}) != NULL) { + if (ffProcessAppendStdOut(version, (char* const[]) { cli.chars, "--version", NULL }) != NULL) { return false; } @@ -570,7 +570,7 @@ static bool getTerminalVersionSshd(FFstrbuf* exe, FFstrbuf* version) { return true; } - if (ffProcessAppendStdOut(version, (char* const[]) {exePath.chars, "-V", NULL}) != NULL) { + if (ffProcessAppendStdOut(version, (char* const[]) { exePath.chars, "-V", NULL }) != NULL) { return false; } @@ -659,7 +659,7 @@ static bool getTerminalVersionKitty(FFstrbuf* exe, FFstrbuf* version) { } FF_MAYBE_UNUSED static bool getTerminalVersionPtyxis(FF_MAYBE_UNUSED FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdOut(version, (char* const[]) {"ptyxis", "--version", NULL}) != NULL) { + if (ffProcessAppendStdOut(version, (char* const[]) { "ptyxis", "--version", NULL }) != NULL) { return false; } @@ -676,7 +676,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionTilix(FFstrbuf* exe, FFstrbuf* ver } } - if (ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "--version", NULL}) != NULL) { + if (ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "--version", NULL }) != NULL) { return false; } @@ -694,7 +694,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionTilix(FFstrbuf* exe, FFstrbuf* ver } FF_MAYBE_UNUSED static bool getTerminalVersionSakura(FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdErr(version, (char* const[]) {exe->chars, "--version", NULL}) != NULL) { // sakura version is 3.8.8 + if (ffProcessAppendStdErr(version, (char* const[]) { exe->chars, "--version", NULL }) != NULL) { // sakura version is 3.8.8 return false; } @@ -703,7 +703,7 @@ FF_MAYBE_UNUSED static bool getTerminalVersionSakura(FFstrbuf* exe, FFstrbuf* ve } FF_MAYBE_UNUSED static bool getTerminalVersionTermite(FFstrbuf* exe, FFstrbuf* version) { - if (ffProcessAppendStdOut(version, (char* const[]) {exe->chars, "--version", NULL}) != NULL) { // termite v16.9\nvte 0.78.1 +BIDI +GNUTLS +ICU +SYSTEMD + if (ffProcessAppendStdOut(version, (char* const[]) { exe->chars, "--version", NULL }) != NULL) { // termite v16.9\nvte 0.78.1 +BIDI +GNUTLS +ICU +SYSTEMD return false; } diff --git a/src/detection/terminalsize/terminalsize_windows.c b/src/detection/terminalsize/terminalsize_windows.c index dce3cd8c0..05888e78b 100644 --- a/src/detection/terminalsize/terminalsize_windows.c +++ b/src/detection/terminalsize/terminalsize_windows.c @@ -29,7 +29,7 @@ bool ffDetectTerminalSize(FFTerminalSizeResult* result) { } { - CONSOLE_FONT_INFOEX cfi = {.cbSize = sizeof(cfi)}; + CONSOLE_FONT_INFOEX cfi = { .cbSize = sizeof(cfi) }; if (GetCurrentConsoleFontEx(hOutput, FALSE, &cfi)) // Only works for ConHost { result->width = result->columns * (uint16_t) cfi.dwFontSize.X; diff --git a/src/detection/terminaltheme/terminaltheme.c b/src/detection/terminaltheme/terminaltheme.c index b0bdebc29..5be3c2068 100644 --- a/src/detection/terminaltheme/terminaltheme.c +++ b/src/detection/terminaltheme/terminaltheme.c @@ -32,41 +32,41 @@ static FFTerminalThemeColor fgbgToColor(int num) { // https://github.com/dalance/termbg/blob/13c478a433fa182e65c401d26a1e7792a7f7f453/src/lib.rs#L251 switch (num) { case 0: - return (FFTerminalThemeColor) {0, 0, 0, false}; // black + return (FFTerminalThemeColor) { 0, 0, 0, false }; // black case 1: - return (FFTerminalThemeColor) {205, 0, 0, false}; // red + return (FFTerminalThemeColor) { 205, 0, 0, false }; // red case 2: - return (FFTerminalThemeColor) {0, 205, 0, false}; // green + return (FFTerminalThemeColor) { 0, 205, 0, false }; // green case 3: - return (FFTerminalThemeColor) {205, 205, 0, false}; // yellow + return (FFTerminalThemeColor) { 205, 205, 0, false }; // yellow case 4: - return (FFTerminalThemeColor) {0, 0, 238, false}; // blue + return (FFTerminalThemeColor) { 0, 0, 238, false }; // blue case 5: - return (FFTerminalThemeColor) {205, 0, 205, false}; // magenta + return (FFTerminalThemeColor) { 205, 0, 205, false }; // magenta case 6: - return (FFTerminalThemeColor) {0, 205, 205, false}; // cyan + return (FFTerminalThemeColor) { 0, 205, 205, false }; // cyan case 7: - return (FFTerminalThemeColor) {229, 229, 229, false}; // white + return (FFTerminalThemeColor) { 229, 229, 229, false }; // white case 8: - return (FFTerminalThemeColor) {127, 127, 127, false}; // bright black + return (FFTerminalThemeColor) { 127, 127, 127, false }; // bright black case 9: - return (FFTerminalThemeColor) {255, 0, 0, false}; // bright red + return (FFTerminalThemeColor) { 255, 0, 0, false }; // bright red case 10: - return (FFTerminalThemeColor) {0, 255, 0, false}; // bright green + return (FFTerminalThemeColor) { 0, 255, 0, false }; // bright green case 11: - return (FFTerminalThemeColor) {255, 255, 0, false}; // bright yellow + return (FFTerminalThemeColor) { 255, 255, 0, false }; // bright yellow case 12: - return (FFTerminalThemeColor) {92, 92, 255, false}; // bright blue + return (FFTerminalThemeColor) { 92, 92, 255, false }; // bright blue case 13: - return (FFTerminalThemeColor) {255, 0, 255, false}; // bright magenta + return (FFTerminalThemeColor) { 255, 0, 255, false }; // bright magenta case 14: - return (FFTerminalThemeColor) {0, 255, 255, false}; // bright cyan + return (FFTerminalThemeColor) { 0, 255, 255, false }; // bright cyan case 15: - return (FFTerminalThemeColor) {255, 255, 255, false}; // bright white + return (FFTerminalThemeColor) { 255, 255, 255, false }; // bright white default: - return (FFTerminalThemeColor) {0, 0, 0, false}; // invalid + return (FFTerminalThemeColor) { 0, 0, 0, false }; // invalid } } diff --git a/src/detection/uptime/uptime_bsd.c b/src/detection/uptime/uptime_bsd.c index f831f9e46..46943b029 100644 --- a/src/detection/uptime/uptime_bsd.c +++ b/src/detection/uptime/uptime_bsd.c @@ -12,7 +12,7 @@ const char* ffDetectUptime(FFUptimeResult* result) { #endif size_t bootTimeSize = sizeof(bootTime); if (sysctl( - (int[]) {CTL_KERN, KERN_BOOTTIME}, 2, &bootTime, &bootTimeSize, NULL, 0) != 0) { + (int[]) { CTL_KERN, KERN_BOOTTIME }, 2, &bootTime, &bootTimeSize, NULL, 0) != 0) { return "sysctl({CTL_KERN, KERN_BOOTTIME}) failed"; } diff --git a/src/detection/users/users_linux.c b/src/detection/users/users_linux.c index 9c821282d..4436cada3 100644 --- a/src/detection/users/users_linux.c +++ b/src/detection/users/users_linux.c @@ -28,10 +28,10 @@ bool detectUserBySystemd(const FFstrbuf* pathUsers, FFlist* users) { // WARNING: This is private data. Do not parse if (!ffParsePropFileValues(pathUsers->chars, 4, (FFpropquery[]) { - {"NAME=", &userName}, - {"STATE=", &state}, - {"REALTIME=", &loginTime}, - {"ONLINE_SESSIONS=", &sessions}, + { "NAME=", &userName }, + { "STATE=", &state }, + { "REALTIME=", &loginTime }, + { "ONLINE_SESSIONS=", &sessions }, }) || !ffStrbufEqualS(&state, "active")) { return false; @@ -65,10 +65,10 @@ bool detectUserBySystemd(const FFstrbuf* pathUsers, FFlist* users) { // WARNING: This is private data. Do not parse if (ffParsePropFileValues(pathSessions.chars, 4, (FFpropquery[]) { - {"REMOTE_HOST=", &remoteHost}, - {"TTY=", &tty}, - {"SERVICE=", &service}, - {"REALTIME=", &loginTime}, + { "REMOTE_HOST=", &remoteHost }, + { "TTY=", &tty }, + { "SERVICE=", &service }, + { "REALTIME=", &loginTime }, }) && !ffStrbufEqualS(&service, "systemd-user")) { if (remoteHost.length) { diff --git a/src/detection/vulkan/vulkan.c b/src/detection/vulkan/vulkan.c index b8bb066bf..8116bc6c9 100644 --- a/src/detection/vulkan/vulkan.c +++ b/src/detection/vulkan/vulkan.c @@ -99,14 +99,12 @@ static const char* detectVulkan(FFVulkanResult* result) { .engineVersion = projectVersion, // We need to request 1.1 to get physicalDeviceDriverProperties - .apiVersion = instanceVersion.minor >= 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0 - }, + .apiVersion = instanceVersion.minor >= 1 ? VK_API_VERSION_1_1 : VK_API_VERSION_1_0 }, .enabledLayerCount = 0, .ppEnabledLayerNames = NULL, .enabledExtensionCount = 0, .ppEnabledExtensionNames = NULL, - .flags = 0 - }, + .flags = 0 }, NULL, &vkInstance); if (res != VK_SUCCESS) { diff --git a/src/detection/wifi/wifi_android.c b/src/detection/wifi/wifi_android.c index 472324cc6..37c68a63d 100644 --- a/src/detection/wifi/wifi_android.c +++ b/src/detection/wifi/wifi_android.c @@ -16,7 +16,7 @@ static inline void wrapYyjsonFree(yyjson_doc** doc) { const char* ffDetectWifi(FFlist* result) { FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate(); - if (ffProcessAppendStdOut(&buffer, (char* const[]) {FF_TERMUX_API_PATH, FF_TERMUX_API_PARAM, NULL})) { + if (ffProcessAppendStdOut(&buffer, (char* const[]) { FF_TERMUX_API_PATH, FF_TERMUX_API_PARAM, NULL })) { return "Starting `" FF_TERMUX_API_PATH " " FF_TERMUX_API_PARAM "` failed"; } diff --git a/src/detection/wifi/wifi_linux.c b/src/detection/wifi/wifi_linux.c index 7cf249581..5757589ad 100644 --- a/src/detection/wifi/wifi_linux.c +++ b/src/detection/wifi/wifi_linux.c @@ -231,7 +231,7 @@ static const char* detectWifiWithIw(FFWifiResult* item, FFstrbuf* buffer) { const char* error = NULL; FF_STRBUF_AUTO_DESTROY output = ffStrbufCreate(); FF_DEBUG("Executing 'iw dev %s link'", item->inf.description.chars); - if ((error = ffProcessAppendStdOut(&output, (char* const[]) {"iw", "dev", item->inf.description.chars, "link", NULL}))) { + if ((error = ffProcessAppendStdOut(&output, (char* const[]) { "iw", "dev", item->inf.description.chars, "link", NULL }))) { FF_DEBUG("iw command execution failed: %s", error); return error; } diff --git a/src/detection/wm/wm_linux.c b/src/detection/wm/wm_linux.c index 38116a786..646da5cdd 100644 --- a/src/detection/wm/wm_linux.c +++ b/src/detection/wm/wm_linux.c @@ -75,7 +75,7 @@ static const char* getHyprland(FFstrbuf* result) { } FF_DEBUG("Failed to extract version from binary strings, trying --version option"); - if (ffProcessAppendStdOut(result, (char* const[]) {buffer.chars, "--version", NULL}) == NULL) { + if (ffProcessAppendStdOut(result, (char* const[]) { buffer.chars, "--version", NULL }) == NULL) { // Hyprland 0.48.1 built from branch at commit 29e2e59... // Date: ... // Tag: v0.48.1, commits: 5937 @@ -121,7 +121,7 @@ static const char* getSway(FFstrbuf* result) { return NULL; } - if (ffProcessAppendStdOut(result, (char* const[]) {path.chars, "--version", NULL}) == NULL) { // sway version 1.10 + if (ffProcessAppendStdOut(result, (char* const[]) { path.chars, "--version", NULL }) == NULL) { // sway version 1.10 ffStrbufSubstrAfterLastC(result, ' '); ffStrbufTrimRightSpace(result); return NULL; @@ -142,7 +142,7 @@ static const char* getLabwc(FFstrbuf* result) { return NULL; } - if (ffProcessAppendStdOut(result, (char* const[]) {path.chars, "--version", NULL}) == NULL) { // labwc 0.9.0 (+xwayland +nls +rsvg +libsfdo) + if (ffProcessAppendStdOut(result, (char* const[]) { path.chars, "--version", NULL }) == NULL) { // labwc 0.9.0 (+xwayland +nls +rsvg +libsfdo) ffStrbufSubstrAfterFirstC(result, ' '); ffStrbufSubstrBeforeFirstC(result, ' '); return NULL; @@ -152,7 +152,7 @@ static const char* getLabwc(FFstrbuf* result) { } static const char* getNiri(FFstrbuf* result) { - if (ffProcessAppendStdOut(result, (char* const[]) {"niri", "--version", NULL}) == NULL) { // niri 25.11 (commit b35bcae) + if (ffProcessAppendStdOut(result, (char* const[]) { "niri", "--version", NULL }) == NULL) { // niri 25.11 (commit b35bcae) ffStrbufSubstrAfterFirstC(result, ' '); ffStrbufSubstrBeforeLastC(result, '('); ffStrbufTrimRightSpace(result); @@ -205,7 +205,7 @@ static const char* getI3(FFstrbuf* result) { return NULL; } - if (ffProcessAppendStdOut(result, (char* const[]) {path.chars, "--version", NULL}) == NULL) { // i3 version 1.10 C 2009... + if (ffProcessAppendStdOut(result, (char* const[]) { path.chars, "--version", NULL }) == NULL) { // i3 version 1.10 C 2009... ffStrbufSubstrAfterFirstS(result, "version "); ffStrbufSubstrBeforeFirstC(result, ' '); return NULL; @@ -226,7 +226,7 @@ static const char* getCtwm(FFstrbuf* result) { return NULL; } - if (ffProcessAppendStdOut(result, (char* const[]) {path.chars, "--version", NULL}) == NULL) { // ctwm version 4.0.1\n... + if (ffProcessAppendStdOut(result, (char* const[]) { path.chars, "--version", NULL }) == NULL) { // ctwm version 4.0.1\n... ffStrbufSubstrBeforeFirstC(result, '\n'); ffStrbufSubstrAfterLastC(result, ' '); return NULL; @@ -247,7 +247,7 @@ static const char* getFvwm(FFstrbuf* result) { return NULL; } - if (ffProcessAppendStdOut(result, (char* const[]) {path.chars, "-version", NULL}) == NULL) { // [FVWM][main]: fvwm Version 2.2.5\n... + if (ffProcessAppendStdOut(result, (char* const[]) { path.chars, "-version", NULL }) == NULL) { // [FVWM][main]: fvwm Version 2.2.5\n... ffStrbufSubstrBeforeFirstC(result, '\n'); ffStrbufSubstrAfterLastC(result, ' '); return NULL; @@ -268,7 +268,7 @@ static const char* getOpenbox(FFstrbuf* result) { return NULL; } - if (ffProcessAppendStdOut(result, (char* const[]) {path.chars, "--version", NULL}) == NULL) { // Openbox 3.6.1\n... + if (ffProcessAppendStdOut(result, (char* const[]) { path.chars, "--version", NULL }) == NULL) { // Openbox 3.6.1\n... ffStrbufSubstrBeforeFirstC(result, '\n'); ffStrbufSubstrAfterLastC(result, ' '); return NULL; diff --git a/src/detection/wm/wm_windows.c b/src/detection/wm/wm_windows.c index 8435745bf..5bf64440e 100644 --- a/src/detection/wm/wm_windows.c +++ b/src/detection/wm/wm_windows.c @@ -54,7 +54,7 @@ static bool isProcessTrusted(DWORD processId, FFProcessType processType, UNICODE if (!NT_SUCCESS(NtOpenProcess(&hProcess, PROCESS_QUERY_LIMITED_INFORMATION, &(OBJECT_ATTRIBUTES) { .Length = sizeof(OBJECT_ATTRIBUTES), }, - &(CLIENT_ID) {.UniqueProcess = (HANDLE) (uintptr_t) processId}))) { + &(CLIENT_ID) { .UniqueProcess = (HANDLE) (uintptr_t) processId }))) { return false; } diff --git a/src/fastfetch.c b/src/fastfetch.c index 2e9148bc3..f78a19a13 100644 --- a/src/fastfetch.c +++ b/src/fastfetch.c @@ -637,8 +637,8 @@ static void parseCommand(FFdata* data, char* key, char* value) { } } else if (ffStrEqualsIgnCase(key, "--format")) { if (!!ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"default", false}, - {"json", true}, + { "default", false }, + { "json", true }, {}, })) { enableJsonOutput(data); diff --git a/src/logo/builtin.c b/src/logo/builtin.c index 23c612dd4..e16bb2b6d 100644 --- a/src/logo/builtin.c +++ b/src/logo/builtin.c @@ -3,7 +3,7 @@ #include "common/color.h" const FFlogo ffLogoUnknown = { - .names = {"unknown"}, + .names = { "unknown" }, .lines = FASTFETCH_DATATEXT_LOGO_UNKNOWN, .colors = { FF_COLOR_FG_DEFAULT, @@ -13,7 +13,7 @@ const FFlogo ffLogoUnknown = { static const FFlogo A[] = { // Adélie { - .names = {"Adélie", "Adelie"}, + .names = { "Adélie", "Adelie" }, .lines = FASTFETCH_DATATEXT_LOGO_ADELIE, .colors = { FF_COLOR_FG_BLUE, @@ -23,7 +23,7 @@ static const FFlogo A[] = { }, // AerOS { - .names = {"aerOS"}, + .names = { "aerOS" }, .lines = FASTFETCH_DATATEXT_LOGO_AEROS, .colors = { FF_COLOR_FG_CYAN, @@ -32,7 +32,7 @@ static const FFlogo A[] = { }, // Aeon { - .names = {"Aeon"}, + .names = { "Aeon" }, .lines = FASTFETCH_DATATEXT_LOGO_AEON, .colors = { FF_COLOR_FG_256 "36", @@ -41,7 +41,7 @@ static const FFlogo A[] = { }, // AerynOS { - .names = {"AerynOS"}, + .names = { "AerynOS" }, .lines = FASTFETCH_DATATEXT_LOGO_AERYNOS, .colors = { FF_COLOR_FG_DEFAULT, @@ -50,7 +50,7 @@ static const FFlogo A[] = { }, // Afterglow { - .names = {"Afterglow"}, + .names = { "Afterglow" }, .lines = FASTFETCH_DATATEXT_LOGO_AFTERGLOW, .colors = { FF_COLOR_FG_MAGENTA, @@ -61,7 +61,7 @@ static const FFlogo A[] = { }, // AIX { - .names = {"aix"}, + .names = { "aix" }, .lines = FASTFETCH_DATATEXT_LOGO_AIX, .colors = { FF_COLOR_FG_GREEN, @@ -72,7 +72,7 @@ static const FFlogo A[] = { }, // AlmaLinux { - .names = {"Almalinux"}, + .names = { "Almalinux" }, .lines = FASTFETCH_DATATEXT_LOGO_ALMALINUX, .colors = { FF_COLOR_FG_RED, @@ -86,7 +86,7 @@ static const FFlogo A[] = { }, // Alpine { - .names = {"Alpine"}, + .names = { "Alpine" }, .lines = FASTFETCH_DATATEXT_LOGO_ALPINE, .colors = { FF_COLOR_FG_BLUE, @@ -96,7 +96,7 @@ static const FFlogo A[] = { }, // Alpine2 { - .names = {"Alpine2"}, + .names = { "Alpine2" }, .lines = FASTFETCH_DATATEXT_LOGO_ALPINE2, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { @@ -108,7 +108,7 @@ static const FFlogo A[] = { }, // AlpineSmall { - .names = {"Alpine_small"}, + .names = { "Alpine_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ALPINE_SMALL, .colors = { @@ -120,7 +120,7 @@ static const FFlogo A[] = { }, // Alpine2Small { - .names = {"alpine2_small"}, + .names = { "alpine2_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ALPINE2_SMALL, .colors = { @@ -132,7 +132,7 @@ static const FFlogo A[] = { }, // Alpine3Small { - .names = {"alpine3_small"}, + .names = { "alpine3_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ALPINE3_SMALL, .colors = { @@ -143,7 +143,7 @@ static const FFlogo A[] = { }, // Alter { - .names = {"Alter"}, + .names = { "Alter" }, .lines = FASTFETCH_DATATEXT_LOGO_ALTER, .colors = { FF_COLOR_FG_CYAN, @@ -153,7 +153,7 @@ static const FFlogo A[] = { }, // ALTLinux { - .names = {"ALTLinux"}, + .names = { "ALTLinux" }, .lines = FASTFETCH_DATATEXT_LOGO_ALTLINUX, .colors = { FF_COLOR_FG_YELLOW, @@ -164,28 +164,28 @@ static const FFlogo A[] = { .colorTitle = FF_COLOR_FG_YELLOW, }, // Amazon - {.names = {"Amazon"}, .lines = FASTFETCH_DATATEXT_LOGO_AMAZON, .colors = { - FF_COLOR_FG_YELLOW, - FF_COLOR_FG_WHITE, - }}, + { .names = { "Amazon" }, .lines = FASTFETCH_DATATEXT_LOGO_AMAZON, .colors = { + FF_COLOR_FG_YELLOW, + FF_COLOR_FG_WHITE, + } }, // AmazonLinux - {.names = {"Amazon Linux", "amzn"}, .lines = FASTFETCH_DATATEXT_LOGO_AMAZON_LINUX, .colors = { - FF_COLOR_FG_WHITE, - FF_COLOR_FG_256 "178", - }}, + { .names = { "Amazon Linux", "amzn" }, .lines = FASTFETCH_DATATEXT_LOGO_AMAZON_LINUX, .colors = { + FF_COLOR_FG_WHITE, + FF_COLOR_FG_256 "178", + } }, // Amiga - {.names = {"Amiga"}, .lines = FASTFETCH_DATATEXT_LOGO_AMIGA, .colors = { - FF_COLOR_FG_RED, - FF_COLOR_FG_LIGHT_RED, - FF_COLOR_FG_YELLOW, - FF_COLOR_FG_BLUE, - FF_COLOR_FG_CYAN, - FF_COLOR_FG_LIGHT_YELLOW, - FF_COLOR_FG_GREEN, - }}, + { .names = { "Amiga" }, .lines = FASTFETCH_DATATEXT_LOGO_AMIGA, .colors = { + FF_COLOR_FG_RED, + FF_COLOR_FG_LIGHT_RED, + FF_COLOR_FG_YELLOW, + FF_COLOR_FG_BLUE, + FF_COLOR_FG_CYAN, + FF_COLOR_FG_LIGHT_YELLOW, + FF_COLOR_FG_GREEN, + } }, // AmogOS { - .names = {"AmogOS"}, + .names = { "AmogOS" }, .lines = FASTFETCH_DATATEXT_LOGO_AMOGOS, .colors = { FF_COLOR_FG_WHITE, @@ -196,7 +196,7 @@ static const FFlogo A[] = { }, // Anarchy { - .names = {"Anarchy"}, + .names = { "Anarchy" }, .lines = FASTFETCH_DATATEXT_LOGO_ANARCHY, .colors = { FF_COLOR_FG_WHITE, @@ -207,7 +207,7 @@ static const FFlogo A[] = { }, // Android { - .names = {"android"}, + .names = { "android" }, .lines = FASTFETCH_DATATEXT_LOGO_ANDROID, .colors = { FF_COLOR_FG_GREEN, @@ -218,7 +218,7 @@ static const FFlogo A[] = { }, // AndroidSmall { - .names = {"android_small"}, + .names = { "android_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ANDROID_SMALL, .colors = { @@ -229,7 +229,7 @@ static const FFlogo A[] = { }, // AnduinOS { - .names = {"anduinos"}, + .names = { "anduinos" }, .lines = FASTFETCH_DATATEXT_LOGO_ANDUINOS, .colors = { FF_COLOR_FG_CYAN, @@ -240,7 +240,7 @@ static const FFlogo A[] = { }, // Antergos { - .names = {"Antergos"}, + .names = { "Antergos" }, .lines = FASTFETCH_DATATEXT_LOGO_ANTERGOS, .colors = { FF_COLOR_FG_BLUE, @@ -251,7 +251,7 @@ static const FFlogo A[] = { }, // Antix { - .names = {"antiX"}, + .names = { "antiX" }, .lines = FASTFETCH_DATATEXT_LOGO_ANTIX, .colors = { FF_COLOR_FG_RED, @@ -261,7 +261,7 @@ static const FFlogo A[] = { }, // AnushOS { - .names = {"AnushOS"}, + .names = { "AnushOS" }, .lines = FASTFETCH_DATATEXT_LOGO_ANUSHOS, .colors = { FF_COLOR_FG_WHITE, @@ -275,7 +275,7 @@ static const FFlogo A[] = { }, // AoscOsRetro { - .names = {"Aosc OS/Retro", "aoscosretro"}, + .names = { "Aosc OS/Retro", "aoscosretro" }, .lines = FASTFETCH_DATATEXT_LOGO_AOSCOSRETRO, .colors = { FF_COLOR_FG_BLUE, @@ -286,7 +286,7 @@ static const FFlogo A[] = { }, // AoscOsRetro_small { - .names = {"Aosc OS/Retro_small", "aoscosretro_small"}, + .names = { "Aosc OS/Retro_small", "aoscosretro_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_AOSCOSRETRO_SMALL, .colors = { @@ -298,7 +298,7 @@ static const FFlogo A[] = { }, // AoscOS { - .names = {"Aosc OS", "aoscos"}, + .names = { "Aosc OS", "aoscos" }, .lines = FASTFETCH_DATATEXT_LOGO_AOSCOS, .colors = { FF_COLOR_FG_BLUE, @@ -309,7 +309,7 @@ static const FFlogo A[] = { }, // AoscOS_old { - .names = {"Aosc OS_old", "aoscos_old"}, + .names = { "Aosc OS_old", "aoscos_old" }, .lines = FASTFETCH_DATATEXT_LOGO_AOSCOS_OLD, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { @@ -320,7 +320,7 @@ static const FFlogo A[] = { }, // Aperture { - .names = {"Aperture"}, + .names = { "Aperture" }, .lines = FASTFETCH_DATATEXT_LOGO_APERTURE, .colors = { FF_COLOR_FG_CYAN, @@ -337,7 +337,7 @@ static const FFlogo A[] = { }, // Apple { - .names = {"Apple"}, + .names = { "Apple" }, .lines = FASTFETCH_DATATEXT_LOGO_MACOS, .colors = { FF_COLOR_FG_GREEN, @@ -352,7 +352,7 @@ static const FFlogo A[] = { }, // AppleSmall { - .names = {"Apple_small"}, + .names = { "Apple_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MACOS_SMALL, .colors = { @@ -367,7 +367,7 @@ static const FFlogo A[] = { }, // Apricity { - .names = {"Apricity"}, + .names = { "Apricity" }, .lines = FASTFETCH_DATATEXT_LOGO_APRICITY, .colors = { FF_COLOR_FG_DEFAULT, @@ -377,7 +377,7 @@ static const FFlogo A[] = { }, // ArchBox { - .names = {"ArchBox"}, + .names = { "ArchBox" }, .lines = FASTFETCH_DATATEXT_LOGO_ARCHBOX, .colors = { FF_COLOR_FG_GREEN, @@ -387,7 +387,7 @@ static const FFlogo A[] = { }, // Archcraft { - .names = {"Archcraft"}, + .names = { "Archcraft" }, .lines = FASTFETCH_DATATEXT_LOGO_ARCHCRAFT, .colors = { FF_COLOR_FG_CYAN, @@ -397,7 +397,7 @@ static const FFlogo A[] = { }, // Archcraft2 { - .names = {"Archcraft2"}, + .names = { "Archcraft2" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ARCHCRAFT2, .colors = { @@ -408,7 +408,7 @@ static const FFlogo A[] = { }, // Arch { - .names = {"arch", "archmerge"}, + .names = { "arch", "archmerge" }, .lines = FASTFETCH_DATATEXT_LOGO_ARCH, .colors = { FF_COLOR_FG_CYAN, @@ -417,7 +417,7 @@ static const FFlogo A[] = { }, // Arch2 { - .names = {"arch2"}, + .names = { "arch2" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ARCH2, .colors = { @@ -427,7 +427,7 @@ static const FFlogo A[] = { }, // Arch3 { - .names = {"arch3"}, + .names = { "arch3" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ARCH3, .colors = { @@ -437,7 +437,7 @@ static const FFlogo A[] = { }, // ArchSmall { - .names = {"arch_small"}, + .names = { "arch_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ARCH_SMALL, .colors = { @@ -447,7 +447,7 @@ static const FFlogo A[] = { }, // ArchOld { - .names = {"arch_old"}, + .names = { "arch_old" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ARCH_OLD, .colors = { @@ -459,7 +459,7 @@ static const FFlogo A[] = { }, // Archlabs { - .names = {"ARCHlabs"}, + .names = { "ARCHlabs" }, .lines = FASTFETCH_DATATEXT_LOGO_ARCHLABS, .colors = { FF_COLOR_FG_CYAN, @@ -470,7 +470,7 @@ static const FFlogo A[] = { }, // ArchStrike { - .names = {"ArchStrike"}, + .names = { "ArchStrike" }, .lines = FASTFETCH_DATATEXT_LOGO_ARCHSTRIKE, .colors = { FF_COLOR_FG_CYAN, @@ -481,7 +481,7 @@ static const FFlogo A[] = { }, // Arkane { - .names = {"Arkane", "Arkane Linux"}, + .names = { "Arkane", "Arkane Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_ARKANE, .colors = { FF_COLOR_FG_256 "237", @@ -493,7 +493,7 @@ static const FFlogo A[] = { }, // Armbian { - .names = {"Armbian"}, + .names = { "Armbian" }, .lines = FASTFETCH_DATATEXT_LOGO_ARMBIAN, .colors = { FF_COLOR_FG_WHITE, @@ -504,7 +504,7 @@ static const FFlogo A[] = { }, // Armbian2 { - .names = {"Armbian2"}, + .names = { "Armbian2" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ARMBIAN2, .colors = { @@ -515,7 +515,7 @@ static const FFlogo A[] = { }, // Artix { - .names = {"artix"}, + .names = { "artix" }, .lines = FASTFETCH_DATATEXT_LOGO_ARTIX, .colors = { FF_COLOR_FG_CYAN, @@ -525,7 +525,7 @@ static const FFlogo A[] = { }, // ArtixSmall { - .names = {"artix_small"}, + .names = { "artix_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ARTIX_SMALL, .colors = { @@ -536,7 +536,7 @@ static const FFlogo A[] = { }, // Artix2Small { - .names = {"artix2_small"}, + .names = { "artix2_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ARTIX2_SMALL, .colors = { @@ -547,7 +547,7 @@ static const FFlogo A[] = { }, // ArcoLinux (Discontinued) { - .names = {"arco", "arcolinux"}, // ID=arcolinux + .names = { "arco", "arcolinux" }, // ID=arcolinux .lines = FASTFETCH_DATATEXT_LOGO_ARCO, .colors = { FF_COLOR_FG_BLUE, @@ -558,7 +558,7 @@ static const FFlogo A[] = { }, // ArcoLinuxSmall { - .names = {"arco_small", "arcolinux_small"}, + .names = { "arco_small", "arcolinux_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ARCO_SMALL, .colors = { @@ -570,7 +570,7 @@ static const FFlogo A[] = { }, // ArseLinux { - .names = {"arse", "arselinux", "arse-linux"}, + .names = { "arse", "arselinux", "arse-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_ARSELINUX, .colors = { FF_COLOR_FG_BLUE, @@ -581,7 +581,7 @@ static const FFlogo A[] = { }, // Arya { - .names = {"Arya"}, + .names = { "Arya" }, .lines = FASTFETCH_DATATEXT_LOGO_ARYA, .colors = { FF_COLOR_FG_GREEN, @@ -592,7 +592,7 @@ static const FFlogo A[] = { }, // Asahi { - .names = {"asahi", "asahi-linux"}, + .names = { "asahi", "asahi-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_ASAHI, .colors = { FF_COLOR_FG_YELLOW, @@ -608,7 +608,7 @@ static const FFlogo A[] = { }, // Asahi2 { - .names = {"asahi2", "asahi-linux2"}, + .names = { "asahi2", "asahi-linux2" }, .lines = FASTFETCH_DATATEXT_LOGO_ASAHI2, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { @@ -625,7 +625,7 @@ static const FFlogo A[] = { }, // Aster { - .names = {"aster"}, + .names = { "aster" }, .lines = FASTFETCH_DATATEXT_LOGO_ASTER, .colors = { FF_COLOR_FG_CYAN, @@ -635,15 +635,15 @@ static const FFlogo A[] = { }, // AsteroidOS { - .names = {"AsteroidOS"}, + .names = { "AsteroidOS" }, .lines = FASTFETCH_DATATEXT_LOGO_ASTEROIDOS, - .colors = {FF_COLOR_FG_256 "160", FF_COLOR_FG_256 "208", FF_COLOR_FG_256 "202", FF_COLOR_FG_256 "214"}, + .colors = { FF_COLOR_FG_256 "160", FF_COLOR_FG_256 "208", FF_COLOR_FG_256 "202", FF_COLOR_FG_256 "214" }, .colorKeys = FF_COLOR_FG_256 "160", .colorTitle = FF_COLOR_FG_256 "208", }, // AstOS { - .names = {"astOS"}, + .names = { "astOS" }, .lines = FASTFETCH_DATATEXT_LOGO_ASTOS, .colors = { FF_COLOR_FG_DEFAULT, @@ -653,7 +653,7 @@ static const FFlogo A[] = { }, // Astra { - .names = {"Astra", "Astra Linux", "astralinux"}, + .names = { "Astra", "Astra Linux", "astralinux" }, .lines = FASTFETCH_DATATEXT_LOGO_ASTRA_LINUX, .colors = { FF_COLOR_FG_LIGHT_RED, @@ -664,7 +664,7 @@ static const FFlogo A[] = { }, // Ataraxia { - .names = {"Ataraxia Linux", "Ataraxia"}, + .names = { "Ataraxia Linux", "Ataraxia" }, .lines = FASTFETCH_DATATEXT_LOGO_JANUSLINUX, .colors = { FF_COLOR_FG_BLUE, @@ -675,7 +675,7 @@ static const FFlogo A[] = { }, // AthenaOS { - .names = {"AthenaOS"}, + .names = { "AthenaOS" }, .lines = FASTFETCH_DATATEXT_LOGO_ATHENAOS, .colors = { FF_COLOR_FG_BLUE, @@ -686,7 +686,7 @@ static const FFlogo A[] = { }, // AthenaOS_old { - .names = {"AthenaOS_old"}, + .names = { "AthenaOS_old" }, .lines = FASTFETCH_DATATEXT_LOGO_ATHENAOS_OLD, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { @@ -698,7 +698,7 @@ static const FFlogo A[] = { }, // Aurora { - .names = {"Aurora"}, + .names = { "Aurora" }, .lines = FASTFETCH_DATATEXT_LOGO_AURORA, .colors = { FF_COLOR_FG_BLUE, @@ -709,7 +709,7 @@ static const FFlogo A[] = { }, // AxOS { - .names = {"AxOS"}, + .names = { "AxOS" }, .lines = FASTFETCH_DATATEXT_LOGO_AXOS, .colors = { FF_COLOR_FG_RGB "222;6;255", @@ -717,10 +717,10 @@ static const FFlogo A[] = { }, }, // Azos - {.names = {"Azos"}, .lines = FASTFETCH_DATATEXT_LOGO_AZOS, .colors = { - FF_COLOR_FG_CYAN, - FF_COLOR_FG_RED, - }}, + { .names = { "Azos" }, .lines = FASTFETCH_DATATEXT_LOGO_AZOS, .colors = { + FF_COLOR_FG_CYAN, + FF_COLOR_FG_RED, + } }, // LAST {}, }; @@ -728,7 +728,7 @@ static const FFlogo A[] = { static const FFlogo B[] = { // Bedrock { - .names = {"bedrock"}, + .names = { "bedrock" }, .lines = FASTFETCH_DATATEXT_LOGO_BEDROCK, .colors = { FF_COLOR_FG_LIGHT_BLACK, // grey @@ -739,7 +739,7 @@ static const FFlogo B[] = { }, // BedrockSmall { - .names = {"bedrock_small"}, + .names = { "bedrock_small" }, .lines = FASTFETCH_DATATEXT_LOGO_BEDROCK_SMALL, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .colors = { @@ -751,7 +751,7 @@ static const FFlogo B[] = { }, // BigLinux { - .names = {"BigLinux"}, + .names = { "BigLinux" }, .lines = FASTFETCH_DATATEXT_LOGO_BIGLINUX, .colors = { FF_COLOR_FG_CYAN, @@ -763,7 +763,7 @@ static const FFlogo B[] = { }, // Bitrig { - .names = {"Bitrig"}, + .names = { "Bitrig" }, .lines = FASTFETCH_DATATEXT_LOGO_BITRIG, .colors = { FF_COLOR_FG_GREEN, @@ -773,7 +773,7 @@ static const FFlogo B[] = { }, // BlackArch { - .names = {"Blackarch"}, + .names = { "Blackarch" }, .lines = FASTFETCH_DATATEXT_LOGO_BLACKARCH, .colors = { FF_COLOR_FG_RED, @@ -785,7 +785,7 @@ static const FFlogo B[] = { }, // BlackMesa { - .names = {"BlackMesa", "black-mesa"}, + .names = { "BlackMesa", "black-mesa" }, .lines = FASTFETCH_DATATEXT_LOGO_BLACKMESA, .colors = { FF_COLOR_FG_BLACK, @@ -795,7 +795,7 @@ static const FFlogo B[] = { }, // BlackPanther { - .names = {"BlackPanther"}, + .names = { "BlackPanther" }, .lines = FASTFETCH_DATATEXT_LOGO_BLACKPANTHER, .colors = { FF_COLOR_FG_RED, @@ -807,7 +807,7 @@ static const FFlogo B[] = { }, // BLAG { - .names = {"BLAG"}, + .names = { "BLAG" }, .lines = FASTFETCH_DATATEXT_LOGO_BLAG, .colors = { FF_COLOR_FG_MAGENTA, @@ -817,7 +817,7 @@ static const FFlogo B[] = { }, // BlankOn { - .names = {"BlankOn"}, + .names = { "BlankOn" }, .lines = FASTFETCH_DATATEXT_LOGO_BLANKON, .colors = { FF_COLOR_FG_RED, @@ -828,7 +828,7 @@ static const FFlogo B[] = { }, // BlueLight { - .names = {"BlueLight"}, + .names = { "BlueLight" }, .lines = FASTFETCH_DATATEXT_LOGO_BLUELIGHT, .colors = { FF_COLOR_FG_WHITE, @@ -839,7 +839,7 @@ static const FFlogo B[] = { }, // Bodhi { - .names = {"Bodhi"}, + .names = { "Bodhi" }, .lines = FASTFETCH_DATATEXT_LOGO_BODHI, .colors = { FF_COLOR_FG_WHITE, @@ -851,7 +851,7 @@ static const FFlogo B[] = { }, // Bonsai { - .names = {"Bonsai"}, + .names = { "Bonsai" }, .lines = FASTFETCH_DATATEXT_LOGO_BONSAI, .colors = { FF_COLOR_FG_CYAN, @@ -863,7 +863,7 @@ static const FFlogo B[] = { }, // BredOS { - .names = {"Bredos"}, + .names = { "Bredos" }, .lines = FASTFETCH_DATATEXT_LOGO_BREDOS, .colors = { FF_COLOR_FG_RGB "198;151;66", // grey @@ -873,7 +873,7 @@ static const FFlogo B[] = { }, // BSD { - .names = {"BSD"}, + .names = { "BSD" }, .lines = FASTFETCH_DATATEXT_LOGO_BSD, .colors = { FF_COLOR_FG_RED, @@ -887,7 +887,7 @@ static const FFlogo B[] = { }, // BunsenLabs { - .names = {"BunsenLabs"}, + .names = { "BunsenLabs" }, .lines = FASTFETCH_DATATEXT_LOGO_BUNSENLABS, .colors = { FF_COLOR_FG_DEFAULT, @@ -902,7 +902,7 @@ static const FFlogo B[] = { static const FFlogo C[] = { // CachyOS { - .names = {"CachyOS"}, + .names = { "CachyOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CACHYOS, .colors = { FF_COLOR_FG_CYAN, @@ -914,7 +914,7 @@ static const FFlogo C[] = { }, // CachyOSSmall { - .names = {"CachyOS_small"}, + .names = { "CachyOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_CACHYOS_SMALL, .colors = { @@ -925,7 +925,7 @@ static const FFlogo C[] = { }, // Calculate { - .names = {"Calculate"}, + .names = { "Calculate" }, .lines = FASTFETCH_DATATEXT_LOGO_CALCULATE, .colors = { FF_COLOR_FG_WHITE, @@ -936,7 +936,7 @@ static const FFlogo C[] = { }, // CalinixOS { - .names = {"Calinix", "calinixos"}, + .names = { "Calinix", "calinixos" }, .lines = FASTFETCH_DATATEXT_LOGO_CALINIXOS, .colors = { FF_COLOR_FG_MAGENTA, @@ -946,7 +946,7 @@ static const FFlogo C[] = { }, // CalinixOSSmall { - .names = {"Calinix_small", "calinixos_small"}, + .names = { "Calinix_small", "calinixos_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_CALINIXOS_SMALL, .colors = { @@ -957,7 +957,7 @@ static const FFlogo C[] = { }, // Carbs { - .names = {"Carbs"}, + .names = { "Carbs" }, .lines = FASTFETCH_DATATEXT_LOGO_CARBS, .colors = { FF_COLOR_FG_MAGENTA, @@ -967,7 +967,7 @@ static const FFlogo C[] = { }, // CBL-Mariner { - .names = {"CBL-Mariner"}, + .names = { "CBL-Mariner" }, .lines = FASTFETCH_DATATEXT_LOGO_CBL_MARINER, .colors = { FF_COLOR_FG_CYAN, @@ -977,7 +977,7 @@ static const FFlogo C[] = { }, // CelOS { - .names = {"Cel", "celos", "cel-linux", "celos-linux"}, + .names = { "Cel", "celos", "cel-linux", "celos-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_CELOS, .colors = { FF_COLOR_FG_MAGENTA, @@ -988,7 +988,7 @@ static const FFlogo C[] = { }, // Center { - .names = {"Center"}, + .names = { "Center" }, .lines = FASTFETCH_DATATEXT_LOGO_CENTER, .colors = { FF_COLOR_FG_DEFAULT, @@ -998,7 +998,7 @@ static const FFlogo C[] = { }, // CentOS { - .names = {"CentOS"}, + .names = { "CentOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CENTOS, .colors = { FF_COLOR_FG_YELLOW, @@ -1012,7 +1012,7 @@ static const FFlogo C[] = { }, // CentOSSmall { - .names = {"CentOS_small"}, + .names = { "CentOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_CENTOS_SMALL, .colors = { @@ -1026,15 +1026,15 @@ static const FFlogo C[] = { }, // Cereus { - .names = {"Cereus", "Cereus Linux"}, + .names = { "Cereus", "Cereus Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_CEREUS, - .colors = {FF_COLOR_FG_256 "173", FF_COLOR_FG_256 "108", FF_COLOR_FG_256 "71", FF_COLOR_FG_256 "151", FF_COLOR_FG_256 "72"}, + .colors = { FF_COLOR_FG_256 "173", FF_COLOR_FG_256 "108", FF_COLOR_FG_256 "71", FF_COLOR_FG_256 "151", FF_COLOR_FG_256 "72" }, .colorKeys = FF_COLOR_FG_256 "108", .colorTitle = FF_COLOR_MODE_BOLD FF_COLOR_FG_WHITE, }, // Chakra { - .names = {"Chakra"}, + .names = { "Chakra" }, .lines = FASTFETCH_DATATEXT_LOGO_CHAKRA, .colors = { FF_COLOR_FG_BLUE, @@ -1044,15 +1044,15 @@ static const FFlogo C[] = { }, // ChaletOS { - .names = {"ChaletOS"}, + .names = { "ChaletOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CHALETOS, - .colors = {FF_COLOR_FG_BLUE, FF_COLOR_FG_WHITE}, + .colors = { FF_COLOR_FG_BLUE, FF_COLOR_FG_WHITE }, .colorKeys = FF_COLOR_FG_BLUE, .colorTitle = FF_COLOR_FG_DEFAULT, }, // Chapeau { - .names = {"Chapeau"}, + .names = { "Chapeau" }, .lines = FASTFETCH_DATATEXT_LOGO_CHAPEAU, .colors = { FF_COLOR_FG_GREEN, @@ -1063,7 +1063,7 @@ static const FFlogo C[] = { }, // Chimera { - .names = {"Chimera"}, + .names = { "Chimera" }, .lines = FASTFETCH_DATATEXT_LOGO_CHIMERA_LINUX, .colors = { FF_COLOR_FG_RED, @@ -1076,7 +1076,7 @@ static const FFlogo C[] = { }, // ChonkySealOS { - .names = {"ChonkySealOS"}, + .names = { "ChonkySealOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CHONKYSEALOS, .colors = { FF_COLOR_FG_DEFAULT, @@ -1086,7 +1086,7 @@ static const FFlogo C[] = { }, // Chrom { - .names = {"Chrom", "ChromeOS"}, + .names = { "Chrom", "ChromeOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CHROM, .colors = { FF_COLOR_FG_GREEN, @@ -1100,7 +1100,7 @@ static const FFlogo C[] = { }, // Cleanjaro { - .names = {"Cleanjaro"}, + .names = { "Cleanjaro" }, .lines = FASTFETCH_DATATEXT_LOGO_CLEANJARO, .colors = { FF_COLOR_FG_DEFAULT, @@ -1110,7 +1110,7 @@ static const FFlogo C[] = { }, // CleanjaroSmall { - .names = {"Cleanjaro_small"}, + .names = { "Cleanjaro_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_CLEANJARO_SMALL, .colors = { @@ -1121,7 +1121,7 @@ static const FFlogo C[] = { }, // ClearLinux { - .names = {"Clear Linux", "clearlinux", "Clear Linux OS"}, + .names = { "Clear Linux", "clearlinux", "Clear Linux OS" }, .lines = FASTFETCH_DATATEXT_LOGO_CLEAR_LINUX, .colors = { FF_COLOR_FG_BLUE, @@ -1132,7 +1132,7 @@ static const FFlogo C[] = { }, // ClearOS { - .names = {"ClearOS"}, + .names = { "ClearOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CLEAROS, .colors = { FF_COLOR_FG_GREEN, @@ -1142,7 +1142,7 @@ static const FFlogo C[] = { }, // Clover { - .names = {"Clover"}, + .names = { "Clover" }, .lines = FASTFETCH_DATATEXT_LOGO_CLOVER, .colors = { FF_COLOR_FG_GREEN, @@ -1153,7 +1153,7 @@ static const FFlogo C[] = { }, // Cobalt { - .names = {"Cobalt"}, + .names = { "Cobalt" }, .lines = FASTFETCH_DATATEXT_LOGO_COBALT, .colors = { FF_COLOR_FG_BLUE, @@ -1167,21 +1167,21 @@ static const FFlogo C[] = { }, // Codex Linux (reMarkable OS) { - .names = {"Codex Linux"}, + .names = { "Codex Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_CODEX, - .colors = {FF_COLOR_FG_WHITE}, + .colors = { FF_COLOR_FG_WHITE }, }, // Condres { - .names = {"Condres"}, + .names = { "Condres" }, .lines = FASTFETCH_DATATEXT_LOGO_CONDRES, - .colors = {FF_COLOR_FG_GREEN, FF_COLOR_FG_YELLOW, FF_COLOR_FG_CYAN}, + .colors = { FF_COLOR_FG_GREEN, FF_COLOR_FG_YELLOW, FF_COLOR_FG_CYAN }, .colorKeys = FF_COLOR_FG_GREEN, .colorTitle = FF_COLOR_FG_YELLOW, }, // ContainerLinux { - .names = {"ContainerLinux", "Container Linux", "Container Linux by CoreOS"}, + .names = { "ContainerLinux", "Container Linux", "Container Linux by CoreOS" }, .lines = FASTFETCH_DATATEXT_LOGO_FEDORA_COREOS, .colors = { FF_COLOR_FG_BLUE, @@ -1193,13 +1193,13 @@ static const FFlogo C[] = { }, // Common Torizon { - .names = {"common-torizon"}, + .names = { "common-torizon" }, .lines = FASTFETCH_DATATEXT_LOGO_TORIZONCORE, - .colors = {FF_COLOR_FG_LIGHT_WHITE, FF_COLOR_FG_YELLOW, FF_COLOR_FG_BLUE}, + .colors = { FF_COLOR_FG_LIGHT_WHITE, FF_COLOR_FG_YELLOW, FF_COLOR_FG_BLUE }, }, // Cosmic DE { - .names = {"Cosmic"}, + .names = { "Cosmic" }, .lines = FASTFETCH_DATATEXT_LOGO_COSMIC, .colors = { FF_COLOR_FG_WHITE, @@ -1213,7 +1213,7 @@ static const FFlogo C[] = { }, // CRUX { - .names = {"CRUX"}, + .names = { "CRUX" }, .lines = FASTFETCH_DATATEXT_LOGO_CRUX, .colors = { FF_COLOR_FG_BLUE, @@ -1225,7 +1225,7 @@ static const FFlogo C[] = { }, // CRUXSmall { - .names = {"CRUX_small"}, + .names = { "CRUX_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_CRUX_SMALL, .colors = { @@ -1238,7 +1238,7 @@ static const FFlogo C[] = { }, // CrystalLinux { - .names = {"Crystal", "Crystal", "crystal-linux", "Crystal-Linux"}, + .names = { "Crystal", "Crystal", "crystal-linux", "Crystal-Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_CRYSTAL, .colors = { FF_COLOR_FG_MAGENTA, @@ -1248,7 +1248,7 @@ static const FFlogo C[] = { }, // Cucumber { - .names = {"Cucumber", "CucumberOS"}, + .names = { "Cucumber", "CucumberOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CUCUMBER, .colors = { FF_COLOR_FG_GREEN, @@ -1259,7 +1259,7 @@ static const FFlogo C[] = { }, // CuerdOS { - .names = {"CuerdOS", "CuerdOS GNU/Linux"}, + .names = { "CuerdOS", "CuerdOS GNU/Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_CUERDOS, .colors = { FF_COLOR_FG_YELLOW, @@ -1270,7 +1270,7 @@ static const FFlogo C[] = { }, // CutefishOS { - .names = {"CutefishOS"}, + .names = { "CutefishOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CUTEFISHOS, .colors = { FF_COLOR_FG_CYAN, @@ -1280,7 +1280,7 @@ static const FFlogo C[] = { }, // CuteOS { - .names = {"CuteOS"}, + .names = { "CuteOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CUTEOS, .colors = { FF_COLOR_FG_BLUE, @@ -1292,7 +1292,7 @@ static const FFlogo C[] = { }, // CyberOS { - .names = {"CyberOS"}, + .names = { "CyberOS" }, .lines = FASTFETCH_DATATEXT_LOGO_CYBEROS, .colors = { FF_COLOR_FG_BLUE, @@ -1304,7 +1304,7 @@ static const FFlogo C[] = { }, // cycledream { - .names = {"cycledream"}, + .names = { "cycledream" }, .lines = FASTFETCH_DATATEXT_LOGO_CYCLEDREAM, .colors = { FF_COLOR_FG_MAGENTA, @@ -1319,7 +1319,7 @@ static const FFlogo C[] = { static const FFlogo D[] = { // DahliaOS { - .names = {"dahliaOS"}, + .names = { "dahliaOS" }, .lines = FASTFETCH_DATATEXT_LOGO_DAHLIA, .colors = { FF_COLOR_FG_RED, @@ -1329,7 +1329,7 @@ static const FFlogo D[] = { }, // DarkOS { - .names = {"DarkOS"}, + .names = { "DarkOS" }, .lines = FASTFETCH_DATATEXT_LOGO_DARKOS, .colors = { FF_COLOR_FG_RED, @@ -1343,7 +1343,7 @@ static const FFlogo D[] = { }, // Debian { - .names = {"Debian"}, + .names = { "Debian" }, .lines = FASTFETCH_DATATEXT_LOGO_DEBIAN, .colors = { FF_COLOR_FG_RED, @@ -1354,7 +1354,7 @@ static const FFlogo D[] = { }, // DebianSmall { - .names = {"Debian_small"}, + .names = { "Debian_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_DEBIAN_SMALL, .colors = { @@ -1365,7 +1365,7 @@ static const FFlogo D[] = { }, // Deepin { - .names = {"Deepin"}, + .names = { "Deepin" }, .lines = FASTFETCH_DATATEXT_LOGO_DEEPIN, .colors = { FF_COLOR_FG_BLUE, @@ -1375,7 +1375,7 @@ static const FFlogo D[] = { }, // DesaOS { - .names = {"DesaOS"}, + .names = { "DesaOS" }, .lines = FASTFETCH_DATATEXT_LOGO_DESAOS, .colors = { FF_COLOR_FG_GREEN, @@ -1386,7 +1386,7 @@ static const FFlogo D[] = { }, // Devuan { - .names = {"Devuan"}, + .names = { "Devuan" }, .lines = FASTFETCH_DATATEXT_LOGO_DEVUAN, .colors = { FF_COLOR_FG_MAGENTA, @@ -1396,7 +1396,7 @@ static const FFlogo D[] = { }, // DevuanSmall { - .names = {"Devuan_small"}, + .names = { "Devuan_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_DEVUAN_SMALL, .colors = { @@ -1407,7 +1407,7 @@ static const FFlogo D[] = { }, // DietPi { - .names = {"DietPi"}, + .names = { "DietPi" }, .lines = FASTFETCH_DATATEXT_LOGO_DIETPI, .colors = { FF_COLOR_FG_GREEN, @@ -1418,7 +1418,7 @@ static const FFlogo D[] = { }, // DracOS { - .names = {"DracOS"}, + .names = { "DracOS" }, .lines = FASTFETCH_DATATEXT_LOGO_DRACOS, .colors = { FF_COLOR_FG_RED, @@ -1429,7 +1429,7 @@ static const FFlogo D[] = { }, // DragonFly { - .names = {"DragonFly"}, + .names = { "DragonFly" }, .lines = FASTFETCH_DATATEXT_LOGO_DRAGONFLY, .colors = { FF_COLOR_FG_RED, @@ -1440,7 +1440,7 @@ static const FFlogo D[] = { }, // DragonFlySmall { - .names = {"DragonFly_small"}, + .names = { "DragonFly_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_DRAGONFLY_SMALL, .colors = { @@ -1452,7 +1452,7 @@ static const FFlogo D[] = { }, // DragonFlyOld { - .names = {"DragonFly_old"}, + .names = { "DragonFly_old" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_DRAGONFLY_OLD, .colors = { @@ -1465,7 +1465,7 @@ static const FFlogo D[] = { }, // DraugerOS { - .names = {"DraugerOS", "Drauger"}, + .names = { "DraugerOS", "Drauger" }, .lines = FASTFETCH_DATATEXT_LOGO_DRAUGER, .colors = { FF_COLOR_FG_RED, @@ -1476,7 +1476,7 @@ static const FFlogo D[] = { }, // Droidian { - .names = {"Droidian"}, + .names = { "Droidian" }, .lines = FASTFETCH_DATATEXT_LOGO_DROIDIAN, .colors = { FF_COLOR_FG_GREEN, @@ -1492,7 +1492,7 @@ static const FFlogo D[] = { static const FFlogo E[] = { // Elbrus { - .names = {"elbrus"}, + .names = { "elbrus" }, .lines = FASTFETCH_DATATEXT_LOGO_ELBRUS, .colors = { FF_COLOR_FG_BLUE, @@ -1502,7 +1502,7 @@ static const FFlogo E[] = { }, // Elementary { - .names = {"Elementary"}, + .names = { "Elementary" }, .lines = FASTFETCH_DATATEXT_LOGO_ELEMENTARY, .colors = { FF_COLOR_FG_DEFAULT, @@ -1512,7 +1512,7 @@ static const FFlogo E[] = { }, // ElementarySmall { - .names = {"Elementary_small"}, + .names = { "Elementary_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ELEMENTARY_SMALL, .colors = { @@ -1523,7 +1523,7 @@ static const FFlogo E[] = { }, // Elive { - .names = {"Elive"}, + .names = { "Elive" }, .lines = FASTFETCH_DATATEXT_LOGO_ELIVE, .colors = { FF_COLOR_FG_WHITE, @@ -1535,7 +1535,7 @@ static const FFlogo E[] = { }, // Emmabuntüs { - .names = {"Emmabuntus"}, + .names = { "Emmabuntus" }, .lines = FASTFETCH_DATATEXT_LOGO_EMMABUNTUS, .colors = { FF_COLOR_FG_BLUE, @@ -1544,7 +1544,7 @@ static const FFlogo E[] = { }, // EmperorOS { - .names = {"Emperor"}, + .names = { "Emperor" }, .lines = FASTFETCH_DATATEXT_LOGO_EMPEROROS, .colors = { FF_COLOR_FG_YELLOW, @@ -1553,7 +1553,7 @@ static const FFlogo E[] = { }, // EncryptOS { - .names = {"EncryptOS"}, + .names = { "EncryptOS" }, .lines = FASTFETCH_DATATEXT_LOGO_ENCRYPTOS, .colors = { FF_COLOR_FG_MAGENTA, @@ -1563,7 +1563,7 @@ static const FFlogo E[] = { }, // EndeavourOS { - .names = {"EndeavourOS"}, + .names = { "EndeavourOS" }, .lines = FASTFETCH_DATATEXT_LOGO_ENDEAVOUROS, .colors = { FF_COLOR_FG_MAGENTA, @@ -1575,7 +1575,7 @@ static const FFlogo E[] = { }, // EndeavourOSSmall { - .names = {"EndeavourOS_small"}, + .names = { "EndeavourOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ENDEAVOUROS_SMALL, .colors = { @@ -1586,15 +1586,15 @@ static const FFlogo E[] = { }, // Endless { - .names = {"Endless"}, + .names = { "Endless" }, .lines = FASTFETCH_DATATEXT_LOGO_ENDLESS, - .colors = {FF_COLOR_FG_RED, FF_COLOR_FG_WHITE}, + .colors = { FF_COLOR_FG_RED, FF_COLOR_FG_WHITE }, .colorKeys = FF_COLOR_FG_RED, .colorTitle = FF_COLOR_FG_DEFAULT, }, // Enso { - .names = {"Enso"}, + .names = { "Enso" }, .lines = FASTFETCH_DATATEXT_LOGO_ENSO, .colors = { FF_COLOR_FG_DEFAULT, @@ -1604,7 +1604,7 @@ static const FFlogo E[] = { }, // EshanizedOS { - .names = {"EshanizedOS"}, + .names = { "EshanizedOS" }, .lines = FASTFETCH_DATATEXT_LOGO_ESHANIZEDOS, .colors = { FF_COLOR_FG_RED, @@ -1613,7 +1613,7 @@ static const FFlogo E[] = { }, // EuroLinux { - .names = {"EuroLinux"}, + .names = { "EuroLinux" }, .lines = FASTFETCH_DATATEXT_LOGO_EUROLINUX, .colors = { FF_COLOR_FG_BLUE, @@ -1624,7 +1624,7 @@ static const FFlogo E[] = { }, // EvolutionOS { - .names = {"EvolutionOS"}, + .names = { "EvolutionOS" }, .lines = FASTFETCH_DATATEXT_LOGO_EVOLUTIONOS, .colors = { FF_COLOR_FG_GREEN, @@ -1633,7 +1633,7 @@ static const FFlogo E[] = { }, // EvolutionOSSmall { - .names = {"EvolutionOS_small"}, + .names = { "EvolutionOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_EVOLUTIONOS_SMALL, .colors = { @@ -1643,7 +1643,7 @@ static const FFlogo E[] = { }, // EvolutionOS_old { - .names = {"EvolutionOS_old"}, + .names = { "EvolutionOS_old" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_EVOLUTIONOS_OLD, .colors = { @@ -1653,7 +1653,7 @@ static const FFlogo E[] = { }, // eweOS { - .names = {"eweOS"}, + .names = { "eweOS" }, .lines = FASTFETCH_DATATEXT_LOGO_EWEOS, .colors = { FF_COLOR_FG_WHITE, @@ -1665,7 +1665,7 @@ static const FFlogo E[] = { }, // Exherbo { - .names = {"Exherbo"}, + .names = { "Exherbo" }, .lines = FASTFETCH_DATATEXT_LOGO_EXHERBO, .colors = { FF_COLOR_FG_BLUE, @@ -1677,7 +1677,7 @@ static const FFlogo E[] = { }, // ExodiaOS { - .names = {"Exodia"}, + .names = { "Exodia" }, .lines = FASTFETCH_DATATEXT_LOGO_EXODIA_PREDATOR, .colors = { FF_COLOR_FG_MAGENTA, @@ -1692,7 +1692,7 @@ static const FFlogo E[] = { static const FFlogo F[] = { // Fastfetch { - .names = {"Fastfetch", "FF"}, + .names = { "Fastfetch", "FF" }, .lines = FASTFETCH_DATATEXT_LOGO_FASTFETCH, .colors = { FF_COLOR_FG_BLUE, @@ -1708,7 +1708,7 @@ static const FFlogo F[] = { }, // Fedora { - .names = {"Fedora"}, + .names = { "Fedora" }, .lines = FASTFETCH_DATATEXT_LOGO_FEDORA, .colors = { FF_COLOR_FG_BLUE, @@ -1719,7 +1719,7 @@ static const FFlogo F[] = { }, // FedoraAsahiRemix { - .names = {"fedora-asahi-remix"}, + .names = { "fedora-asahi-remix" }, .lines = FASTFETCH_DATATEXT_LOGO_ASAHI, .colors = { FF_COLOR_FG_YELLOW, @@ -1735,7 +1735,7 @@ static const FFlogo F[] = { }, // FedoraSmall { - .names = {"Fedora_small"}, + .names = { "Fedora_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_FEDORA_SMALL, .colors = { @@ -1745,7 +1745,7 @@ static const FFlogo F[] = { .colorTitle = FF_COLOR_FG_DEFAULT, }, { - .names = {"Fedora2_small"}, + .names = { "Fedora2_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_FEDORA2_SMALL, .colors = { @@ -1756,7 +1756,7 @@ static const FFlogo F[] = { }, // FedoraOld { - .names = {"Fedora_old"}, + .names = { "Fedora_old" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_FEDORA_OLD, .colors = { @@ -1768,7 +1768,7 @@ static const FFlogo F[] = { }, // FedoraSilverblue { - .names = {"Fedora-Silverblue"}, + .names = { "Fedora-Silverblue" }, .lines = FASTFETCH_DATATEXT_LOGO_FEDORA_SILVERBLUE, .colors = { FF_COLOR_FG_BLUE, @@ -1780,7 +1780,7 @@ static const FFlogo F[] = { }, // FedoraKinoite { - .names = {"Fedora-Kinoite"}, + .names = { "Fedora-Kinoite" }, .lines = FASTFETCH_DATATEXT_LOGO_FEDORA_KINOITE, .colors = { FF_COLOR_FG_BLUE, @@ -1791,7 +1791,7 @@ static const FFlogo F[] = { }, // FedoraSericea { - .names = {"Fedora-Sericea"}, + .names = { "Fedora-Sericea" }, .lines = FASTFETCH_DATATEXT_LOGO_FEDORA_SERICEA, .colors = { FF_COLOR_FG_BLUE, @@ -1802,7 +1802,7 @@ static const FFlogo F[] = { }, // FedoraCoreOS { - .names = {"Fedora-CoreOS"}, + .names = { "Fedora-CoreOS" }, .lines = FASTFETCH_DATATEXT_LOGO_FEDORA_COREOS, .colors = { FF_COLOR_FG_BLUE, @@ -1814,7 +1814,7 @@ static const FFlogo F[] = { }, // FemboyOS { - .names = {"FemboyOS"}, + .names = { "FemboyOS" }, .lines = FASTFETCH_DATATEXT_LOGO_FEMBOYOS, .colors = { FF_COLOR_FG_BLUE, @@ -1824,7 +1824,7 @@ static const FFlogo F[] = { }, // Feren { - .names = {"Feren"}, + .names = { "Feren" }, .lines = FASTFETCH_DATATEXT_LOGO_FEREN, .colors = { FF_COLOR_FG_BLUE, @@ -1834,7 +1834,7 @@ static const FFlogo F[] = { }, // Filotimo { - .names = {"filotimo"}, + .names = { "filotimo" }, .lines = FASTFETCH_DATATEXT_LOGO_FILOTIMO, .colors = { FF_COLOR_FG_BLUE, @@ -1844,7 +1844,7 @@ static const FFlogo F[] = { }, // Finnix { - .names = {"Finnix"}, + .names = { "Finnix" }, .lines = FASTFETCH_DATATEXT_LOGO_FINNIX, .colors = { FF_COLOR_FG_BLUE, @@ -1855,7 +1855,7 @@ static const FFlogo F[] = { }, // Floflis { - .names = {"Floflis"}, + .names = { "Floflis" }, .lines = FASTFETCH_DATATEXT_LOGO_FLOFLIS, .colors = { FF_COLOR_FG_LIGHT_CYAN, @@ -1865,7 +1865,7 @@ static const FFlogo F[] = { }, // FreeBSD { - .names = {"Freebsd"}, + .names = { "Freebsd" }, .lines = FASTFETCH_DATATEXT_LOGO_FREEBSD, .colors = { FF_COLOR_FG_WHITE, @@ -1876,7 +1876,7 @@ static const FFlogo F[] = { }, // FreeBSDSmall { - .names = {"freebsd_small"}, + .names = { "freebsd_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_FREEBSD_SMALL, .colors = { @@ -1887,15 +1887,15 @@ static const FFlogo F[] = { }, // FreeMiNT { - .names = {"FreeMiNT"}, + .names = { "FreeMiNT" }, .lines = FASTFETCH_DATATEXT_LOGO_FREEMINT, - .colors = {FF_COLOR_FG_WHITE}, + .colors = { FF_COLOR_FG_WHITE }, .colorKeys = FF_COLOR_FG_DEFAULT, .colorTitle = FF_COLOR_FG_DEFAULT, }, // Frugalware { - .names = {"Frugalware", "frugalware-linux"}, + .names = { "Frugalware", "frugalware-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_FRUGALWARE, .colors = { FF_COLOR_FG_BLUE, @@ -1906,7 +1906,7 @@ static const FFlogo F[] = { }, // Funtoo { - .names = {"Funtoo"}, + .names = { "Funtoo" }, .lines = FASTFETCH_DATATEXT_LOGO_FUNTOO, .colors = { FF_COLOR_FG_MAGENTA, @@ -1917,7 +1917,7 @@ static const FFlogo F[] = { }, // Furreto { - .names = {"Furreto"}, + .names = { "Furreto" }, .lines = FASTFETCH_DATATEXT_LOGO_FURRETO, .colors = { FF_COLOR_FG_WHITE, @@ -1933,7 +1933,7 @@ static const FFlogo F[] = { static const FFlogo G[] = { // GalliumOS { - .names = {"GalliumOS"}, + .names = { "GalliumOS" }, .lines = FASTFETCH_DATATEXT_LOGO_GALLIUMOS, .colors = { FF_COLOR_FG_BLUE, @@ -1944,7 +1944,7 @@ static const FFlogo G[] = { }, // Garuda { - .names = {"Garuda", "garuda-linux"}, + .names = { "Garuda", "garuda-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_GARUDA, .colors = { FF_COLOR_FG_RED, @@ -1954,7 +1954,7 @@ static const FFlogo G[] = { }, // GarudaDragon { - .names = {"GarudaDragon", "garuda-dragon"}, + .names = { "GarudaDragon", "garuda-dragon" }, .lines = FASTFETCH_DATATEXT_LOGO_GARUDA_DRAGON, .colors = { FF_COLOR_FG_RED, @@ -1964,7 +1964,7 @@ static const FFlogo G[] = { }, // GarudaSmall { - .names = {"Garuda_small", "garuda-linux_small"}, + .names = { "Garuda_small", "garuda-linux_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_GARUDA_SMALL, .colors = { @@ -1975,7 +1975,7 @@ static const FFlogo G[] = { }, // Gentoo { - .names = {"Gentoo"}, + .names = { "Gentoo" }, .lines = FASTFETCH_DATATEXT_LOGO_GENTOO, .colors = { FF_COLOR_FG_MAGENTA, @@ -1986,7 +1986,7 @@ static const FFlogo G[] = { }, // GentooSmall { - .names = {"Gentoo_small"}, + .names = { "Gentoo_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_GENTOO_SMALL, .colors = { @@ -1998,7 +1998,7 @@ static const FFlogo G[] = { }, // GhostBSD { - .names = {"GhostBSD"}, + .names = { "GhostBSD" }, .lines = FASTFETCH_DATATEXT_LOGO_GHOSTBSD, .colors = { FF_COLOR_FG_BLUE, @@ -2008,7 +2008,7 @@ static const FFlogo G[] = { }, // GhostFreak { - .names = {"GhostFreak"}, + .names = { "GhostFreak" }, .lines = FASTFETCH_DATATEXT_LOGO_GHOSTFREAK, .colors = { FF_COLOR_FG_DEFAULT, @@ -2018,7 +2018,7 @@ static const FFlogo G[] = { }, // Glaucus { - .names = {"Glaucus"}, + .names = { "Glaucus" }, .lines = FASTFETCH_DATATEXT_LOGO_GLAUCUS, .colors = { FF_COLOR_FG_MAGENTA, @@ -2028,7 +2028,7 @@ static const FFlogo G[] = { }, // GNewSense { - .names = {"gNewSense"}, + .names = { "gNewSense" }, .lines = FASTFETCH_DATATEXT_LOGO_GNEWSENSE, .colors = { FF_COLOR_FG_BLUE, @@ -2038,7 +2038,7 @@ static const FFlogo G[] = { }, // GNOME { - .names = {"GNOME"}, + .names = { "GNOME" }, .lines = FASTFETCH_DATATEXT_LOGO_GNOME, .colors = { FF_COLOR_FG_BLUE, @@ -2048,7 +2048,7 @@ static const FFlogo G[] = { }, // GNU { - .names = {"GNU"}, + .names = { "GNU" }, .lines = FASTFETCH_DATATEXT_LOGO_GNU, .colors = { FF_COLOR_FG_DEFAULT, @@ -2058,7 +2058,7 @@ static const FFlogo G[] = { }, // GoboLinux { - .names = {"GoboLinux", "Gobo"}, + .names = { "GoboLinux", "Gobo" }, .lines = FASTFETCH_DATATEXT_LOGO_GOBOLINUX, .colors = { FF_COLOR_FG_MAGENTA, @@ -2068,7 +2068,7 @@ static const FFlogo G[] = { }, // GoldenDogLinux { - .names = {"GoldenDog Linux", "GDL", "goldendoglinux"}, + .names = { "GoldenDog Linux", "GDL", "goldendoglinux" }, .lines = FASTFETCH_DATATEXT_LOGO_GOLDENDOGLINUX, .colors = { FF_COLOR_FG_YELLOW, @@ -2078,7 +2078,7 @@ static const FFlogo G[] = { }, // GrapheneOS { - .names = {"GrapheneOS"}, + .names = { "GrapheneOS" }, .lines = FASTFETCH_DATATEXT_LOGO_GRAPHENEOS, .colors = { FF_COLOR_FG_DEFAULT, @@ -2088,7 +2088,7 @@ static const FFlogo G[] = { }, // Grombyang { - .names = {"Grombyang"}, + .names = { "Grombyang" }, .lines = FASTFETCH_DATATEXT_LOGO_GROMBYANG, .colors = { FF_COLOR_FG_BLUE, @@ -2100,7 +2100,7 @@ static const FFlogo G[] = { }, // Guix { - .names = {"Guix"}, + .names = { "Guix" }, .lines = FASTFETCH_DATATEXT_LOGO_GUIX, .colors = { FF_COLOR_FG_YELLOW, @@ -2110,7 +2110,7 @@ static const FFlogo G[] = { }, // GuixSmall { - .names = {"Guix_small"}, + .names = { "Guix_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_GUIX_SMALL, .colors = { @@ -2121,7 +2121,7 @@ static const FFlogo G[] = { }, // GXDE { - .names = {"GXDE"}, + .names = { "GXDE" }, .lines = FASTFETCH_DATATEXT_LOGO_GXDE, .colors = { FF_COLOR_FG_RED, @@ -2136,7 +2136,7 @@ static const FFlogo G[] = { static const FFlogo H[] = { // Haiku { - .names = {"Haiku"}, + .names = { "Haiku" }, .lines = FASTFETCH_DATATEXT_LOGO_HAIKU, .colors = { FF_COLOR_FG_DEFAULT, @@ -2147,7 +2147,7 @@ static const FFlogo H[] = { }, // Haiku2 { - .names = {"Haiku2"}, + .names = { "Haiku2" }, .lines = FASTFETCH_DATATEXT_LOGO_HAIKU2, .colors = { FF_COLOR_FG_GREEN, @@ -2158,7 +2158,7 @@ static const FFlogo H[] = { }, // HaikuSmall { - .names = {"Haiku_small"}, + .names = { "Haiku_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_HAIKU_SMALL, .colors = { @@ -2169,15 +2169,15 @@ static const FFlogo H[] = { }, // HamoniKR { - .names = {"HamoniKR"}, + .names = { "HamoniKR" }, .lines = FASTFETCH_DATATEXT_LOGO_HAMONIKR, - .colors = {FF_COLOR_FG_BLUE, FF_COLOR_FG_WHITE, FF_COLOR_FG_256 "99"}, + .colors = { FF_COLOR_FG_BLUE, FF_COLOR_FG_WHITE, FF_COLOR_FG_256 "99" }, .colorKeys = FF_COLOR_FG_BLUE, .colorTitle = FF_COLOR_FG_DEFAULT, }, // HarDClanZ { - .names = {"HarDClanZ"}, + .names = { "HarDClanZ" }, .lines = FASTFETCH_DATATEXT_LOGO_HARDCLANZ, .colors = { FF_COLOR_FG_BLUE, @@ -2189,7 +2189,7 @@ static const FFlogo H[] = { }, // HardenedBSD { - .names = {"HardenedBSD"}, + .names = { "HardenedBSD" }, .lines = FASTFETCH_DATATEXT_LOGO_FREEBSD, .colors = { FF_COLOR_FG_WHITE, @@ -2200,7 +2200,7 @@ static const FFlogo H[] = { }, // HarmonyOS { - .names = {"HarmonyOS"}, + .names = { "HarmonyOS" }, .lines = FASTFETCH_DATATEXT_LOGO_HARMONYOS, .colors = { FF_COLOR_FG_WHITE, @@ -2211,7 +2211,7 @@ static const FFlogo H[] = { }, // Hash { - .names = {"Hash"}, + .names = { "Hash" }, .lines = FASTFETCH_DATATEXT_LOGO_HASH, .colors = { FF_COLOR_FG_256 "123", @@ -2220,7 +2220,7 @@ static const FFlogo H[] = { }, // HeliumOS { - .names = {"HeliumOS"}, + .names = { "HeliumOS" }, .lines = FASTFETCH_DATATEXT_LOGO_HELIUMOS, .colors = { FF_COLOR_FG_256 "81", @@ -2230,7 +2230,7 @@ static const FFlogo H[] = { }, // Huawei Cloud EulerOS { - .names = {"Huawei Cloud EulerOS", "hce"}, + .names = { "Huawei Cloud EulerOS", "hce" }, .lines = FASTFETCH_DATATEXT_LOGO_HCE, .colors = { FF_COLOR_FG_RED, @@ -2240,7 +2240,7 @@ static const FFlogo H[] = { }, // Huayra { - .names = {"Huayra"}, + .names = { "Huayra" }, .lines = FASTFETCH_DATATEXT_LOGO_HUAYRA, .colors = { FF_COLOR_FG_DEFAULT, @@ -2250,7 +2250,7 @@ static const FFlogo H[] = { }, // Hybrid { - .names = {"Hybrid"}, + .names = { "Hybrid" }, .lines = FASTFETCH_DATATEXT_LOGO_HYBRID, .colors = { FF_COLOR_FG_BLUE, @@ -2261,7 +2261,7 @@ static const FFlogo H[] = { }, // HydroOS { - .names = {"HydroOS"}, + .names = { "HydroOS" }, .lines = FASTFETCH_DATATEXT_LOGO_HYDROOS, .colors = { FF_COLOR_FG_RED, @@ -2271,7 +2271,7 @@ static const FFlogo H[] = { }, // HyprOS { - .names = {"hypros"}, + .names = { "hypros" }, .lines = FASTFETCH_DATATEXT_LOGO_HYPROS, .colors = { FF_COLOR_FG_RED, @@ -2282,7 +2282,7 @@ static const FFlogo H[] = { }, // Hyperbola { - .names = {"Hyperbola"}, + .names = { "Hyperbola" }, .lines = FASTFETCH_DATATEXT_LOGO_HYPERBOLA, .colors = { FF_COLOR_FG_LIGHT_BLACK, @@ -2292,7 +2292,7 @@ static const FFlogo H[] = { }, // HyperbolaSmall { - .names = {"Hyperbola_small"}, + .names = { "Hyperbola_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_HYPERBOLA_SMALL, .colors = { @@ -2308,7 +2308,7 @@ static const FFlogo H[] = { static const FFlogo I[] = { // Iglunix { - .names = {"Iglunix", "Iglu"}, + .names = { "Iglunix", "Iglu" }, .lines = FASTFETCH_DATATEXT_LOGO_IGLUNIX, .colors = { FF_COLOR_FG_LIGHT_BLACK, @@ -2318,7 +2318,7 @@ static const FFlogo I[] = { }, // InstantOS { - .names = {"InstantOS"}, + .names = { "InstantOS" }, .lines = FASTFETCH_DATATEXT_LOGO_INSTANTOS, .colors = { FF_COLOR_FG_BLUE, @@ -2329,7 +2329,7 @@ static const FFlogo I[] = { }, // Interix { - .names = {"Interix"}, + .names = { "Interix" }, .lines = FASTFETCH_DATATEXT_LOGO_INTERIX, .colors = { FF_COLOR_FG_RED, @@ -2341,7 +2341,7 @@ static const FFlogo I[] = { }, // IRIX { - .names = {"IRIX"}, + .names = { "IRIX" }, .lines = FASTFETCH_DATATEXT_LOGO_IRIX, .colors = { FF_COLOR_FG_BLUE, @@ -2351,7 +2351,7 @@ static const FFlogo I[] = { }, // Ironclad { - .names = {"Ironclad"}, + .names = { "Ironclad" }, .lines = FASTFETCH_DATATEXT_LOGO_IRONCLAD, .colors = { FF_COLOR_FG_BLACK, @@ -2361,7 +2361,7 @@ static const FFlogo I[] = { }, // Itc { - .names = {"Itc"}, + .names = { "Itc" }, .lines = FASTFETCH_DATATEXT_LOGO_ITC, .colors = { FF_COLOR_FG_RED, @@ -2376,7 +2376,7 @@ static const FFlogo I[] = { static const FFlogo J[] = { // Januslinux { - .names = {"januslinux", "janus"}, + .names = { "januslinux", "janus" }, .lines = FASTFETCH_DATATEXT_LOGO_JANUSLINUX, .colors = { FF_COLOR_FG_BLUE, @@ -2392,7 +2392,7 @@ static const FFlogo J[] = { static const FFlogo K[] = { // Kaisen { - .names = {"Kaisen"}, + .names = { "Kaisen" }, .lines = FASTFETCH_DATATEXT_LOGO_KAISEN, .colors = { FF_COLOR_FG_RED, @@ -2403,7 +2403,7 @@ static const FFlogo K[] = { }, // Kali { - .names = {"Kali"}, + .names = { "Kali" }, .lines = FASTFETCH_DATATEXT_LOGO_KALI, .colors = { FF_COLOR_FG_BLUE, @@ -2414,7 +2414,7 @@ static const FFlogo K[] = { }, // KaliSmall { - .names = {"Kali_small"}, + .names = { "Kali_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_KALI_SMALL, .colors = { @@ -2426,7 +2426,7 @@ static const FFlogo K[] = { }, // Kalpa Desktop { - .names = {"kalpa-desktop"}, + .names = { "kalpa-desktop" }, .lines = FASTFETCH_DATATEXT_LOGO_KALPA_DESKTOP, .colors = { FF_COLOR_FG_GREEN, @@ -2436,7 +2436,7 @@ static const FFlogo K[] = { }, // KaOS { - .names = {"KaOS"}, + .names = { "KaOS" }, .lines = FASTFETCH_DATATEXT_LOGO_KAOS, .colors = { FF_COLOR_FG_BLUE, @@ -2446,15 +2446,15 @@ static const FFlogo K[] = { .colorTitle = FF_COLOR_FG_DEFAULT, }, // KernelOS - {.names = {"KernelOS"}, .lines = FASTFETCH_DATATEXT_LOGO_KERNELOS, .colors = { - FF_COLOR_FG_RED, - FF_COLOR_FG_MAGENTA, - }}, + { .names = { "KernelOS" }, .lines = FASTFETCH_DATATEXT_LOGO_KERNELOS, .colors = { + FF_COLOR_FG_RED, + FF_COLOR_FG_MAGENTA, + } }, // KDELinux - {.names = {"kdelinux", "kde-linux"}, .lines = FASTFETCH_DATATEXT_LOGO_KDELINUX, .colors = {FF_COLOR_FG_YELLOW, FF_COLOR_FG_WHITE}}, + { .names = { "kdelinux", "kde-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_KDELINUX, .colors = { FF_COLOR_FG_YELLOW, FF_COLOR_FG_WHITE } }, // KDE Neon { - .names = {"KDE Neon"}, // Distro ID is "neon"; Distro name is "KDE Neon" + .names = { "KDE Neon" }, // Distro ID is "neon"; Distro name is "KDE Neon" .lines = FASTFETCH_DATATEXT_LOGO_KDENEON, .colors = { FF_COLOR_FG_GREEN, @@ -2463,7 +2463,7 @@ static const FFlogo K[] = { }, // Kibojoe { - .names = {"Kibojoe"}, + .names = { "Kibojoe" }, .lines = FASTFETCH_DATATEXT_LOGO_KIBOJOE, .colors = { FF_COLOR_FG_GREEN, @@ -2475,7 +2475,7 @@ static const FFlogo K[] = { }, // KISSLinux { - .names = {"KISS", "kiss-linux", "kisslinux"}, + .names = { "KISS", "kiss-linux", "kisslinux" }, .lines = FASTFETCH_DATATEXT_LOGO_KISS, .colors = { FF_COLOR_FG_MAGENTA, @@ -2487,7 +2487,7 @@ static const FFlogo K[] = { }, // KISSLinux2 { - .names = {"kiss2"}, + .names = { "kiss2" }, .lines = FASTFETCH_DATATEXT_LOGO_KISS2, .colors = { FF_COLOR_FG_BLACK, @@ -2499,7 +2499,7 @@ static const FFlogo K[] = { }, // Kogaion { - .names = {"Kogaion"}, + .names = { "Kogaion" }, .lines = FASTFETCH_DATATEXT_LOGO_KOGAION, .colors = { FF_COLOR_FG_BLUE, @@ -2510,7 +2510,7 @@ static const FFlogo K[] = { }, // Korora { - .names = {"Korora"}, + .names = { "Korora" }, .lines = FASTFETCH_DATATEXT_LOGO_KORORA, .colors = { FF_COLOR_FG_BLUE, @@ -2521,7 +2521,7 @@ static const FFlogo K[] = { }, // KrassOS { - .names = {"KrassOS", "Krass"}, + .names = { "KrassOS", "Krass" }, .lines = FASTFETCH_DATATEXT_LOGO_KRASSOS, .colors = { FF_COLOR_FG_BLUE, @@ -2532,7 +2532,7 @@ static const FFlogo K[] = { }, // KSLinux { - .names = {"KSLinux"}, + .names = { "KSLinux" }, .lines = FASTFETCH_DATATEXT_LOGO_KSLINUX, .colors = { FF_COLOR_FG_BLUE, @@ -2543,7 +2543,7 @@ static const FFlogo K[] = { }, // Kubuntu { - .names = {"Kubuntu", "kubuntu-linux", "kde-ubuntu"}, + .names = { "Kubuntu", "kubuntu-linux", "kde-ubuntu" }, .lines = FASTFETCH_DATATEXT_LOGO_KUBUNTU, .colors = { FF_COLOR_FG_BLUE, @@ -2554,9 +2554,9 @@ static const FFlogo K[] = { }, // Kylin { - .names = {"Kylin", "kylin"}, + .names = { "Kylin", "kylin" }, .lines = FASTFETCH_DATATEXT_LOGO_KYLIN, - .colors = {FF_COLOR_FG_BLUE, FF_COLOR_FG_CYAN, FF_COLOR_FG_WHITE, FF_COLOR_FG_LIGHT_BLACK}, + .colors = { FF_COLOR_FG_BLUE, FF_COLOR_FG_CYAN, FF_COLOR_FG_WHITE, FF_COLOR_FG_LIGHT_BLACK }, .colorKeys = FF_COLOR_FG_BLUE, .colorTitle = FF_COLOR_FG_BLUE, }, @@ -2567,7 +2567,7 @@ static const FFlogo K[] = { static const FFlogo L[] = { // LainOS { - .names = {"LainOS"}, + .names = { "LainOS" }, .lines = FASTFETCH_DATATEXT_LOGO_LAINOS, .colors = { FF_COLOR_FG_BLUE, @@ -2577,7 +2577,7 @@ static const FFlogo L[] = { }, // LangitKetujuh { - .names = {"langitketujuh", "l7"}, + .names = { "langitketujuh", "l7" }, .lines = FASTFETCH_DATATEXT_LOGO_LANGITKETUJUH, .colors = { FF_COLOR_FG_BLUE, @@ -2588,7 +2588,7 @@ static const FFlogo L[] = { }, // Laxeros { - .names = {"Laxeros"}, + .names = { "Laxeros" }, .lines = FASTFETCH_DATATEXT_LOGO_LAXEROS, .colors = { FF_COLOR_FG_BLUE, @@ -2599,7 +2599,7 @@ static const FFlogo L[] = { }, // LEDE { - .names = {"LEDE"}, + .names = { "LEDE" }, .lines = FASTFETCH_DATATEXT_LOGO_LEDE, .colors = { FF_COLOR_FG_BLUE, @@ -2610,7 +2610,7 @@ static const FFlogo L[] = { }, // LibreELEC { - .names = {"LibreELEC"}, + .names = { "LibreELEC" }, .lines = FASTFETCH_DATATEXT_LOGO_LIBREELEC, .colors = { FF_COLOR_FG_GREEN, @@ -2624,7 +2624,7 @@ static const FFlogo L[] = { }, // Lilidog { - .names = {"Lilidog"}, + .names = { "Lilidog" }, .lines = FASTFETCH_DATATEXT_LOGO_LILIDOG, .colors = { FF_COLOR_FG_BLUE, @@ -2634,7 +2634,7 @@ static const FFlogo L[] = { }, // Lingmo OS { - .names = {"Lingmo", "LingmoOS"}, + .names = { "Lingmo", "LingmoOS" }, .lines = FASTFETCH_DATATEXT_LOGO_LINGMO, .colors = { FF_COLOR_FG_BLUE, @@ -2645,7 +2645,7 @@ static const FFlogo L[] = { }, // Linspire { - .names = {"Linspire", "Lindows"}, + .names = { "Linspire", "Lindows" }, .lines = FASTFETCH_DATATEXT_LOGO_LINSPIRE, .colors = { FF_COLOR_FG_BLUE, @@ -2656,7 +2656,7 @@ static const FFlogo L[] = { }, // Linux { - .names = {"Linux", "linux-generic"}, + .names = { "Linux", "linux-generic" }, .lines = FASTFETCH_DATATEXT_LOGO_LINUX, .colors = { FF_COLOR_FG_WHITE, @@ -2668,7 +2668,7 @@ static const FFlogo L[] = { }, // LinuxFromScratch { - .names = {"LinuxFromScratch", "lfs"}, + .names = { "LinuxFromScratch", "lfs" }, .lines = FASTFETCH_DATATEXT_LOGO_LFS, .colors = { FF_COLOR_FG_WHITE, @@ -2680,7 +2680,7 @@ static const FFlogo L[] = { }, // LinuxSmall { - .names = {"Linux_small", "linux-generic_small"}, + .names = { "Linux_small", "linux-generic_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_LINUX_SMALL, .colors = { @@ -2693,7 +2693,7 @@ static const FFlogo L[] = { }, // LinuxLite { - .names = {"LinuxLite"}, + .names = { "LinuxLite" }, .lines = FASTFETCH_DATATEXT_LOGO_LINUXLITE, .colors = { FF_COLOR_FG_GREEN, @@ -2704,7 +2704,7 @@ static const FFlogo L[] = { }, // LinuxLiteSmall { - .names = {"LinuxLite_small"}, + .names = { "LinuxLite_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_LINUXLITE_SMALL, .colors = { @@ -2716,7 +2716,7 @@ static const FFlogo L[] = { }, // LinuxMint { - .names = {"linuxmint"}, + .names = { "linuxmint" }, .lines = FASTFETCH_DATATEXT_LOGO_LINUXMINT, .colors = { FF_COLOR_FG_GREEN, @@ -2727,7 +2727,7 @@ static const FFlogo L[] = { }, // LinuxMintSmall { - .names = {"linuxmint_small"}, + .names = { "linuxmint_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_LINUXMINT_SMALL, .colors = { @@ -2739,7 +2739,7 @@ static const FFlogo L[] = { }, // LinuxMint2 { - .names = {"linuxmint2"}, + .names = { "linuxmint2" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_LINUXMINT2, .colors = { @@ -2751,7 +2751,7 @@ static const FFlogo L[] = { }, // LinuxMintOld { - .names = {"linuxmint_old"}, + .names = { "linuxmint_old" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_LINUXMINT_OLD, .colors = { @@ -2763,7 +2763,7 @@ static const FFlogo L[] = { }, // Live_Raizo { - .names = {"Live Raizo", "Live_Raizo"}, + .names = { "Live Raizo", "Live_Raizo" }, .lines = FASTFETCH_DATATEXT_LOGO_LIVE_RAIZO, .colors = { FF_COLOR_FG_YELLOW, @@ -2773,7 +2773,7 @@ static const FFlogo L[] = { }, // LliureX { - .names = {"LliureX"}, + .names = { "LliureX" }, .lines = FASTFETCH_DATATEXT_LOGO_LLIUREX, .colors = { FF_COLOR_FG_BLUE, @@ -2783,7 +2783,7 @@ static const FFlogo L[] = { }, // LMDE { - .names = {"LMDE"}, + .names = { "LMDE" }, .lines = FASTFETCH_DATATEXT_LOGO_LMDE, .colors = { FF_COLOR_FG_GREEN, @@ -2794,7 +2794,7 @@ static const FFlogo L[] = { }, // Loc-OS { - .names = {"locos", "loc-os", "Loc-OS Linux"}, + .names = { "locos", "loc-os", "Loc-OS Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_LOCOS, .colors = { FF_COLOR_FG_BLACK, @@ -2806,7 +2806,7 @@ static const FFlogo L[] = { }, // Lubuntu { - .names = {"lubuntu"}, + .names = { "lubuntu" }, .lines = FASTFETCH_DATATEXT_LOGO_LUBUNTU, .colors = { FF_COLOR_FG_BLUE, @@ -2815,7 +2815,7 @@ static const FFlogo L[] = { }, // Lunar { - .names = {"Lunar"}, + .names = { "Lunar" }, .lines = FASTFETCH_DATATEXT_LOGO_LUNAR, .colors = { FF_COLOR_FG_BLUE, @@ -2832,7 +2832,7 @@ static const FFlogo L[] = { static const FFlogo M[] = { // Macaroni { - .names = {"Macaroni"}, + .names = { "Macaroni" }, .lines = FASTFETCH_DATATEXT_LOGO_MACARONIOS, .colors = { FF_COLOR_FG_YELLOW, @@ -2843,7 +2843,7 @@ static const FFlogo M[] = { }, // MacOS { - .names = {"macOS"}, + .names = { "macOS" }, .lines = FASTFETCH_DATATEXT_LOGO_MACOS, .colors = { FF_COLOR_FG_GREEN, @@ -2858,7 +2858,7 @@ static const FFlogo M[] = { }, // MacOSSmall { - .names = {"macOS_small"}, + .names = { "macOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MACOS_SMALL, .colors = { @@ -2873,7 +2873,7 @@ static const FFlogo M[] = { }, // MacOS2 { - .names = {"macOS2"}, + .names = { "macOS2" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MACOS2, .colors = { @@ -2889,7 +2889,7 @@ static const FFlogo M[] = { }, // MacOS2Small { - .names = {"macOS2_small"}, + .names = { "macOS2_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MACOS2_SMALL, .colors = { @@ -2904,7 +2904,7 @@ static const FFlogo M[] = { }, // MacOS3 { - .names = {"macOS3"}, + .names = { "macOS3" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MACOS3, .colors = { @@ -2920,7 +2920,7 @@ static const FFlogo M[] = { }, // MainsailOS { - .names = {"MainsailOS"}, + .names = { "MainsailOS" }, .lines = FASTFETCH_DATATEXT_LOGO_MAINSAILOS, .colors = { FF_COLOR_FG_RED, @@ -2928,7 +2928,7 @@ static const FFlogo M[] = { }, // MainsailOSSmall { - .names = {"MainsailOS_small"}, + .names = { "MainsailOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MAINSAILOS_SMALL, .colors = { @@ -2937,7 +2937,7 @@ static const FFlogo M[] = { }, // Mageia { - .names = {"Mageia"}, + .names = { "Mageia" }, .lines = FASTFETCH_DATATEXT_LOGO_MAGEIA, .colors = { FF_COLOR_FG_CYAN, @@ -2948,7 +2948,7 @@ static const FFlogo M[] = { }, // MageiaSmall { - .names = {"Mageia_small"}, + .names = { "Mageia_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MAGEIA_SMALL, .colors = { @@ -2960,7 +2960,7 @@ static const FFlogo M[] = { }, // Magix { - .names = {"Magix", "MagixOS"}, + .names = { "Magix", "MagixOS" }, .lines = FASTFETCH_DATATEXT_LOGO_MAGIX, .colors = { FF_COLOR_FG_LIGHT_MAGENTA, @@ -2971,7 +2971,7 @@ static const FFlogo M[] = { }, // MagpieOS { - .names = {"MagpieOS", "Magpie"}, + .names = { "MagpieOS", "Magpie" }, .lines = FASTFETCH_DATATEXT_LOGO_MAGPIEOS, .colors = { FF_COLOR_FG_GREEN, @@ -2984,7 +2984,7 @@ static const FFlogo M[] = { }, // Mandriva { - .names = {"mandriva", "mandrake"}, + .names = { "mandriva", "mandrake" }, .lines = FASTFETCH_DATATEXT_LOGO_MANDRIVA, .colors = { FF_COLOR_FG_BLUE, @@ -2995,7 +2995,7 @@ static const FFlogo M[] = { }, // Manjaro { - .names = {"manjaro", "manjaro-arm"}, + .names = { "manjaro", "manjaro-arm" }, .lines = FASTFETCH_DATATEXT_LOGO_MANJARO, .colors = { FF_COLOR_FG_GREEN, @@ -3005,7 +3005,7 @@ static const FFlogo M[] = { }, // ManjaroSmall { - .names = {"manjaro_small", "manjaro-arm_small"}, + .names = { "manjaro_small", "manjaro-arm_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MANJARO_SMALL, .colors = { @@ -3016,7 +3016,7 @@ static const FFlogo M[] = { }, // MassOS { - .names = {"MassOS"}, + .names = { "MassOS" }, .lines = FASTFETCH_DATATEXT_LOGO_MASSOS, .colors = { FF_COLOR_FG_DEFAULT, @@ -3026,7 +3026,7 @@ static const FFlogo M[] = { }, // MatuusOS { - .names = {"MatuusOS", "Matuus"}, + .names = { "MatuusOS", "Matuus" }, .lines = FASTFETCH_DATATEXT_LOGO_MATUUSOS, .colors = { FF_COLOR_FG_YELLOW, @@ -3037,7 +3037,7 @@ static const FFlogo M[] = { }, // MaUI { - .names = {"MaUI"}, + .names = { "MaUI" }, .lines = FASTFETCH_DATATEXT_LOGO_MAUI, .colors = { FF_COLOR_FG_CYAN, @@ -3047,7 +3047,7 @@ static const FFlogo M[] = { }, // Mauna { - .names = {"Mauna"}, + .names = { "Mauna" }, .lines = FASTFETCH_DATATEXT_LOGO_MAUNA, .colors = { FF_COLOR_FG_BLUE, @@ -3056,7 +3056,7 @@ static const FFlogo M[] = { }, // Meowix { - .names = {"Meowix"}, + .names = { "Meowix" }, .lines = FASTFETCH_DATATEXT_LOGO_MEOWIX, .colors = { FF_COLOR_FG_RED, @@ -3069,7 +3069,7 @@ static const FFlogo M[] = { }, // Mer { - .names = {"Mer"}, + .names = { "Mer" }, .lines = FASTFETCH_DATATEXT_LOGO_MER, .colors = { FF_COLOR_FG_BLUE, @@ -3079,7 +3079,7 @@ static const FFlogo M[] = { }, // MidnightBSD { - .names = {"MidnightBSD"}, + .names = { "MidnightBSD" }, .lines = FASTFETCH_DATATEXT_LOGO_MIDNIGHTBSD, .colors = { FF_COLOR_FG_DEFAULT, @@ -3089,7 +3089,7 @@ static const FFlogo M[] = { }, // MidOS { - .names = {"MidOS"}, + .names = { "MidOS" }, .lines = FASTFETCH_DATATEXT_LOGO_MIDOS, .colors = { FF_COLOR_FG_LIGHT_BLACK, @@ -3099,7 +3099,7 @@ static const FFlogo M[] = { }, // MidOSOld { - .names = {"MidOS_old"}, + .names = { "MidOS_old" }, .lines = FASTFETCH_DATATEXT_LOGO_MIDOS_OLD, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { @@ -3111,7 +3111,7 @@ static const FFlogo M[] = { }, // Minimal System { - .names = {"Minimal_System"}, + .names = { "Minimal_System" }, .lines = FASTFETCH_DATATEXT_LOGO_MINIMAL, .colors = { FF_COLOR_FG_RED, @@ -3121,7 +3121,7 @@ static const FFlogo M[] = { }, // Minix { - .names = {"Minix"}, + .names = { "Minix" }, .lines = FASTFETCH_DATATEXT_LOGO_MINIX, .colors = { FF_COLOR_FG_RED, @@ -3133,7 +3133,7 @@ static const FFlogo M[] = { }, // MiracleLinux { - .names = {"miraclelinux"}, + .names = { "miraclelinux" }, .lines = FASTFETCH_DATATEXT_LOGO_MIRACLE_LINUX, .colors = { FF_COLOR_FG_256 "29", @@ -3143,7 +3143,7 @@ static const FFlogo M[] = { }, // MOS { - .names = {"MOS"}, + .names = { "MOS" }, .lines = FASTFETCH_DATATEXT_LOGO_MOS, .colors = { FF_COLOR_FG_CYAN, @@ -3152,7 +3152,7 @@ static const FFlogo M[] = { }, // Msys2 { - .names = {"Msys2"}, + .names = { "Msys2" }, .lines = FASTFETCH_DATATEXT_LOGO_MSYS2, .colors = { FF_COLOR_FG_MAGENTA, @@ -3164,7 +3164,7 @@ static const FFlogo M[] = { }, // MX { - .names = {"MX"}, + .names = { "MX" }, .lines = FASTFETCH_DATATEXT_LOGO_MX, .colors = { FF_COLOR_FG_DEFAULT, @@ -3174,7 +3174,7 @@ static const FFlogo M[] = { }, // MXSmall { - .names = {"MX_small"}, + .names = { "MX_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MX_SMALL, .colors = { @@ -3185,7 +3185,7 @@ static const FFlogo M[] = { }, // MX2 { - .names = {"MX2"}, + .names = { "MX2" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MX2, .colors = { @@ -3201,7 +3201,7 @@ static const FFlogo M[] = { static const FFlogo N[] = { // Namib { - .names = {"Namib"}, + .names = { "Namib" }, .lines = FASTFETCH_DATATEXT_LOGO_NAMIB, .colors = { FF_COLOR_FG_RED, @@ -3210,7 +3210,7 @@ static const FFlogo N[] = { }, // Nekos { - .names = {"Nekos"}, + .names = { "Nekos" }, .lines = FASTFETCH_DATATEXT_LOGO_NEKOS, .colors = { FF_COLOR_FG_YELLOW, @@ -3220,7 +3220,7 @@ static const FFlogo N[] = { }, // Neptune { - .names = {"Neptune"}, + .names = { "Neptune" }, .lines = FASTFETCH_DATATEXT_LOGO_NEPTUNE, .colors = { FF_COLOR_FG_WHITE, @@ -3229,7 +3229,7 @@ static const FFlogo N[] = { }, // NetRunner { - .names = {"NetRunner"}, + .names = { "NetRunner" }, .lines = FASTFETCH_DATATEXT_LOGO_NETRUNNER, .colors = { FF_COLOR_FG_BLUE, @@ -3238,7 +3238,7 @@ static const FFlogo N[] = { }, // NexaLinux { - .names = {"nexalinux"}, + .names = { "nexalinux" }, .lines = FASTFETCH_DATATEXT_LOGO_NEXALINUX, .colors = { FF_COLOR_FG_LIGHT_BLUE, @@ -3247,7 +3247,7 @@ static const FFlogo N[] = { }, // Nitrux { - .names = {"Nitrux"}, + .names = { "Nitrux" }, .lines = FASTFETCH_DATATEXT_LOGO_NITRUX, .colors = { FF_COLOR_FG_BLUE, @@ -3256,7 +3256,7 @@ static const FFlogo N[] = { }, // NixOS { - .names = {"NixOS"}, + .names = { "NixOS" }, .lines = FASTFETCH_DATATEXT_LOGO_NIXOS, .colors = { FF_COLOR_FG_BLUE, @@ -3269,7 +3269,7 @@ static const FFlogo N[] = { }, // NixOSSmall { - .names = {"NixOS_small"}, + .names = { "NixOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_NIXOS_SMALL, .colors = { @@ -3283,7 +3283,7 @@ static const FFlogo N[] = { }, // NixOSOld { - .names = {"nixos_old"}, + .names = { "nixos_old" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_NIXOS_OLD, .colors = { @@ -3293,7 +3293,7 @@ static const FFlogo N[] = { }, // NixOsOldSmall { - .names = {"nixos_old_small"}, + .names = { "nixos_old_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_NIXOS_OLD_SMALL, .colors = { @@ -3303,7 +3303,7 @@ static const FFlogo N[] = { }, // NetBSD { - .names = {"NetBSD"}, + .names = { "NetBSD" }, .lines = FASTFETCH_DATATEXT_LOGO_NETBSD, .colors = { FF_COLOR_FG_RED, @@ -3314,7 +3314,7 @@ static const FFlogo N[] = { }, // NetBSD2 { - .names = {"NetBSD2"}, + .names = { "NetBSD2" }, .lines = FASTFETCH_DATATEXT_LOGO_NETBSD2, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { @@ -3326,7 +3326,7 @@ static const FFlogo N[] = { }, // NetBSD Small { - .names = {"NetBSD_small"}, + .names = { "NetBSD_small" }, .lines = FASTFETCH_DATATEXT_LOGO_NETBSD_SMALL, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .colors = { @@ -3338,7 +3338,7 @@ static const FFlogo N[] = { }, // Nobara { - .names = {"nobara"}, + .names = { "nobara" }, .lines = FASTFETCH_DATATEXT_LOGO_NOBARA, .colors = { FF_COLOR_FG_DEFAULT, @@ -3348,7 +3348,7 @@ static const FFlogo N[] = { }, // NomadBSD { - .names = {"nomadbsd"}, + .names = { "nomadbsd" }, .lines = FASTFETCH_DATATEXT_LOGO_NOMADBSD, .colors = { FF_COLOR_FG_BLUE, @@ -3358,7 +3358,7 @@ static const FFlogo N[] = { }, // NurOS { - .names = {"NurOS"}, + .names = { "NurOS" }, .lines = FASTFETCH_DATATEXT_LOGO_NUROS, .colors = { FF_COLOR_FG_BLUE, @@ -3367,7 +3367,7 @@ static const FFlogo N[] = { }, // Nurunner { - .names = {"Nurunner"}, + .names = { "Nurunner" }, .lines = FASTFETCH_DATATEXT_LOGO_NURUNNER, .colors = { FF_COLOR_FG_BLUE, @@ -3376,7 +3376,7 @@ static const FFlogo N[] = { }, // NuTyX { - .names = {"NuTyX"}, + .names = { "NuTyX" }, .lines = FASTFETCH_DATATEXT_LOGO_NUTYX, .colors = { FF_COLOR_FG_BLUE, @@ -3385,7 +3385,7 @@ static const FFlogo N[] = { }, // NetHydra { - .names = {"NetHydra"}, + .names = { "NetHydra" }, .lines = FASTFETCH_DATATEXT_LOGO_NETHYDRA, .colors = { FF_COLOR_FG_RED, @@ -3399,7 +3399,7 @@ static const FFlogo N[] = { static const FFlogo O[] = { // Obarun { - .names = {"Obarun"}, + .names = { "Obarun" }, .lines = FASTFETCH_DATATEXT_LOGO_OBARUN, .colors = { FF_COLOR_FG_CYAN, @@ -3408,7 +3408,7 @@ static const FFlogo O[] = { }, // OBRevenge { - .names = {"OBRevenge"}, + .names = { "OBRevenge" }, .lines = FASTFETCH_DATATEXT_LOGO_OBREVENGE, .colors = { FF_COLOR_FG_RED, @@ -3417,7 +3417,7 @@ static const FFlogo O[] = { }, // ObsidianOS { - .names = {"ObsidianOS"}, + .names = { "ObsidianOS" }, .lines = FASTFETCH_DATATEXT_LOGO_OBSIDIANOS, .colors = { FF_COLOR_FG_MAGENTA, @@ -3426,14 +3426,14 @@ static const FFlogo O[] = { }, }, // OmniOS - {.names = {"OmniOS"}, .lines = FASTFETCH_DATATEXT_LOGO_OMNIOS, .colors = { - FF_COLOR_FG_WHITE, - FF_COLOR_FG_YELLOW, - FF_COLOR_FG_LIGHT_BLACK, - }}, + { .names = { "OmniOS" }, .lines = FASTFETCH_DATATEXT_LOGO_OMNIOS, .colors = { + FF_COLOR_FG_WHITE, + FF_COLOR_FG_YELLOW, + FF_COLOR_FG_LIGHT_BLACK, + } }, // OpenKylin { - .names = {"openkylin", "open-kylin"}, + .names = { "openkylin", "open-kylin" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENKYLIN, .colors = { FF_COLOR_FG_GREEN, @@ -3444,7 +3444,7 @@ static const FFlogo O[] = { }, // OpenBSD { - .names = {"openbsd"}, + .names = { "openbsd" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENBSD, .colors = { FF_COLOR_FG_YELLOW, @@ -3458,7 +3458,7 @@ static const FFlogo O[] = { }, // OpenBSDSmall { - .names = {"openbsd_small"}, + .names = { "openbsd_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_OPENBSD_SMALL, .colors = { @@ -3470,7 +3470,7 @@ static const FFlogo O[] = { }, // OpenEuler { - .names = {"OpenEuler"}, + .names = { "OpenEuler" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENEULER, .colors = { FF_COLOR_FG_BLUE, @@ -3479,7 +3479,7 @@ static const FFlogo O[] = { }, // OpenIndiana { - .names = {"OpenIndiana"}, + .names = { "OpenIndiana" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENINDIANA, .colors = { FF_COLOR_FG_BLUE, @@ -3488,7 +3488,7 @@ static const FFlogo O[] = { }, // OpenMamba { - .names = {"OpenMamba"}, + .names = { "OpenMamba" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENMAMBA, .colors = { FF_COLOR_FG_WHITE, @@ -3497,7 +3497,7 @@ static const FFlogo O[] = { }, // OpenStage { - .names = {"OpenStage"}, + .names = { "OpenStage" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSTAGE, .colors = { FF_COLOR_FG_GREEN, @@ -3506,7 +3506,7 @@ static const FFlogo O[] = { }, // OpenSuse { - .names = {"opensuse"}, + .names = { "opensuse" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE, .colors = { FF_COLOR_FG_GREEN, @@ -3517,7 +3517,7 @@ static const FFlogo O[] = { }, // OpenSuseSmall { - .names = {"opensuse_small"}, + .names = { "opensuse_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_SMALL, .colors = { @@ -3528,7 +3528,7 @@ static const FFlogo O[] = { }, // openSuseMicroOS { - .names = {"opensuse-microos"}, + .names = { "opensuse-microos" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_MICROOS, .colors = { FF_COLOR_FG_GREEN, @@ -3536,7 +3536,7 @@ static const FFlogo O[] = { }, // OpenSuseLeap { - .names = {"opensuse-leap"}, + .names = { "opensuse-leap" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_LEAP, .colors = { FF_COLOR_FG_DEFAULT, @@ -3546,7 +3546,7 @@ static const FFlogo O[] = { }, // OpenSuseLeapOld { - .names = {"opensuse-leap_old"}, + .names = { "opensuse-leap_old" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_LEAP_OLD, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { @@ -3557,7 +3557,7 @@ static const FFlogo O[] = { }, // OpenSuseTumbleweed { - .names = {"opensuse-tumbleweed"}, + .names = { "opensuse-tumbleweed" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_TUMBLEWEED, .colors = { FF_COLOR_FG_DEFAULT, @@ -3567,7 +3567,7 @@ static const FFlogo O[] = { }, // OpenSuseTumbleweedSmall { - .names = {"opensuse-tumbleweed_small"}, + .names = { "opensuse-tumbleweed_small" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_TUMBLEWEED_SMALL, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .colors = { @@ -3578,7 +3578,7 @@ static const FFlogo O[] = { }, // OpenSuseTumbleweedOld { - .names = {"opensuse-tumbleweed_old"}, + .names = { "opensuse-tumbleweed_old" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_TUMBLEWEED_OLD, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { @@ -3589,7 +3589,7 @@ static const FFlogo O[] = { }, // OpenSuseTumbleweed2 { - .names = {"opensuse-tumbleweed2"}, + .names = { "opensuse-tumbleweed2" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_TUMBLEWEED2, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { @@ -3600,7 +3600,7 @@ static const FFlogo O[] = { }, // openSUSESlowroll { - .names = {"opensuse-slowroll", "opensuse-tumbleweed-slowroll"}, + .names = { "opensuse-slowroll", "opensuse-tumbleweed-slowroll" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_SLOWROLL, .colors = { FF_COLOR_FG_DEFAULT, @@ -3610,7 +3610,7 @@ static const FFlogo O[] = { }, // OpenMandriva { - .names = {"openmandriva", "open-mandriva", "open_mandriva", "openmandriva lx"}, + .names = { "openmandriva", "open-mandriva", "open_mandriva", "openmandriva lx" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENMANDRIVA, .colors = { FF_COLOR_FG_BLUE, @@ -3620,7 +3620,7 @@ static const FFlogo O[] = { }, // OpenWrt { - .names = {"openwrt"}, + .names = { "openwrt" }, .lines = FASTFETCH_DATATEXT_LOGO_OPENWRT, .colors = { FF_COLOR_FG_BLUE, @@ -3630,7 +3630,7 @@ static const FFlogo O[] = { }, // OPNsense { - .names = {"OPNsense"}, + .names = { "OPNsense" }, .lines = FASTFETCH_DATATEXT_LOGO_OPNSENSE, .colors = { FF_COLOR_FG_WHITE, @@ -3639,7 +3639,7 @@ static const FFlogo O[] = { }, // Oracle { - .names = {"oracle", "oracle linux", "oracle linux server"}, + .names = { "oracle", "oracle linux", "oracle linux server" }, .lines = FASTFETCH_DATATEXT_LOGO_ORACLE, .colors = { FF_COLOR_FG_RED, @@ -3649,7 +3649,7 @@ static const FFlogo O[] = { }, // Orchid { - .names = {"orchid"}, + .names = { "orchid" }, .lines = FASTFETCH_DATATEXT_LOGO_ORCHID, .colors = { FF_COLOR_FG_WHITE, @@ -3661,7 +3661,7 @@ static const FFlogo O[] = { }, // OrchidSmall { - .names = {"orchid_small"}, + .names = { "orchid_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ORCHID_SMALL, .colors = { @@ -3674,7 +3674,7 @@ static const FFlogo O[] = { }, // Oreon { - .names = {"Oreon"}, + .names = { "Oreon" }, .lines = FASTFETCH_DATATEXT_LOGO_OREON, .colors = { FF_COLOR_FG_DEFAULT, @@ -3682,13 +3682,13 @@ static const FFlogo O[] = { }, }, // OS/2 Warp - {.names = {"OS2Warp"}, .lines = FASTFETCH_DATATEXT_LOGO_OS2WARP, .colors = { - FF_COLOR_FG_LIGHT_WHITE, - FF_COLOR_FG_LIGHT_BLUE, - }}, + { .names = { "OS2Warp" }, .lines = FASTFETCH_DATATEXT_LOGO_OS2WARP, .colors = { + FF_COLOR_FG_LIGHT_WHITE, + FF_COLOR_FG_LIGHT_BLUE, + } }, // OS_Elbrus { - .names = {"OS Elbrus"}, + .names = { "OS Elbrus" }, .lines = FASTFETCH_DATATEXT_LOGO_OS_ELBRUS, .colors = { FF_COLOR_FG_BLUE, @@ -3697,7 +3697,7 @@ static const FFlogo O[] = { }, // OSMC { - .names = {"OSMC", "Open Source Media Center"}, + .names = { "OSMC", "Open Source Media Center" }, .lines = FASTFETCH_DATATEXT_LOGO_OSMC, .colors = { FF_COLOR_FG_BLUE, @@ -3706,7 +3706,7 @@ static const FFlogo O[] = { }, // OSX { - .names = {"OSX"}, + .names = { "OSX" }, .lines = FASTFETCH_DATATEXT_LOGO_MACOS, .colors = { FF_COLOR_FG_GREEN, @@ -3721,7 +3721,7 @@ static const FFlogo O[] = { }, // OSXSmall { - .names = {"OSX_small"}, + .names = { "OSX_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_MACOS_SMALL, .colors = { @@ -3741,7 +3741,7 @@ static const FFlogo O[] = { static const FFlogo P[] = { // PacBSD { - .names = {"PacBSD"}, + .names = { "PacBSD" }, .lines = FASTFETCH_DATATEXT_LOGO_PACBSD, .colors = { FF_COLOR_FG_RED, @@ -3750,7 +3750,7 @@ static const FFlogo P[] = { }, // Panwah { - .names = {"Panwah"}, + .names = { "Panwah" }, .lines = FASTFETCH_DATATEXT_LOGO_PANWAH, .colors = { FF_COLOR_FG_WHITE, @@ -3760,7 +3760,7 @@ static const FFlogo P[] = { }, // Parabola { - .names = {"parabola", "parabola-gnulinux"}, + .names = { "parabola", "parabola-gnulinux" }, .lines = FASTFETCH_DATATEXT_LOGO_PARABOLA, .colors = { FF_COLOR_FG_MAGENTA, @@ -3770,7 +3770,7 @@ static const FFlogo P[] = { }, // ParabolaSmall { - .names = {"parabola_small", "parabola-gnulinux_small"}, + .names = { "parabola_small", "parabola-gnulinux_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_PARABOLA_SMALL, .colors = { @@ -3781,7 +3781,7 @@ static const FFlogo P[] = { }, // Parch { - .names = {"Parch"}, + .names = { "Parch" }, .lines = FASTFETCH_DATATEXT_LOGO_PARCH, .colors = { FF_COLOR_FG_BLUE, @@ -3791,7 +3791,7 @@ static const FFlogo P[] = { }, // Pardus { - .names = {"Pardus"}, + .names = { "Pardus" }, .lines = FASTFETCH_DATATEXT_LOGO_PARDUS, .colors = { FF_COLOR_FG_BLUE, @@ -3800,7 +3800,7 @@ static const FFlogo P[] = { }, // Parrot { - .names = {"Parrot"}, + .names = { "Parrot" }, .lines = FASTFETCH_DATATEXT_LOGO_PARROT, .colors = { FF_COLOR_FG_CYAN, @@ -3809,7 +3809,7 @@ static const FFlogo P[] = { }, // Parsix { - .names = {"Parsix"}, + .names = { "Parsix" }, .lines = FASTFETCH_DATATEXT_LOGO_PARSIX, .colors = { FF_COLOR_FG_YELLOW, @@ -3820,7 +3820,7 @@ static const FFlogo P[] = { }, // PCBSD { - .names = {"PCBSD", "TrueOS"}, + .names = { "PCBSD", "TrueOS" }, .lines = FASTFETCH_DATATEXT_LOGO_PCBSD, .colors = { FF_COLOR_FG_RED, @@ -3829,7 +3829,7 @@ static const FFlogo P[] = { }, // PCLinuxOS { - .names = {"PCLinuxOS"}, + .names = { "PCLinuxOS" }, .lines = FASTFETCH_DATATEXT_LOGO_PCLINUXOS, .colors = { FF_COLOR_FG_BLUE, @@ -3838,7 +3838,7 @@ static const FFlogo P[] = { }, // PearOS { - .names = {"PearOS"}, + .names = { "PearOS" }, .lines = FASTFETCH_DATATEXT_LOGO_PEAROS, .colors = { FF_COLOR_FG_GREEN, @@ -3850,7 +3850,7 @@ static const FFlogo P[] = { }, // Pengwin { - .names = {"Pengwin"}, + .names = { "Pengwin" }, .lines = FASTFETCH_DATATEXT_LOGO_PENGWIN, .colors = { FF_COLOR_FG_MAGENTA, @@ -3860,7 +3860,7 @@ static const FFlogo P[] = { }, // Pentoo { - .names = {"Pentoo"}, + .names = { "Pentoo" }, .lines = FASTFETCH_DATATEXT_LOGO_PENTOO, .colors = { FF_COLOR_FG_MAGENTA, @@ -3869,7 +3869,7 @@ static const FFlogo P[] = { }, // Peppermint { - .names = {"Peppermint"}, + .names = { "Peppermint" }, .lines = FASTFETCH_DATATEXT_LOGO_PEPPERMINT, .colors = { FF_COLOR_FG_RED, @@ -3878,13 +3878,13 @@ static const FFlogo P[] = { }, // Peropesis { - .names = {"Peropesis", "Peropesis Linux"}, + .names = { "Peropesis", "Peropesis Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_PEROPESIS, - .colors = {FF_COLOR_FG_WHITE}, + .colors = { FF_COLOR_FG_WHITE }, }, // PhyOS { - .names = {"PhyOS"}, + .names = { "PhyOS" }, .lines = FASTFETCH_DATATEXT_LOGO_PHYOS, .colors = { FF_COLOR_FG_BLUE, @@ -3893,7 +3893,7 @@ static const FFlogo P[] = { }, // PikaOS { - .names = {"PikaOS"}, + .names = { "PikaOS" }, .lines = FASTFETCH_DATATEXT_LOGO_PIKAOS, .colors = { FF_COLOR_FG_YELLOW, @@ -3901,7 +3901,7 @@ static const FFlogo P[] = { }, // PisiLinux { - .names = {"PisiLinux"}, + .names = { "PisiLinux" }, .lines = FASTFETCH_DATATEXT_LOGO_PISI, .colors = { FF_COLOR_FG_BLUE, @@ -3910,13 +3910,13 @@ static const FFlogo P[] = { }, // PNMLinux { - .names = {"PNM Linux"}, + .names = { "PNM Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_PNM_LINUX, - .colors = {FF_COLOR_FG_BLUE, FF_COLOR_FG_RED, FF_COLOR_FG_WHITE, FF_COLOR_FG_256 "202"}, + .colors = { FF_COLOR_FG_BLUE, FF_COLOR_FG_RED, FF_COLOR_FG_WHITE, FF_COLOR_FG_256 "202" }, }, // Pop { - .names = {"pop", "popos"}, + .names = { "pop", "popos" }, .lines = FASTFETCH_DATATEXT_LOGO_POP, .colors = { FF_COLOR_FG_CYAN, @@ -3927,7 +3927,7 @@ static const FFlogo P[] = { }, // PopSmall { - .names = {"pop_small", "popos_small"}, + .names = { "pop_small", "popos_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_POP_SMALL, .colors = { @@ -3938,7 +3938,7 @@ static const FFlogo P[] = { }, // Porteus { - .names = {"Porteus"}, + .names = { "Porteus" }, .lines = FASTFETCH_DATATEXT_LOGO_PORTEUS, .colors = { FF_COLOR_FG_CYAN, @@ -3947,7 +3947,7 @@ static const FFlogo P[] = { }, // PostMarketOS { - .names = {"PostMarketOS"}, + .names = { "PostMarketOS" }, .lines = FASTFETCH_DATATEXT_LOGO_POSTMARKETOS, .colors = { FF_COLOR_FG_GREEN, @@ -3956,7 +3956,7 @@ static const FFlogo P[] = { }, // PostMarketOSSmall { - .names = {"PostMarketOS_small"}, + .names = { "PostMarketOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_POSTMARKETOS_SMALL, .colors = { @@ -3966,15 +3966,15 @@ static const FFlogo P[] = { }, // Proxmox { - .names = {"Proxmox", "pve"}, + .names = { "Proxmox", "pve" }, .lines = FASTFETCH_DATATEXT_LOGO_PROXMOX, - .colors = {FF_COLOR_FG_WHITE, FF_COLOR_FG_256 "202"}, + .colors = { FF_COLOR_FG_WHITE, FF_COLOR_FG_256 "202" }, .colorKeys = FF_COLOR_FG_DEFAULT, .colorTitle = FF_COLOR_FG_256 "202", }, // PuffOS { - .names = {"PuffOS"}, + .names = { "PuffOS" }, .lines = FASTFETCH_DATATEXT_LOGO_PUFFOS, .colors = { FF_COLOR_FG_YELLOW, @@ -3983,7 +3983,7 @@ static const FFlogo P[] = { }, // Puppy { - .names = {"Puppy"}, + .names = { "Puppy" }, .lines = FASTFETCH_DATATEXT_LOGO_PUPPY, .colors = { FF_COLOR_FG_BLUE, @@ -3992,7 +3992,7 @@ static const FFlogo P[] = { }, // PureOS { - .names = {"PureOS"}, + .names = { "PureOS" }, .lines = FASTFETCH_DATATEXT_LOGO_PUREOS, .colors = { FF_COLOR_FG_GREEN, @@ -4001,7 +4001,7 @@ static const FFlogo P[] = { }, // PureOSSmall { - .names = {"PureOS_small"}, + .names = { "PureOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_PUREOS_SMALL, .colors = { @@ -4011,7 +4011,7 @@ static const FFlogo P[] = { }, // PrismLinux { - .names = {"PrismLinux"}, + .names = { "PrismLinux" }, .lines = FASTFETCH_DATATEXT_LOGO_PRISMLINUX, .colors = { FF_COLOR_FG_BLUE, @@ -4020,7 +4020,7 @@ static const FFlogo P[] = { }, // PrismLinuxSmall { - .names = {"PrismLinux_small"}, + .names = { "PrismLinux_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_PRISMLINUX_SMALL, .colors = { @@ -4035,7 +4035,7 @@ static const FFlogo P[] = { static const FFlogo Q[] = { // QTS { - .names = {"qts"}, + .names = { "qts" }, .lines = FASTFETCH_DATATEXT_LOGO_QTS, .colors = { FF_COLOR_FG_BLUE, @@ -4046,7 +4046,7 @@ static const FFlogo Q[] = { }, // Q4OS { - .names = {"Q4OS"}, + .names = { "Q4OS" }, .lines = FASTFETCH_DATATEXT_LOGO_Q4OS, .colors = { FF_COLOR_FG_BLUE, @@ -4055,7 +4055,7 @@ static const FFlogo Q[] = { }, // Qubes { - .names = {"Qubes"}, + .names = { "Qubes" }, .lines = FASTFETCH_DATATEXT_LOGO_QUBES, .colors = { FF_COLOR_FG_BLUE, @@ -4064,7 +4064,7 @@ static const FFlogo Q[] = { }, // Qubyt { - .names = {"Qubyt"}, + .names = { "Qubyt" }, .lines = FASTFETCH_DATATEXT_LOGO_QUBYT, .colors = { FF_COLOR_FG_BLUE, @@ -4074,7 +4074,7 @@ static const FFlogo Q[] = { }, // Quibian { - .names = {"Quibian"}, + .names = { "Quibian" }, .lines = FASTFETCH_DATATEXT_LOGO_QUIBIAN, .colors = { FF_COLOR_FG_YELLOW, @@ -4083,7 +4083,7 @@ static const FFlogo Q[] = { }, // Quirinux { - .names = {"Quirinux"}, + .names = { "Quirinux" }, .lines = FASTFETCH_DATATEXT_LOGO_QUIRINUX, .colors = { FF_COLOR_FG_WHITE, @@ -4097,7 +4097,7 @@ static const FFlogo Q[] = { static const FFlogo R[] = { // Radix { - .names = {"Radix"}, + .names = { "Radix" }, .lines = FASTFETCH_DATATEXT_LOGO_RADIX, .colors = { FF_COLOR_FG_GREEN, @@ -4106,7 +4106,7 @@ static const FFlogo R[] = { }, // Raspbian { - .names = {"raspbian"}, + .names = { "raspbian" }, .lines = FASTFETCH_DATATEXT_LOGO_RASPBIAN, .colors = { FF_COLOR_FG_RED, @@ -4117,7 +4117,7 @@ static const FFlogo R[] = { }, // RaspbianSmall { - .names = {"raspbian_small"}, + .names = { "raspbian_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_RASPBIAN_SMALL, .colors = { @@ -4129,7 +4129,7 @@ static const FFlogo R[] = { }, // RavynOS { - .names = {"RavynOS"}, + .names = { "RavynOS" }, .lines = FASTFETCH_DATATEXT_LOGO_RAVYNOS, .colors = { FF_COLOR_FG_256 "15", @@ -4138,7 +4138,7 @@ static const FFlogo R[] = { }, // RebornOS { - .names = {"RebornOS"}, + .names = { "RebornOS" }, .lines = FASTFETCH_DATATEXT_LOGO_REBORNOS, .colors = { FF_COLOR_FG_BLACK, @@ -4150,7 +4150,7 @@ static const FFlogo R[] = { }, // RebornSmall { - .names = {"RebornOS_small"}, + .names = { "RebornOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_REBORNOS_SMALL, .colors = { @@ -4161,7 +4161,7 @@ static const FFlogo R[] = { }, // RedCore { - .names = {"RedCore"}, + .names = { "RedCore" }, .lines = FASTFETCH_DATATEXT_LOGO_REDCORE, .colors = { FF_COLOR_FG_RED, @@ -4170,7 +4170,7 @@ static const FFlogo R[] = { }, // RedHatEnterpriseLinux { - .names = {"rhel", "redhat"}, + .names = { "rhel", "redhat" }, .lines = FASTFETCH_DATATEXT_LOGO_RHEL, .colors = { FF_COLOR_FG_RED, @@ -4180,7 +4180,7 @@ static const FFlogo R[] = { }, // RedHatEnterpriseLinux { - .names = {"rhel_small", "redhat_small"}, + .names = { "rhel_small", "redhat_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_RHEL_SMALL, .colors = { @@ -4191,7 +4191,7 @@ static const FFlogo R[] = { }, // RedHatEnterpriseLinux_old { - .names = {"rhel_old", "redhat_old"}, + .names = { "rhel_old", "redhat_old" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_RHEL_OLD, .colors = { @@ -4201,7 +4201,7 @@ static const FFlogo R[] = { }, // RedOS { - .names = {"RedOS"}, + .names = { "RedOS" }, .lines = FASTFETCH_DATATEXT_LOGO_REDOS, .colors = { FF_COLOR_FG_RED, @@ -4212,7 +4212,7 @@ static const FFlogo R[] = { }, // RedOS small { - .names = {"RedOS_small"}, + .names = { "RedOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_REDOS_SMALL, .colors = { @@ -4224,7 +4224,7 @@ static const FFlogo R[] = { }, // RedstarOS { - .names = {"redstar", "redstar-os", "redstaros"}, + .names = { "redstar", "redstar-os", "redstaros" }, .lines = FASTFETCH_DATATEXT_LOGO_REDSTAR, .colors = { FF_COLOR_FG_RED, @@ -4234,7 +4234,7 @@ static const FFlogo R[] = { }, // Refracta { - .names = {"Refracta"}, + .names = { "Refracta" }, .lines = FASTFETCH_DATATEXT_LOGO_REFRACTA, .colors = { FF_COLOR_FG_WHITE, @@ -4245,7 +4245,7 @@ static const FFlogo R[] = { }, // Regata { - .names = {"Regata"}, + .names = { "Regata" }, .lines = FASTFETCH_DATATEXT_LOGO_REGATA, .colors = { FF_COLOR_FG_WHITE, @@ -4258,7 +4258,7 @@ static const FFlogo R[] = { }, // Regolith { - .names = {"Regolith"}, + .names = { "Regolith" }, .lines = FASTFETCH_DATATEXT_LOGO_REGOLITH, .colors = { FF_COLOR_FG_RED, @@ -4267,7 +4267,7 @@ static const FFlogo R[] = { }, // RhaymOS { - .names = {"RhaymOS"}, + .names = { "RhaymOS" }, .lines = FASTFETCH_DATATEXT_LOGO_RHAYMOS, .colors = { FF_COLOR_FG_RED, @@ -4276,7 +4276,7 @@ static const FFlogo R[] = { }, // RockyLinux { - .names = {"rocky"}, + .names = { "rocky" }, .lines = FASTFETCH_DATATEXT_LOGO_ROCKY, .colors = { FF_COLOR_FG_GREEN, @@ -4286,7 +4286,7 @@ static const FFlogo R[] = { }, // RockyLinuxSmall { - .names = {"rocky_small"}, + .names = { "rocky_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_ROCKY_SMALL, .colors = { @@ -4297,7 +4297,7 @@ static const FFlogo R[] = { }, // RosaLinux { - .names = {"rosa", "rosa-linux", "rosalinux"}, + .names = { "rosa", "rosa-linux", "rosalinux" }, .lines = FASTFETCH_DATATEXT_LOGO_ROSA, .colors = { FF_COLOR_FG_RGB "250;250;250", @@ -4308,7 +4308,7 @@ static const FFlogo R[] = { }, // RhinoLinux { - .names = {"Rhino Linux"}, + .names = { "Rhino Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_RHINO, .colors = { FF_COLOR_FG_MAGENTA, @@ -4320,7 +4320,7 @@ static const FFlogo R[] = { .colorTitle = FF_COLOR_FG_MAGENTA, }, { - .names = {"RengeOS"}, + .names = { "RengeOS" }, .lines = FASTFETCH_DATATEXT_LOGO_RENGEOS, .colors = { FF_COLOR_FG_MAGENTA, @@ -4334,7 +4334,7 @@ static const FFlogo R[] = { static const FFlogo S[] = { // Sabayon { - .names = {"Sabayon"}, + .names = { "Sabayon" }, .lines = FASTFETCH_DATATEXT_LOGO_SABAYON, .colors = { FF_COLOR_FG_BLUE, @@ -4343,7 +4343,7 @@ static const FFlogo S[] = { }, // Sabotage { - .names = {"Sabotage"}, + .names = { "Sabotage" }, .lines = FASTFETCH_DATATEXT_LOGO_SABOTAGE, .colors = { FF_COLOR_FG_DEFAULT, @@ -4353,7 +4353,7 @@ static const FFlogo S[] = { }, // Sailfish { - .names = {"Sailfish"}, + .names = { "Sailfish" }, .lines = FASTFETCH_DATATEXT_LOGO_SAILFISH, .colors = { FF_COLOR_FG_BLUE, @@ -4362,7 +4362,7 @@ static const FFlogo S[] = { }, // SalentOS { - .names = {"SalentOS"}, + .names = { "SalentOS" }, .lines = FASTFETCH_DATATEXT_LOGO_SALENTOS, .colors = { FF_COLOR_FG_GREEN, @@ -4373,7 +4373,7 @@ static const FFlogo S[] = { }, // SalientOS { - .names = {"Salient OS", "SalientOS"}, + .names = { "Salient OS", "SalientOS" }, .lines = FASTFETCH_DATATEXT_LOGO_SALIENTOS, .colors = { FF_COLOR_FG_CYAN, @@ -4382,7 +4382,7 @@ static const FFlogo S[] = { }, // Salix { - .names = {"Salix"}, + .names = { "Salix" }, .lines = FASTFETCH_DATATEXT_LOGO_SALIX, .colors = { FF_COLOR_FG_GREEN, @@ -4391,7 +4391,7 @@ static const FFlogo S[] = { }, // SambaBOX { - .names = {"SambaBOX", "Profelis SambaBOX"}, + .names = { "SambaBOX", "Profelis SambaBOX" }, .lines = FASTFETCH_DATATEXT_LOGO_SAMBABOX, .colors = { FF_COLOR_FG_YELLOW, @@ -4400,7 +4400,7 @@ static const FFlogo S[] = { }, // Sasanqua { - .names = {"Sasanqua"}, + .names = { "Sasanqua" }, .lines = FASTFETCH_DATATEXT_LOGO_SASANQUA, .colors = { FF_COLOR_FG_MAGENTA, @@ -4409,7 +4409,7 @@ static const FFlogo S[] = { }, // Scientific { - .names = {"Scientific"}, + .names = { "Scientific" }, .lines = FASTFETCH_DATATEXT_LOGO_SCIENTIFIC, .colors = { FF_COLOR_FG_BLUE, @@ -4419,7 +4419,7 @@ static const FFlogo S[] = { }, // Secureblue { - .names = {"secureblue"}, + .names = { "secureblue" }, .lines = FASTFETCH_DATATEXT_LOGO_SECUREBLUE, .colors = { FF_COLOR_FG_BLUE, @@ -4429,7 +4429,7 @@ static const FFlogo S[] = { }, // Serpent OS { - .names = {"Serpent OS"}, + .names = { "Serpent OS" }, .lines = FASTFETCH_DATATEXT_LOGO_SERPENT_OS, .colors = { FF_COLOR_FG_DEFAULT, @@ -4437,7 +4437,7 @@ static const FFlogo S[] = { }, // Semc { - .names = {"semc"}, + .names = { "semc" }, .lines = FASTFETCH_DATATEXT_LOGO_SEMC, .colors = { FF_COLOR_FG_GREEN, @@ -4447,7 +4447,7 @@ static const FFlogo S[] = { }, // Septor { - .names = {"Septor"}, + .names = { "Septor" }, .lines = FASTFETCH_DATATEXT_LOGO_SEPTOR, .colors = { FF_COLOR_FG_BLUE, @@ -4457,7 +4457,7 @@ static const FFlogo S[] = { }, // Serene { - .names = {"Serene"}, + .names = { "Serene" }, .lines = FASTFETCH_DATATEXT_LOGO_SERENE, .colors = { FF_COLOR_FG_CYAN, @@ -4466,7 +4466,7 @@ static const FFlogo S[] = { }, // SharkLinux { - .names = {"SharkLinux"}, + .names = { "SharkLinux" }, .lines = FASTFETCH_DATATEXT_LOGO_SHARKLINUX, .colors = { FF_COLOR_FG_BLUE, @@ -4475,7 +4475,7 @@ static const FFlogo S[] = { }, // ShastraOS { - .names = {"ShastraOS"}, + .names = { "ShastraOS" }, .lines = FASTFETCH_DATATEXT_LOGO_SHASTRAOS, .colors = { FF_COLOR_FG_CYAN, @@ -4484,7 +4484,7 @@ static const FFlogo S[] = { }, // Shebang { - .names = {"Shebang"}, + .names = { "Shebang" }, .lines = FASTFETCH_DATATEXT_LOGO_SHEBANG, .colors = { FF_COLOR_FG_WHITE, @@ -4492,13 +4492,13 @@ static const FFlogo S[] = { }, }, // Siduction - {.names = {"Siduction"}, .lines = FASTFETCH_DATATEXT_LOGO_SIDUCTION, .colors = { - FF_COLOR_FG_BLUE, - FF_COLOR_FG_WHITE, - }}, + { .names = { "Siduction" }, .lines = FASTFETCH_DATATEXT_LOGO_SIDUCTION, .colors = { + FF_COLOR_FG_BLUE, + FF_COLOR_FG_WHITE, + } }, // SkiffOS { - .names = {"SkiffOS"}, + .names = { "SkiffOS" }, .lines = FASTFETCH_DATATEXT_LOGO_SKIFFOS, .colors = { FF_COLOR_FG_BLUE, @@ -4506,18 +4506,18 @@ static const FFlogo S[] = { }, }, // SleeperOS - {.names = {"SleeperOS"}, .lines = FASTFETCH_DATATEXT_LOGO_SLEEPEROS, .colors = { - FF_COLOR_FG_CYAN, - FF_COLOR_FG_WHITE, - }}, + { .names = { "SleeperOS" }, .lines = FASTFETCH_DATATEXT_LOGO_SLEEPEROS, .colors = { + FF_COLOR_FG_CYAN, + FF_COLOR_FG_WHITE, + } }, // SleeperOS - {.names = {"SleeperOS_small"}, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_SLEEPEROS_SMALL, .colors = { - FF_COLOR_FG_CYAN, - FF_COLOR_FG_WHITE, - }}, + { .names = { "SleeperOS_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_SLEEPEROS_SMALL, .colors = { + FF_COLOR_FG_CYAN, + FF_COLOR_FG_WHITE, + } }, // Slitaz { - .names = {"Slitaz"}, + .names = { "Slitaz" }, .lines = FASTFETCH_DATATEXT_LOGO_SLITAZ, .colors = { FF_COLOR_FG_YELLOW, @@ -4526,7 +4526,7 @@ static const FFlogo S[] = { }, // SpoinkOS { - .names = {"SpoinkOS", "spoink-os"}, + .names = { "SpoinkOS", "spoink-os" }, .lines = FASTFETCH_DATATEXT_LOGO_SPOINKOS, .colors = { FF_COLOR_FG_GREEN, @@ -4534,7 +4534,7 @@ static const FFlogo S[] = { }, // Slackel { - .names = {"Slackel"}, + .names = { "Slackel" }, .lines = FASTFETCH_DATATEXT_LOGO_SLACKEL, .colors = { FF_COLOR_FG_YELLOW, @@ -4543,7 +4543,7 @@ static const FFlogo S[] = { }, // Slackware { - .names = {"Slackware"}, + .names = { "Slackware" }, .lines = FASTFETCH_DATATEXT_LOGO_SLACKWARE, .colors = { FF_COLOR_FG_BLUE, @@ -4554,7 +4554,7 @@ static const FFlogo S[] = { }, // SlackwareSmall { - .names = {"Slackware_small"}, + .names = { "Slackware_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_SLACKWARE_SMALL, .colors = { @@ -4566,7 +4566,7 @@ static const FFlogo S[] = { }, // SmartOS { - .names = {"SmartOS"}, + .names = { "SmartOS" }, .lines = FASTFETCH_DATATEXT_LOGO_SMARTOS, .colors = { FF_COLOR_FG_CYAN, @@ -4575,7 +4575,7 @@ static const FFlogo S[] = { }, // SnigdhaOS { - .names = {"SnigdhaOS", "Snigdha"}, + .names = { "SnigdhaOS", "Snigdha" }, .lines = FASTFETCH_DATATEXT_LOGO_SNIGDHAOS, .colors = { FF_COLOR_FG_CYAN, @@ -4584,7 +4584,7 @@ static const FFlogo S[] = { }, // Soda { - .names = {"Soda"}, + .names = { "Soda" }, .lines = FASTFETCH_DATATEXT_LOGO_SODA, .colors = { FF_COLOR_FG_RED, @@ -4593,7 +4593,7 @@ static const FFlogo S[] = { }, // Source Mage { - .names = {"Source Mage", "Source Mage GNU/Linux", "source_mage", "sourcemage"}, + .names = { "Source Mage", "Source Mage GNU/Linux", "source_mage", "sourcemage" }, .lines = FASTFETCH_DATATEXT_LOGO_SOURCE_MAGE, .colors = { FF_COLOR_FG_DEFAULT, @@ -4603,7 +4603,7 @@ static const FFlogo S[] = { }, // Solaris { - .names = {"solaris", "sunos"}, + .names = { "solaris", "sunos" }, .lines = FASTFETCH_DATATEXT_LOGO_SOLARIS, .colors = { FF_COLOR_FG_YELLOW, @@ -4613,7 +4613,7 @@ static const FFlogo S[] = { }, // SolarisSmall { - .names = {"solaris_small", "sunos_small"}, + .names = { "solaris_small", "sunos_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_SOLARIS_SMALL, .colors = { @@ -4624,7 +4624,7 @@ static const FFlogo S[] = { }, // Solus { - .names = {"Solus", "solus-linux"}, + .names = { "Solus", "solus-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_SOLUS, .colors = { FF_COLOR_FG_BLUE, @@ -4635,13 +4635,13 @@ static const FFlogo S[] = { }, // Sparky { - .names = {"Sparky"}, + .names = { "Sparky" }, .lines = FASTFETCH_DATATEXT_LOGO_SPARKY, - .colors = {FF_COLOR_FG_RED, FF_COLOR_FG_WHITE}, + .colors = { FF_COLOR_FG_RED, FF_COLOR_FG_WHITE }, }, // Star { - .names = {"Star"}, + .names = { "Star" }, .lines = FASTFETCH_DATATEXT_LOGO_STAR, .colors = { FF_COLOR_FG_WHITE, @@ -4650,7 +4650,7 @@ static const FFlogo S[] = { }, // StockLinux { - .names = {"Stock Linux"}, + .names = { "Stock Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_STOCK_LINUX, .colors = { FF_COLOR_FG_BLUE, @@ -4659,7 +4659,7 @@ static const FFlogo S[] = { }, // SteamOS { - .names = {"SteamOS"}, + .names = { "SteamOS" }, .lines = FASTFETCH_DATATEXT_LOGO_STEAMOS, .colors = { FF_COLOR_FG_BLUE, @@ -4670,31 +4670,31 @@ static const FFlogo S[] = { }, // Steam Deck { - .names = {"SteamDeck"}, + .names = { "SteamDeck" }, .lines = FASTFETCH_DATATEXT_LOGO_STEAMDECK, - .colors = {FF_COLOR_FG_BLUE, FF_COLOR_FG_WHITE}, + .colors = { FF_COLOR_FG_BLUE, FF_COLOR_FG_WHITE }, .colorKeys = FF_COLOR_FG_BLUE, .colorTitle = FF_COLOR_FG_BLUE, }, // Steam Deck Small { - .names = {"SteamDeck_small"}, + .names = { "SteamDeck_small" }, .lines = FASTFETCH_DATATEXT_LOGO_STEAMDECK_SMALL, - .colors = {FF_COLOR_FG_BLUE, FF_COLOR_FG_WHITE}, + .colors = { FF_COLOR_FG_BLUE, FF_COLOR_FG_WHITE }, .colorKeys = FF_COLOR_FG_BLUE, .colorTitle = FF_COLOR_FG_BLUE, }, // Steam Deck OLED { - .names = {"SteamDeckOled"}, + .names = { "SteamDeckOled" }, .lines = FASTFETCH_DATATEXT_LOGO_STEAMDECK, - .colors = {FF_COLOR_FG_RED, FF_COLOR_FG_WHITE}, + .colors = { FF_COLOR_FG_RED, FF_COLOR_FG_WHITE }, .colorKeys = FF_COLOR_FG_RED, .colorTitle = FF_COLOR_FG_RED, }, // Sulin { - .names = {"Sulin"}, + .names = { "Sulin" }, .lines = FASTFETCH_DATATEXT_LOGO_SULIN, .colors = { FF_COLOR_FG_BLUE, @@ -4703,7 +4703,7 @@ static const FFlogo S[] = { }, // SummitOS { - .names = {"SummitOS"}, + .names = { "SummitOS" }, .lines = FASTFETCH_DATATEXT_LOGO_SUMMITOS, .colors = { FF_COLOR_FG_RGB "143;191;80", @@ -4713,7 +4713,7 @@ static const FFlogo S[] = { }, // Suse { - .names = {"suse", "suse-linux"}, + .names = { "suse", "suse-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_SUSE, .colors = { FF_COLOR_FG_GREEN, @@ -4722,7 +4722,7 @@ static const FFlogo S[] = { }, // SuseSmall { - .names = {"suse_small", "suse-linux_small"}, + .names = { "suse_small", "suse-linux_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_OPENSUSE_SMALL, .colors = { @@ -4732,7 +4732,7 @@ static const FFlogo S[] = { }, // Swagarch { - .names = {"Swagarch"}, + .names = { "Swagarch" }, .lines = FASTFETCH_DATATEXT_LOGO_SWAGARCH, .colors = { FF_COLOR_FG_BLUE, @@ -4746,7 +4746,7 @@ static const FFlogo S[] = { static const FFlogo T[] = { // T2 { - .names = {"T2", "T2 SDE", "T2/Linux"}, + .names = { "T2", "T2 SDE", "T2/Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_T2, .colors = { FF_COLOR_FG_RED, @@ -4757,7 +4757,7 @@ static const FFlogo T[] = { }, // T2Small { - .names = {"T2_small", "T2 SDE_small", "T2/Linux_small"}, + .names = { "T2_small", "T2 SDE_small", "T2/Linux_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_T2_SMALL, .colors = { @@ -4767,7 +4767,7 @@ static const FFlogo T[] = { }, // Tails { - .names = {"Tails"}, + .names = { "Tails" }, .lines = FASTFETCH_DATATEXT_LOGO_TAILS, .colors = { FF_COLOR_FG_BLUE, @@ -4776,7 +4776,7 @@ static const FFlogo T[] = { }, // Tatra { - .names = {"Tatra"}, + .names = { "Tatra" }, .lines = FASTFETCH_DATATEXT_LOGO_TATRA, .colors = { FF_COLOR_FG_BLUE, @@ -4785,7 +4785,7 @@ static const FFlogo T[] = { }, // TeArch { - .names = {"TeArch"}, + .names = { "TeArch" }, .lines = FASTFETCH_DATATEXT_LOGO_TEARCH, .colors = { FF_COLOR_FG_256 "39", @@ -4794,7 +4794,7 @@ static const FFlogo T[] = { }, // TempleOS { - .names = {"TempleOS"}, + .names = { "TempleOS" }, .lines = FASTFETCH_DATATEXT_LOGO_TEMPLEOS, .colors = { FF_COLOR_FG_YELLOW, @@ -4804,7 +4804,7 @@ static const FFlogo T[] = { }, // TileOS { - .names = {"TileOS"}, + .names = { "TileOS" }, .lines = FASTFETCH_DATATEXT_LOGO_TILEOS, .colors = { FF_COLOR_FG_MAGENTA, @@ -4814,13 +4814,13 @@ static const FFlogo T[] = { }, // Torizon OS { - .names = {"Torizon OS", "TorizonCore"}, + .names = { "Torizon OS", "TorizonCore" }, .lines = FASTFETCH_DATATEXT_LOGO_TORIZONCORE, - .colors = {FF_COLOR_FG_LIGHT_WHITE, FF_COLOR_FG_YELLOW, FF_COLOR_FG_BLUE}, + .colors = { FF_COLOR_FG_LIGHT_WHITE, FF_COLOR_FG_YELLOW, FF_COLOR_FG_BLUE }, }, // Trisquel { - .names = {"Trisquel"}, + .names = { "Trisquel" }, .lines = FASTFETCH_DATATEXT_LOGO_TRISQUEL, .colors = { FF_COLOR_FG_BLUE, @@ -4829,7 +4829,7 @@ static const FFlogo T[] = { }, // TrueNAS Scale { - .names = {"TrueNAS-Scale"}, + .names = { "TrueNAS-Scale" }, .lines = FASTFETCH_DATATEXT_LOGO_TRUENAS_SCALE, .colors = { FF_COLOR_FG_256 "39", @@ -4841,7 +4841,7 @@ static const FFlogo T[] = { }, // TuxedoOS { - .names = {"Tuxedo OS", "tuxedo"}, + .names = { "Tuxedo OS", "tuxedo" }, .lines = FASTFETCH_DATATEXT_LOGO_TUXEDO_OS, .colors = { FF_COLOR_FG_WHITE, @@ -4850,7 +4850,7 @@ static const FFlogo T[] = { }, // Twister { - .names = {"Twister"}, + .names = { "Twister" }, .lines = FASTFETCH_DATATEXT_LOGO_TWISTER, .colors = { FF_COLOR_FG_GREEN, @@ -4867,7 +4867,7 @@ static const FFlogo T[] = { static const FFlogo U[] = { // UBLinux { - .names = {"UBLinux"}, + .names = { "UBLinux" }, .lines = FASTFETCH_DATATEXT_LOGO_UBLINUX, .colors = { FF_COLOR_FG_256 "38", @@ -4879,7 +4879,7 @@ static const FFlogo U[] = { }, // UBLinuxSmall { - .names = {"UBLinux_small"}, + .names = { "UBLinux_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_UBLINUX_SMALL, .colors = { @@ -4892,7 +4892,7 @@ static const FFlogo U[] = { }, // Ubuntu { - .names = {"ubuntu", "ubuntu-linux"}, + .names = { "ubuntu", "ubuntu-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU, .colors = { FF_COLOR_FG_RED, @@ -4901,7 +4901,7 @@ static const FFlogo U[] = { }, // UbuntuSmall { - .names = {"ubuntu_small", "ubuntu-linux_small"}, + .names = { "ubuntu_small", "ubuntu-linux_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_SMALL, .colors = { @@ -4911,7 +4911,7 @@ static const FFlogo U[] = { }, // UbuntuOld { - .names = {"ubuntu_old", "ubuntu-linux_old"}, + .names = { "ubuntu_old", "ubuntu-linux_old" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_OLD, .colors = { @@ -4923,7 +4923,7 @@ static const FFlogo U[] = { }, // UbuntuOld2 { - .names = {"ubuntu_old2"}, + .names = { "ubuntu_old2" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_OLD2, .colors = { @@ -4936,7 +4936,7 @@ static const FFlogo U[] = { }, // UbuntuOld2Small { - .names = {"ubuntu_old2_small", "ubuntu_old2_small"}, + .names = { "ubuntu_old2_small", "ubuntu_old2_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_OLD2_SMALL, .colors = { @@ -4947,7 +4947,7 @@ static const FFlogo U[] = { }, // UbuntuBudgie { - .names = {"ubuntu budgie", "ubuntu-budgie"}, + .names = { "ubuntu budgie", "ubuntu-budgie" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_BUDGIE, .colors = { FF_COLOR_FG_BLUE, @@ -4959,7 +4959,7 @@ static const FFlogo U[] = { }, // UbuntuCinnamon { - .names = {"ubuntu cinnamon", "ubuntu-cinnamon"}, + .names = { "ubuntu cinnamon", "ubuntu-cinnamon" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_CINNAMON, .colors = { FF_COLOR_FG_RED, @@ -4968,7 +4968,7 @@ static const FFlogo U[] = { }, // UbuntuGNOME { - .names = {"ubuntu gnome", "ubuntu-gnome"}, + .names = { "ubuntu gnome", "ubuntu-gnome" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_GNOME, .colors = { FF_COLOR_FG_BLUE, @@ -4981,7 +4981,7 @@ static const FFlogo U[] = { }, // UbuntuKylin { - .names = {"ubuntu kylin", "ubuntu-kylin"}, + .names = { "ubuntu kylin", "ubuntu-kylin" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_KYLIN, .colors = { FF_COLOR_FG_RED, @@ -4993,7 +4993,7 @@ static const FFlogo U[] = { }, // UbuntuMate { - .names = {"ubuntu mate", "ubuntu-mate"}, + .names = { "ubuntu mate", "ubuntu-mate" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_MATE, .colors = { FF_COLOR_FG_GREEN, @@ -5004,7 +5004,7 @@ static const FFlogo U[] = { }, // UbuntuKde { - .names = {"ubuntu kde", "ubuntu-kde", "ubuntu-plasma"}, + .names = { "ubuntu kde", "ubuntu-kde", "ubuntu-plasma" }, .lines = FASTFETCH_DATATEXT_LOGO_KUBUNTU, .colors = { FF_COLOR_FG_BLUE, @@ -5015,7 +5015,7 @@ static const FFlogo U[] = { }, // UbuntuStudio { - .names = {"ubuntu studio", "ubuntu-studio"}, + .names = { "ubuntu studio", "ubuntu-studio" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_STUDIO, .colors = { FF_COLOR_FG_CYAN, @@ -5024,7 +5024,7 @@ static const FFlogo U[] = { }, // UbuntuSway { - .names = {"ubuntu sway", "ubuntu-sway"}, + .names = { "ubuntu sway", "ubuntu-sway" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_SWAY, .colors = { FF_COLOR_FG_CYAN, @@ -5033,7 +5033,7 @@ static const FFlogo U[] = { }, // UbuntuTouch { - .names = {"ubuntu touch", "ubuntu-touch"}, + .names = { "ubuntu touch", "ubuntu-touch" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_TOUCH, .colors = { FF_COLOR_FG_YELLOW, @@ -5042,7 +5042,7 @@ static const FFlogo U[] = { }, // UbuntuUnity { - .names = {"ubuntu unity", "ubuntu-unity"}, + .names = { "ubuntu unity", "ubuntu-unity" }, .lines = FASTFETCH_DATATEXT_LOGO_UBUNTU_UNITY, .colors = { FF_COLOR_FG_MAGENTA, @@ -5051,7 +5051,7 @@ static const FFlogo U[] = { }, // Ultramarine { - .names = {"Ultramarine", "Ultramarine Linux"}, + .names = { "Ultramarine", "Ultramarine Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_ULTRAMARINE, .colors = { FF_COLOR_FG_BLUE, @@ -5060,7 +5060,7 @@ static const FFlogo U[] = { }, // Ultramarine Small { - .names = {"Ultramarine_small"}, + .names = { "Ultramarine_small" }, .lines = FASTFETCH_DATATEXT_LOGO_ULTRAMARINE_SMALL, .colors = { FF_COLOR_FG_BLUE, @@ -5069,7 +5069,7 @@ static const FFlogo U[] = { }, // Unifi { - .names = {"Unifi"}, + .names = { "Unifi" }, .lines = FASTFETCH_DATATEXT_LOGO_UNIFI, .colors = { FF_COLOR_FG_WHITE, @@ -5078,7 +5078,7 @@ static const FFlogo U[] = { }, // Univalent { - .names = {"Univalent"}, + .names = { "Univalent" }, .lines = FASTFETCH_DATATEXT_LOGO_UNIVALENT, .colors = { FF_COLOR_FG_CYAN, @@ -5087,7 +5087,7 @@ static const FFlogo U[] = { }, // Univention { - .names = {"Univention"}, + .names = { "Univention" }, .lines = FASTFETCH_DATATEXT_LOGO_UNIVENTION, .colors = { FF_COLOR_FG_RED, @@ -5096,7 +5096,7 @@ static const FFlogo U[] = { }, // UOS { - .names = {"UOS"}, + .names = { "UOS" }, .lines = FASTFETCH_DATATEXT_LOGO_UOS, .colors = { FF_COLOR_FG_BLUE, @@ -5105,16 +5105,16 @@ static const FFlogo U[] = { .colorTitle = FF_COLOR_FG_BLUE, }, // UrukOS - {.names = {"UrukOS"}, .lines = FASTFETCH_DATATEXT_LOGO_URUKOS, .colors = { - FF_COLOR_FG_LIGHT_BLUE, - FF_COLOR_FG_LIGHT_BLUE, - FF_COLOR_FG_WHITE, - FF_COLOR_FG_LIGHT_BLUE, - FF_COLOR_FG_BLUE, - }}, + { .names = { "UrukOS" }, .lines = FASTFETCH_DATATEXT_LOGO_URUKOS, .colors = { + FF_COLOR_FG_LIGHT_BLUE, + FF_COLOR_FG_LIGHT_BLUE, + FF_COLOR_FG_WHITE, + FF_COLOR_FG_LIGHT_BLUE, + FF_COLOR_FG_BLUE, + } }, // Uwuntu { - .names = {"uwuntu"}, + .names = { "uwuntu" }, .lines = FASTFETCH_DATATEXT_LOGO_UWUNTU, .colors = { FF_COLOR_FG_256 "225", @@ -5129,7 +5129,7 @@ static const FFlogo U[] = { static const FFlogo V[] = { // Valhalla { - .names = {"Valhalla", "valhallaos", "valhalla-linux"}, + .names = { "Valhalla", "valhallaos", "valhalla-linux" }, .lines = FASTFETCH_DATATEXT_LOGO_VALHALLA, .colors = { FF_COLOR_FG_DEFAULT, @@ -5139,7 +5139,7 @@ static const FFlogo V[] = { }, // Vanilla { - .names = {"vanilla"}, + .names = { "vanilla" }, .lines = FASTFETCH_DATATEXT_LOGO_VANILLA, .colors = { FF_COLOR_FG_YELLOW, @@ -5149,7 +5149,7 @@ static const FFlogo V[] = { }, // Vanilla2 { - .names = {"vanilla2"}, + .names = { "vanilla2" }, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_VANILLA2, .colors = { @@ -5160,7 +5160,7 @@ static const FFlogo V[] = { }, // VanillaSmall { - .names = {"vanilla_small"}, + .names = { "vanilla_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_VANILLA_SMALL, .colors = { @@ -5170,7 +5170,7 @@ static const FFlogo V[] = { }, // Venom { - .names = {"Venom"}, + .names = { "Venom" }, .lines = FASTFETCH_DATATEXT_LOGO_VENOM, .colors = { FF_COLOR_FG_LIGHT_BLACK, @@ -5179,7 +5179,7 @@ static const FFlogo V[] = { }, // VenomSmall { - .names = {"Venom_small"}, + .names = { "Venom_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_VENOM_SMALL, .colors = { @@ -5189,7 +5189,7 @@ static const FFlogo V[] = { }, // VincentOS { - .names = {"VincentOS"}, + .names = { "VincentOS" }, .lines = FASTFETCH_DATATEXT_LOGO_VINCENTOS, .colors = { FF_COLOR_FG_GREEN, @@ -5198,7 +5198,7 @@ static const FFlogo V[] = { }, // Vnux { - .names = {"Vnux"}, + .names = { "Vnux" }, .lines = FASTFETCH_DATATEXT_LOGO_VNUX, .colors = { FF_COLOR_FG_256 "11", @@ -5210,7 +5210,7 @@ static const FFlogo V[] = { }, // Vzlinux { - .names = {"Vzlinux"}, + .names = { "Vzlinux" }, .lines = FASTFETCH_DATATEXT_LOGO_VZLINUX, .colors = { FF_COLOR_FG_RED, @@ -5220,7 +5220,7 @@ static const FFlogo V[] = { }, // Void { - .names = {"void"}, + .names = { "void" }, .lines = FASTFETCH_DATATEXT_LOGO_VOID, .colors = { FF_COLOR_FG_GREEN, @@ -5231,7 +5231,7 @@ static const FFlogo V[] = { }, // VoidSmall { - .names = {"void_small"}, + .names = { "void_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_VOID_SMALL, .colors = { @@ -5242,7 +5242,7 @@ static const FFlogo V[] = { }, // Void2 { - .names = {"void2"}, + .names = { "void2" }, .lines = FASTFETCH_DATATEXT_LOGO_VOID2, .colors = { FF_COLOR_FG_YELLOW, @@ -5254,7 +5254,7 @@ static const FFlogo V[] = { }, // Void2Small { - .names = {"void2_small"}, + .names = { "void2_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT, .lines = FASTFETCH_DATATEXT_LOGO_VOID2_SMALL, .colors = { @@ -5270,7 +5270,7 @@ static const FFlogo V[] = { static const FFlogo W[] = { // WiiLinux { - .names = {"WiiLinuxNgx", "WiiLinux", "Wii-Linux", "Wii Linux"}, + .names = { "WiiLinuxNgx", "WiiLinux", "Wii-Linux", "Wii Linux" }, .lines = FASTFETCH_DATATEXT_LOGO_WII_LINUX, .colors = { FF_COLOR_FG_CYAN, @@ -5279,7 +5279,7 @@ static const FFlogo W[] = { }, // Windows2025 { - .names = {"Windows Server 2025"}, + .names = { "Windows Server 2025" }, .lines = FASTFETCH_DATATEXT_LOGO_WINDOWS_2025, .colors = { FF_COLOR_FG_BLUE, @@ -5292,7 +5292,7 @@ static const FFlogo W[] = { }, // Windows11 { - .names = {"Windows 11", "Windows Server 2022"}, + .names = { "Windows 11", "Windows Server 2022" }, .lines = FASTFETCH_DATATEXT_LOGO_WINDOWS_11, .colors = { FF_COLOR_FG_BLUE, @@ -5305,7 +5305,7 @@ static const FFlogo W[] = { }, // Windows11Small { - .names = {"Windows 11_small"}, + .names = { "Windows 11_small" }, .type = FF_LOGO_LINE_TYPE_SMALL_BIT, .lines = FASTFETCH_DATATEXT_LOGO_WINDOWS_11_SMALL, .colors = { @@ -5319,7 +5319,7 @@ static const FFlogo W[] = { }, // Windows8 { - .names = {"Windows 8", "Windows 8.1", "Windows 10", "Windows Server 2012", "Windows Server 2012 R2", "Windows Server 2016", "Windows Server 2019"}, + .names = { "Windows 8", "Windows 8.1", "Windows 10", "Windows Server 2012", "Windows Server 2012 R2", "Windows Server 2016", "Windows Server 2019" }, .lines = FASTFETCH_DATATEXT_LOGO_WINDOWS_8, .colors = { FF_COLOR_FG_CYAN, @@ -5332,7 +5332,7 @@ static const FFlogo W[] = { }, // Windows { - .names = {"Windows", "Windows 7", "Windows Server 2008", "Windows Server 2008 R2"}, + .names = { "Windows", "Windows 7", "Windows Server 2008", "Windows Server 2008 R2" }, .lines = FASTFETCH_DATATEXT_LOGO_WINDOWS, .colors = { FF_COLOR_FG_RED, @@ -5345,7 +5345,7 @@ static const FFlogo W[] = { }, // Windows95 { - .names = {"Windows 95", "Windows 9x"}, + .names = { "Windows 95", "Windows 9x" }, .lines = FASTFETCH_DATATEXT_LOGO_WINDOWS_95, .colors = { FF_COLOR_FG_CYAN, @@ -5360,7 +5360,7 @@ static const FFlogo W[] = { }, // WolfOS { - .names = {"WolfOS"}, + .names = { "WolfOS" }, .lines = FASTFETCH_DATATEXT_LOGO_WOLFOS, .colors = { FF_COLOR_FG_BLUE, @@ -5374,7 +5374,7 @@ static const FFlogo W[] = { static const FFlogo X[] = { // XCP-ng { - .names = {"XCP-ng", "xenenterprise"}, + .names = { "XCP-ng", "xenenterprise" }, .lines = FASTFETCH_DATATEXT_LOGO_XCP_NG, .colors = { FF_COLOR_FG_RED, @@ -5383,11 +5383,10 @@ static const FFlogo X[] = { FF_COLOR_FG_BLACK, FF_COLOR_FG_BLUE, FF_COLOR_FG_YELLOW, - } - }, + } }, // Xenia { - .names = {"Xenia"}, + .names = { "Xenia" }, .lines = FASTFETCH_DATATEXT_LOGO_XENIA, .colors = { FF_COLOR_FG_RED, @@ -5397,23 +5396,23 @@ static const FFlogo X[] = { .colorTitle = FF_COLOR_FG_RED, }, // Xenia_old - {.names = {"Xenia_old"}, .lines = FASTFETCH_DATATEXT_LOGO_XENIA_OLD, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { - FF_COLOR_FG_YELLOW, - FF_COLOR_FG_GREEN, - FF_COLOR_FG_RED, - }}, + { .names = { "Xenia_old" }, .lines = FASTFETCH_DATATEXT_LOGO_XENIA_OLD, .type = FF_LOGO_LINE_TYPE_ALTER_BIT, .colors = { + FF_COLOR_FG_YELLOW, + FF_COLOR_FG_GREEN, + FF_COLOR_FG_RED, + } }, // XeroArch - {.names = {"XeroArch"}, .lines = FASTFETCH_DATATEXT_LOGO_XEROARCH, .colors = { - FF_COLOR_FG_256 "50", - FF_COLOR_FG_256 "14", - FF_COLOR_FG_256 "50", - FF_COLOR_FG_256 "93", - FF_COLOR_FG_256 "16", - FF_COLOR_FG_256 "15", - }}, + { .names = { "XeroArch" }, .lines = FASTFETCH_DATATEXT_LOGO_XEROARCH, .colors = { + FF_COLOR_FG_256 "50", + FF_COLOR_FG_256 "14", + FF_COLOR_FG_256 "50", + FF_COLOR_FG_256 "93", + FF_COLOR_FG_256 "16", + FF_COLOR_FG_256 "15", + } }, // Xferience { - .names = {"Xferience"}, + .names = { "Xferience" }, .lines = FASTFETCH_DATATEXT_LOGO_XFERIENCE, .colors = { FF_COLOR_FG_CYAN, @@ -5422,7 +5421,7 @@ static const FFlogo X[] = { }, // Xubuntu { - .names = {"Xubuntu"}, + .names = { "Xubuntu" }, .lines = FASTFETCH_DATATEXT_LOGO_XUBUNTU, .colors = { FF_COLOR_FG_256 "25", @@ -5430,16 +5429,16 @@ static const FFlogo X[] = { }, }, // Xray_OS - {.names = {"Xray_OS"}, .lines = FASTFETCH_DATATEXT_LOGO_XRAY_OS, .colors = { - FF_COLOR_FG_256 "15", - FF_COLOR_FG_256 "14", - FF_COLOR_FG_256 "16", - }}, + { .names = { "Xray_OS" }, .lines = FASTFETCH_DATATEXT_LOGO_XRAY_OS, .colors = { + FF_COLOR_FG_256 "15", + FF_COLOR_FG_256 "14", + FF_COLOR_FG_256 "16", + } }, // Xinux - {.names = {"Xinux"}, .lines = FASTFETCH_DATATEXT_LOGO_XINUX, .colors = { - FF_COLOR_FG_BLUE, - FF_COLOR_FG_CYAN, - }}, + { .names = { "Xinux" }, .lines = FASTFETCH_DATATEXT_LOGO_XINUX, .colors = { + FF_COLOR_FG_BLUE, + FF_COLOR_FG_CYAN, + } }, // LAST {}, }; @@ -5447,7 +5446,7 @@ static const FFlogo X[] = { static const FFlogo Y[] = { // YiffOS { - .names = {"YiffOS"}, + .names = { "YiffOS" }, .lines = FASTFETCH_DATATEXT_LOGO_YIFFOS, .colors = { FF_COLOR_FG_256 "93", @@ -5461,7 +5460,7 @@ static const FFlogo Y[] = { static const FFlogo Z[] = { // Zorin { - .names = {"Zorin"}, + .names = { "Zorin" }, .lines = FASTFETCH_DATATEXT_LOGO_ZORIN, .colors = { FF_COLOR_FG_BLUE, @@ -5471,7 +5470,7 @@ static const FFlogo Z[] = { }, // Z/OS { - .names = {"z/OS", "zos"}, + .names = { "z/OS", "zos" }, .lines = FASTFETCH_DATATEXT_LOGO_ZOS, .colors = { FF_COLOR_FG_BLUE, @@ -5479,7 +5478,7 @@ static const FFlogo Z[] = { }, // Zraxyl { - .names = {"Zraxyl"}, + .names = { "Zraxyl" }, .lines = FASTFETCH_DATATEXT_LOGO_ZRAXYL, .colors = { FF_COLOR_FG_BLUE, diff --git a/src/logo/image/image.c b/src/logo/image/image.c index b5da3e077..e85cfd3ff 100644 --- a/src/logo/image/image.c +++ b/src/logo/image/image.c @@ -887,7 +887,7 @@ static bool printCached(FFLogoRequestData* requestData) { static bool getCharacterPixelDimensions(FFLogoRequestData* requestData) { # ifdef _WIN32 - CONSOLE_FONT_INFOEX cfi = {.cbSize = sizeof(cfi)}; + CONSOLE_FONT_INFOEX cfi = { .cbSize = sizeof(cfi) }; if (GetCurrentConsoleFontEx(GetStdHandle(STD_OUTPUT_HANDLE), FALSE, &cfi)) // Only works for ConHost { requestData->characterPixelWidth = cfi.dwFontSize.X; diff --git a/src/logo/logo.c b/src/logo/logo.c index 1ca119bfa..ebdeb8a74 100644 --- a/src/logo/logo.c +++ b/src/logo/logo.c @@ -564,8 +564,7 @@ static bool logoTryKnownType(void) { "/bin/sh", "-c", #endif options->source.chars, - NULL - }); + NULL }); if (error) { if (instance.config.display.showErrors) { diff --git a/src/modules/battery/battery.c b/src/modules/battery/battery.c index ac1f3f9fc..faee267ac 100644 --- a/src/modules/battery/battery.c +++ b/src/modules/battery/battery.c @@ -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" }, })) }; diff --git a/src/modules/bios/bios.c b/src/modules/bios/bios.c index 36bcdeded..e7f1e32c3 100644 --- a/src/modules/bios/bios.c +++ b/src/modules/bios/bios.c @@ -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" }, })) }; diff --git a/src/modules/bluetooth/bluetooth.c b/src/modules/bluetooth/bluetooth.c index 745c5a038..32138d4af 100644 --- a/src/modules/bluetooth/bluetooth.c +++ b/src/modules/bluetooth/bluetooth.c @@ -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" }, })) }; diff --git a/src/modules/bluetoothradio/bluetoothradio.c b/src/modules/bluetoothradio/bluetoothradio.c index 55a6e42de..ca32c79b4 100644 --- a/src/modules/bluetoothradio/bluetoothradio.c +++ b/src/modules/bluetoothradio/bluetoothradio.c @@ -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" }, })) }; diff --git a/src/modules/board/board.c b/src/modules/board/board.c index 0c0a3820b..2821eb94e 100644 --- a/src/modules/board/board.c +++ b/src/modules/board/board.c @@ -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" }, })) }; diff --git a/src/modules/bootmgr/bootmgr.c b/src/modules/bootmgr/bootmgr.c index 403bbb0b5..5247a1df8 100644 --- a/src/modules/bootmgr/bootmgr.c +++ b/src/modules/bootmgr/bootmgr.c @@ -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" }, })) }; diff --git a/src/modules/brightness/brightness.c b/src/modules/brightness/brightness.c index b434f9c32..e7486faac 100644 --- a/src/modules/brightness/brightness.c +++ b/src/modules/brightness/brightness.c @@ -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" }, })) }; diff --git a/src/modules/btrfs/btrfs.c b/src/modules/btrfs/btrfs.c index 8e13c900a..8b52cc5a5 100644 --- a/src/modules/btrfs/btrfs.c +++ b/src/modules/btrfs/btrfs.c @@ -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" }, })) }; diff --git a/src/modules/camera/camera.c b/src/modules/camera/camera.c index 9fc0519c9..fd29c1626 100644 --- a/src/modules/camera/camera.c +++ b/src/modules/camera/camera.c @@ -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" }, })) }; diff --git a/src/modules/chassis/chassis.c b/src/modules/chassis/chassis.c index aef714ece..79285a862 100644 --- a/src/modules/chassis/chassis.c +++ b/src/modules/chassis/chassis.c @@ -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" }, })), }; diff --git a/src/modules/colors/colors.c b/src/modules/colors/colors.c index 02c28d8ec..481f59f62 100644 --- a/src/modules/colors/colors.c +++ b/src/modules/colors/colors.c @@ -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; } diff --git a/src/modules/command/command.c b/src/modules/command/command.c index e53568b73..3641daab5 100644 --- a/src/modules/command/command.c +++ b/src/modules/command/command.c @@ -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" }, })) }; diff --git a/src/modules/cpu/cpu.c b/src/modules/cpu/cpu.c index 734ed3ea7..2b3b38b8e 100644 --- a/src/modules/cpu/cpu.c +++ b/src/modules/cpu/cpu.c @@ -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" }, })) }; diff --git a/src/modules/cpucache/cpucache.c b/src/modules/cpucache/cpucache.c index 7971b51eb..fcfa87db9 100644 --- a/src/modules/cpucache/cpucache.c +++ b/src/modules/cpucache/cpucache.c @@ -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" }, })) }; diff --git a/src/modules/cpuusage/cpuusage.c b/src/modules/cpuusage/cpuusage.c index 568cd0014..90dd8c5fa 100644 --- a/src/modules/cpuusage/cpuusage.c +++ b/src/modules/cpuusage/cpuusage.c @@ -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" }, })) }; diff --git a/src/modules/cursor/cursor.c b/src/modules/cursor/cursor.c index 1900fc0c8..344483453 100644 --- a/src/modules/cursor/cursor.c +++ b/src/modules/cursor/cursor.c @@ -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" }, })), }; diff --git a/src/modules/datetime/datetime.c b/src/modules/datetime/datetime.c index cf3bf299a..5a1f21fb9 100644 --- a/src/modules/datetime/datetime.c +++ b/src/modules/datetime/datetime.c @@ -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" }, })) }; diff --git a/src/modules/de/de.c b/src/modules/de/de.c index 1000fb234..2738571c9 100644 --- a/src/modules/de/de.c +++ b/src/modules/de/de.c @@ -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" }, })) }; diff --git a/src/modules/disk/disk.c b/src/modules/disk/disk.c index c18fc5ca0..cf3dcefcc 100644 --- a/src/modules/disk/disk.c +++ b/src/modules/disk/disk.c @@ -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" }, })) }; diff --git a/src/modules/diskio/diskio.c b/src/modules/diskio/diskio.c index cbd49a9da..9c3a25cc2 100644 --- a/src/modules/diskio/diskio.c +++ b/src/modules/diskio/diskio.c @@ -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" }, })) }; diff --git a/src/modules/display/display.c b/src/modules/display/display.c index ae94810da..7e22f08f2 100644 --- a/src/modules/display/display.c +++ b/src/modules/display/display.c @@ -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" }, })) }; diff --git a/src/modules/dns/dns.c b/src/modules/dns/dns.c index e11c7cab0..992f2c55a 100644 --- a/src/modules/dns/dns.c +++ b/src/modules/dns/dns.c @@ -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" }, })) }; diff --git a/src/modules/editor/editor.c b/src/modules/editor/editor.c index 2eb7e34b5..150850c65 100644 --- a/src/modules/editor/editor.c +++ b/src/modules/editor/editor.c @@ -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" }, })) }; diff --git a/src/modules/font/font.c b/src/modules/font/font.c index c49656c93..38807071e 100644 --- a/src/modules/font/font.c +++ b/src/modules/font/font.c @@ -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" }, })) }; diff --git a/src/modules/gamepad/gamepad.c b/src/modules/gamepad/gamepad.c index abde2ad19..7054a7586 100644 --- a/src/modules/gamepad/gamepad.c +++ b/src/modules/gamepad/gamepad.c @@ -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" }, })) }; diff --git a/src/modules/gpu/gpu.c b/src/modules/gpu/gpu.c index cdfa2c7c4..54a9433a6 100644 --- a/src/modules/gpu/gpu.c +++ b/src/modules/gpu/gpu.c @@ -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" }, })), }; diff --git a/src/modules/host/host.c b/src/modules/host/host.c index ec26e176b..c4401e817 100644 --- a/src/modules/host/host.c +++ b/src/modules/host/host.c @@ -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" }, })) }; diff --git a/src/modules/icons/icons.c b/src/modules/icons/icons.c index 128bdd05c..b2c73a13e 100644 --- a/src/modules/icons/icons.c +++ b/src/modules/icons/icons.c @@ -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" }, })) }; diff --git a/src/modules/initsystem/initsystem.c b/src/modules/initsystem/initsystem.c index 77aff8dc7..b65a23473 100644 --- a/src/modules/initsystem/initsystem.c +++ b/src/modules/initsystem/initsystem.c @@ -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" }, })) }; diff --git a/src/modules/kernel/kernel.c b/src/modules/kernel/kernel.c index 8e621c1e1..11ed9eadf 100644 --- a/src/modules/kernel/kernel.c +++ b/src/modules/kernel/kernel.c @@ -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" }, })) }; diff --git a/src/modules/keyboard/keyboard.c b/src/modules/keyboard/keyboard.c index a6afbce71..5f14bf389 100644 --- a/src/modules/keyboard/keyboard.c +++ b/src/modules/keyboard/keyboard.c @@ -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" }, })) }; diff --git a/src/modules/lm/lm.c b/src/modules/lm/lm.c index 792b55d73..a6ef04eea 100644 --- a/src/modules/lm/lm.c +++ b/src/modules/lm/lm.c @@ -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" }, })) }; diff --git a/src/modules/loadavg/loadavg.c b/src/modules/loadavg/loadavg.c index 5bba1c626..6ed1bc36c 100644 --- a/src/modules/loadavg/loadavg.c +++ b/src/modules/loadavg/loadavg.c @@ -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" }, })) }; diff --git a/src/modules/locale/locale.c b/src/modules/locale/locale.c index c46701d48..e3ae4e66e 100644 --- a/src/modules/locale/locale.c +++ b/src/modules/locale/locale.c @@ -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" }, })) }; diff --git a/src/modules/localip/localip.c b/src/modules/localip/localip.c index 21b9ab2d4..b903a3ec1 100644 --- a/src/modules/localip/localip.c +++ b/src/modules/localip/localip.c @@ -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" }, })) }; diff --git a/src/modules/media/media.c b/src/modules/media/media.c index 9afba8041..a894cc9dc 100644 --- a/src/modules/media/media.c +++ b/src/modules/media/media.c @@ -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" }, })) }; diff --git a/src/modules/memory/memory.c b/src/modules/memory/memory.c index acfcb8130..058fe01b7 100644 --- a/src/modules/memory/memory.c +++ b/src/modules/memory/memory.c @@ -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" }, })) }; diff --git a/src/modules/monitor/monitor.c b/src/modules/monitor/monitor.c index f1b6415a4..0a293ce30 100644 --- a/src/modules/monitor/monitor.c +++ b/src/modules/monitor/monitor.c @@ -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" }, })) }; diff --git a/src/modules/mouse/mouse.c b/src/modules/mouse/mouse.c index 622e667cd..44a3843f0 100644 --- a/src/modules/mouse/mouse.c +++ b/src/modules/mouse/mouse.c @@ -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" }, })) }; diff --git a/src/modules/netio/netio.c b/src/modules/netio/netio.c index b62f60f14..dc63a17ad 100644 --- a/src/modules/netio/netio.c +++ b/src/modules/netio/netio.c @@ -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" }, })) }; diff --git a/src/modules/opencl/opencl.c b/src/modules/opencl/opencl.c index 1c00e2359..22fab1258 100644 --- a/src/modules/opencl/opencl.c +++ b/src/modules/opencl/opencl.c @@ -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" }, })) }; diff --git a/src/modules/opengl/opengl.c b/src/modules/opengl/opengl.c index 01da3df02..53504485a 100644 --- a/src/modules/opengl/opengl.c +++ b/src/modules/opengl/opengl.c @@ -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" }, })) }; diff --git a/src/modules/os/os.c b/src/modules/os/os.c index bad5a7461..6f4f743ec 100644 --- a/src/modules/os/os.c +++ b/src/modules/os/os.c @@ -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" }, })) }; diff --git a/src/modules/packages/packages.c b/src/modules/packages/packages.c index 216f77ba5..6cb92c708 100644 --- a/src/modules/packages/packages.c +++ b/src/modules/packages/packages.c @@ -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" }, })) }; diff --git a/src/modules/physicaldisk/physicaldisk.c b/src/modules/physicaldisk/physicaldisk.c index f0fbe643d..914651e6f 100644 --- a/src/modules/physicaldisk/physicaldisk.c +++ b/src/modules/physicaldisk/physicaldisk.c @@ -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" }, })) }; diff --git a/src/modules/physicalmemory/physicalmemory.c b/src/modules/physicalmemory/physicalmemory.c index e14d8fe5b..a27f00b51 100644 --- a/src/modules/physicalmemory/physicalmemory.c +++ b/src/modules/physicalmemory/physicalmemory.c @@ -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" }, })) }; diff --git a/src/modules/player/player.c b/src/modules/player/player.c index 52429d20e..5a8ea5cb1 100644 --- a/src/modules/player/player.c +++ b/src/modules/player/player.c @@ -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" }, })) }; diff --git a/src/modules/poweradapter/poweradapter.c b/src/modules/poweradapter/poweradapter.c index e7eb7515e..440d0def0 100644 --- a/src/modules/poweradapter/poweradapter.c +++ b/src/modules/poweradapter/poweradapter.c @@ -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" }, })) }; diff --git a/src/modules/processes/processes.c b/src/modules/processes/processes.c index 39a83052c..3257b1446 100644 --- a/src/modules/processes/processes.c +++ b/src/modules/processes/processes.c @@ -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" } })) }; diff --git a/src/modules/publicip/publicip.c b/src/modules/publicip/publicip.c index 2f62716c3..03a74b4df 100644 --- a/src/modules/publicip/publicip.c +++ b/src/modules/publicip/publicip.c @@ -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" }, })) }; diff --git a/src/modules/shell/shell.c b/src/modules/shell/shell.c index 521a4cbcd..b3da67511 100644 --- a/src/modules/shell/shell.c +++ b/src/modules/shell/shell.c @@ -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" }, })) }; diff --git a/src/modules/sound/sound.c b/src/modules/sound/sound.c index 9225c149f..26ed845ae 100644 --- a/src/modules/sound/sound.c +++ b/src/modules/sound/sound.c @@ -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" }, })) }; diff --git a/src/modules/swap/swap.c b/src/modules/swap/swap.c index bf62ca451..fa5160cd6 100644 --- a/src/modules/swap/swap.c +++ b/src/modules/swap/swap.c @@ -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" }, })) }; diff --git a/src/modules/terminal/terminal.c b/src/modules/terminal/terminal.c index 4805cd648..8838430f0 100644 --- a/src/modules/terminal/terminal.c +++ b/src/modules/terminal/terminal.c @@ -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" }, })) }; diff --git a/src/modules/terminalfont/terminalfont.c b/src/modules/terminalfont/terminalfont.c index c2e28330d..e3c26d484 100644 --- a/src/modules/terminalfont/terminalfont.c +++ b/src/modules/terminalfont/terminalfont.c @@ -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" }, })), }; diff --git a/src/modules/terminalsize/terminalsize.c b/src/modules/terminalsize/terminalsize.c index 73eb8d312..ac5ddaba0 100644 --- a/src/modules/terminalsize/terminalsize.c +++ b/src/modules/terminalsize/terminalsize.c @@ -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" }, })), }; diff --git a/src/modules/terminaltheme/terminaltheme.c b/src/modules/terminaltheme/terminaltheme.c index 6df8321ab..f4a6efbdc 100644 --- a/src/modules/terminaltheme/terminaltheme.c +++ b/src/modules/terminaltheme/terminaltheme.c @@ -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" }, })) }; diff --git a/src/modules/theme/theme.c b/src/modules/theme/theme.c index ec68e6694..04623124f 100644 --- a/src/modules/theme/theme.c +++ b/src/modules/theme/theme.c @@ -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" }, })) }; diff --git a/src/modules/title/title.c b/src/modules/title/title.c index 070d51704..f59d6447b 100644 --- a/src/modules/title/title.c +++ b/src/modules/title/title.c @@ -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" }, })) }; diff --git a/src/modules/tpm/tpm.c b/src/modules/tpm/tpm.c index de74e6f4d..04a271904 100644 --- a/src/modules/tpm/tpm.c +++ b/src/modules/tpm/tpm.c @@ -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" }, })) }; diff --git a/src/modules/uptime/uptime.c b/src/modules/uptime/uptime.c index a00134d21..f6be075b3 100644 --- a/src/modules/uptime/uptime.c +++ b/src/modules/uptime/uptime.c @@ -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" }, })) }; diff --git a/src/modules/users/users.c b/src/modules/users/users.c index 47e6e946d..4db235f0d 100644 --- a/src/modules/users/users.c +++ b/src/modules/users/users.c @@ -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" }, })) }; diff --git a/src/modules/version/version.c b/src/modules/version/version.c index c47ca04c1..5435857df 100644 --- a/src/modules/version/version.c +++ b/src/modules/version/version.c @@ -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" }, })) }; diff --git a/src/modules/vulkan/vulkan.c b/src/modules/vulkan/vulkan.c index 985687b99..11270f726 100644 --- a/src/modules/vulkan/vulkan.c +++ b/src/modules/vulkan/vulkan.c @@ -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" }, })) }; diff --git a/src/modules/wallpaper/wallpaper.c b/src/modules/wallpaper/wallpaper.c index 1f8498faa..c40462b96 100644 --- a/src/modules/wallpaper/wallpaper.c +++ b/src/modules/wallpaper/wallpaper.c @@ -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" }, })) }; diff --git a/src/modules/weather/weather.c b/src/modules/weather/weather.c index f83b9a923..c0bc39373 100644 --- a/src/modules/weather/weather.c +++ b/src/modules/weather/weather.c @@ -100,6 +100,6 @@ FFModuleBaseInfo ffWeatherModuleInfo = { .generateJsonResult = (void*) ffGenerateWeatherJsonResult, .generateJsonConfig = (void*) ffGenerateWeatherJsonConfig, .formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) { - {"Weather result", "result"}, + { "Weather result", "result" }, })) }; diff --git a/src/modules/wifi/wifi.c b/src/modules/wifi/wifi.c index 58b306ad0..afa71485c 100644 --- a/src/modules/wifi/wifi.c +++ b/src/modules/wifi/wifi.c @@ -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" }, })) }; diff --git a/src/modules/wm/wm.c b/src/modules/wm/wm.c index 55696bb67..c4358c40c 100644 --- a/src/modules/wm/wm.c +++ b/src/modules/wm/wm.c @@ -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" }, })) }; diff --git a/src/modules/wmtheme/wmtheme.c b/src/modules/wmtheme/wmtheme.c index 76b0ba091..d9f50635d 100644 --- a/src/modules/wmtheme/wmtheme.c +++ b/src/modules/wmtheme/wmtheme.c @@ -70,6 +70,6 @@ FFModuleBaseInfo ffWMThemeModuleInfo = { .generateJsonResult = (void*) ffGenerateWMThemeJsonResult, .generateJsonConfig = (void*) ffGenerateWMThemeJsonConfig, .formatArgs = FF_FORMAT_ARG_LIST(((FFModuleFormatArg[]) { - {"WM theme", "result"}, + { "WM theme", "result" }, })) }; diff --git a/src/modules/zpool/zpool.c b/src/modules/zpool/zpool.c index 96585df30..c6e13d56c 100644 --- a/src/modules/zpool/zpool.c +++ b/src/modules/zpool/zpool.c @@ -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" }, })) }; diff --git a/src/options/display.c b/src/options/display.c index baff1264c..57d0629d9 100644 --- a/src/options/display.c +++ b/src/options/display.c @@ -83,9 +83,9 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va if (spaceBeforeUnit) { int value; const char* error = ffJsonConfigParseEnum(spaceBeforeUnit, &value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); if (error) { @@ -101,7 +101,7 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va yyjson_val* maxPrefix = yyjson_obj_get(val, "maxPrefix"); if (maxPrefix) { int value; - const char* error = ffJsonConfigParseEnum(maxPrefix, &value, (FFKeyValuePair[]) {{"B", 0}, {"kB", 1}, {"MB", 2}, {"GB", 3}, {"TB", 4}, {"PB", 5}, {"EB", 6}, {"ZB", 7}, {"YB", 8}, {}}); + const char* error = ffJsonConfigParseEnum(maxPrefix, &value, (FFKeyValuePair[]) { { "B", 0 }, { "kB", 1 }, { "MB", 2 }, { "GB", 3 }, { "TB", 4 }, { "PB", 5 }, { "EB", 6 }, { "ZB", 7 }, { "YB", 8 }, {} }); if (error) { return error; } @@ -112,9 +112,9 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va if (binaryPrefix) { int value; const char* error = ffJsonConfigParseEnum(binaryPrefix, &value, (FFKeyValuePair[]) { - {"iec", FF_SIZE_BINARY_PREFIX_TYPE_IEC}, - {"si", FF_SIZE_BINARY_PREFIX_TYPE_SI}, - {"jedec", FF_SIZE_BINARY_PREFIX_TYPE_JEDEC}, + { "iec", FF_SIZE_BINARY_PREFIX_TYPE_IEC }, + { "si", FF_SIZE_BINARY_PREFIX_TYPE_SI }, + { "jedec", FF_SIZE_BINARY_PREFIX_TYPE_JEDEC }, {}, }); if (error) { @@ -139,9 +139,9 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va if (spaceBeforeUnit) { int value; const char* error = ffJsonConfigParseEnum(spaceBeforeUnit, &value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); if (error) { @@ -158,14 +158,14 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va if (unit) { int value; const char* error = ffJsonConfigParseEnum(unit, &value, (FFKeyValuePair[]) { - {"DEFAULT", FF_TEMPERATURE_UNIT_DEFAULT}, - {"D", FF_TEMPERATURE_UNIT_DEFAULT}, - {"CELSIUS", FF_TEMPERATURE_UNIT_CELSIUS}, - {"C", FF_TEMPERATURE_UNIT_CELSIUS}, - {"FAHRENHEIT", FF_TEMPERATURE_UNIT_FAHRENHEIT}, - {"F", FF_TEMPERATURE_UNIT_FAHRENHEIT}, - {"KELVIN", FF_TEMPERATURE_UNIT_KELVIN}, - {"K", FF_TEMPERATURE_UNIT_KELVIN}, + { "DEFAULT", FF_TEMPERATURE_UNIT_DEFAULT }, + { "D", FF_TEMPERATURE_UNIT_DEFAULT }, + { "CELSIUS", FF_TEMPERATURE_UNIT_CELSIUS }, + { "C", FF_TEMPERATURE_UNIT_CELSIUS }, + { "FAHRENHEIT", FF_TEMPERATURE_UNIT_FAHRENHEIT }, + { "F", FF_TEMPERATURE_UNIT_FAHRENHEIT }, + { "KELVIN", FF_TEMPERATURE_UNIT_KELVIN }, + { "K", FF_TEMPERATURE_UNIT_KELVIN }, {}, }); if (error) { @@ -212,9 +212,9 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va if (spaceBeforeUnit) { int value; const char* error = ffJsonConfigParseEnum(spaceBeforeUnit, &value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); if (error) { @@ -273,9 +273,9 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va if (spaceBeforeUnit) { int value; const char* error = ffJsonConfigParseEnum(spaceBeforeUnit, &value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); if (error) { @@ -427,9 +427,9 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va } else { int value; const char* error = ffJsonConfigParseEnum(trailingZeros, &value, (FFKeyValuePair[]) { - {"default", FF_FRACTION_TRAILING_ZEROS_TYPE_DEFAULT}, - {"always", FF_FRACTION_TRAILING_ZEROS_TYPE_ALWAYS}, - {"never", FF_FRACTION_TRAILING_ZEROS_TYPE_NEVER}, + { "default", FF_FRACTION_TRAILING_ZEROS_TYPE_DEFAULT }, + { "always", FF_FRACTION_TRAILING_ZEROS_TYPE_ALWAYS }, + { "never", FF_FRACTION_TRAILING_ZEROS_TYPE_NEVER }, {}, }); if (error) { @@ -453,7 +453,7 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va yyjson_val* type = yyjson_obj_get(val, "type"); if (type) { int value; - const char* error = ffJsonConfigParseEnum(type, &value, (FFKeyValuePair[]) {{"none", FF_MODULE_KEY_TYPE_NONE}, {"string", FF_MODULE_KEY_TYPE_STRING}, {"icon", FF_MODULE_KEY_TYPE_ICON}, {"both", FF_MODULE_KEY_TYPE_BOTH}, {"both-0", FF_MODULE_KEY_TYPE_BOTH_0}, {"both-1", FF_MODULE_KEY_TYPE_BOTH_1}, {"both-2", FF_MODULE_KEY_TYPE_BOTH_2}, {"both-3", FF_MODULE_KEY_TYPE_BOTH_3}, {"both-4", FF_MODULE_KEY_TYPE_BOTH_4}, {}}); + const char* error = ffJsonConfigParseEnum(type, &value, (FFKeyValuePair[]) { { "none", FF_MODULE_KEY_TYPE_NONE }, { "string", FF_MODULE_KEY_TYPE_STRING }, { "icon", FF_MODULE_KEY_TYPE_ICON }, { "both", FF_MODULE_KEY_TYPE_BOTH }, { "both-0", FF_MODULE_KEY_TYPE_BOTH_0 }, { "both-1", FF_MODULE_KEY_TYPE_BOTH_1 }, { "both-2", FF_MODULE_KEY_TYPE_BOTH_2 }, { "both-3", FF_MODULE_KEY_TYPE_BOTH_3 }, { "both-4", FF_MODULE_KEY_TYPE_BOTH_4 }, {} }); if (error) { return error; } @@ -501,9 +501,9 @@ const char* ffOptionsParseDisplayJsonConfig(FFOptionsDisplay* options, yyjson_va if (spaceBeforeUnit) { int value; const char* error = ffJsonConfigParseEnum(spaceBeforeUnit, &value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); if (error) { @@ -589,7 +589,7 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key if (ffStrEqualsIgnCase(subkey, "width")) { options->keyWidth = (uint16_t) ffOptionParseUInt32(key, value); } else if (ffStrEqualsIgnCase(subkey, "type")) { - options->keyType = (FFModuleKeyType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) {{"none", FF_MODULE_KEY_TYPE_NONE}, {"string", FF_MODULE_KEY_TYPE_STRING}, {"icon", FF_MODULE_KEY_TYPE_ICON}, {"both", FF_MODULE_KEY_TYPE_BOTH}, {"both-0", FF_MODULE_KEY_TYPE_BOTH_0}, {"both-1", FF_MODULE_KEY_TYPE_BOTH_1}, {"both-2", FF_MODULE_KEY_TYPE_BOTH_2}, {"both-3", FF_MODULE_KEY_TYPE_BOTH_3}, {"both-4", FF_MODULE_KEY_TYPE_BOTH_4}, {}}); + options->keyType = (FFModuleKeyType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { { "none", FF_MODULE_KEY_TYPE_NONE }, { "string", FF_MODULE_KEY_TYPE_STRING }, { "icon", FF_MODULE_KEY_TYPE_ICON }, { "both", FF_MODULE_KEY_TYPE_BOTH }, { "both-0", FF_MODULE_KEY_TYPE_BOTH_0 }, { "both-1", FF_MODULE_KEY_TYPE_BOTH_1 }, { "both-2", FF_MODULE_KEY_TYPE_BOTH_2 }, { "both-3", FF_MODULE_KEY_TYPE_BOTH_3 }, { "both-4", FF_MODULE_KEY_TYPE_BOTH_4 }, {} }); } else if (ffStrEqualsIgnCase(subkey, "padding-left")) { options->keyPaddingLeft = (uint16_t) ffOptionParseUInt32(key, value); } else { @@ -606,9 +606,9 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key options->durationAbbreviation = ffOptionParseBoolean(value); } else if (ffStrEqualsIgnCase(subkey, "space-before-unit")) { options->durationSpaceBeforeUnit = (FFSpaceBeforeUnitType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); } else { @@ -617,16 +617,16 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key } else if (ffStrStartsWithIgnCase(key, "--size-")) { const char* subkey = key + strlen("--size-"); if (ffStrEqualsIgnCase(subkey, "binary-prefix")) { - options->sizeBinaryPrefix = (FFSizeBinaryPrefixType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) {{"iec", FF_SIZE_BINARY_PREFIX_TYPE_IEC}, {"si", FF_SIZE_BINARY_PREFIX_TYPE_SI}, {"jedec", FF_SIZE_BINARY_PREFIX_TYPE_JEDEC}, {}}); + options->sizeBinaryPrefix = (FFSizeBinaryPrefixType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { { "iec", FF_SIZE_BINARY_PREFIX_TYPE_IEC }, { "si", FF_SIZE_BINARY_PREFIX_TYPE_SI }, { "jedec", FF_SIZE_BINARY_PREFIX_TYPE_JEDEC }, {} }); } else if (ffStrEqualsIgnCase(subkey, "ndigits")) { options->sizeNdigits = (uint8_t) ffOptionParseUInt32(key, value); } else if (ffStrEqualsIgnCase(subkey, "max-prefix")) { - options->sizeMaxPrefix = (uint8_t) ffOptionParseEnum(key, value, (FFKeyValuePair[]) {{"B", 0}, {"kB", 1}, {"MB", 2}, {"GB", 3}, {"TB", 4}, {"PB", 5}, {"EB", 6}, {"ZB", 7}, {"YB", 8}, {}}); + options->sizeMaxPrefix = (uint8_t) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { { "B", 0 }, { "kB", 1 }, { "MB", 2 }, { "GB", 3 }, { "TB", 4 }, { "PB", 5 }, { "EB", 6 }, { "ZB", 7 }, { "YB", 8 }, {} }); } else if (ffStrEqualsIgnCase(subkey, "space-before-unit")) { options->sizeSpaceBeforeUnit = (FFSpaceBeforeUnitType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); } else { @@ -636,14 +636,14 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key const char* subkey = key + strlen("--temp-"); if (ffStrEqualsIgnCase(subkey, "unit")) { options->tempUnit = (FFTemperatureUnit) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"DEFAULT", FF_TEMPERATURE_UNIT_DEFAULT}, - {"D", FF_TEMPERATURE_UNIT_DEFAULT}, - {"CELSIUS", FF_TEMPERATURE_UNIT_CELSIUS}, - {"C", FF_TEMPERATURE_UNIT_CELSIUS}, - {"FAHRENHEIT", FF_TEMPERATURE_UNIT_FAHRENHEIT}, - {"F", FF_TEMPERATURE_UNIT_FAHRENHEIT}, - {"KELVIN", FF_TEMPERATURE_UNIT_KELVIN}, - {"K", FF_TEMPERATURE_UNIT_KELVIN}, + { "DEFAULT", FF_TEMPERATURE_UNIT_DEFAULT }, + { "D", FF_TEMPERATURE_UNIT_DEFAULT }, + { "CELSIUS", FF_TEMPERATURE_UNIT_CELSIUS }, + { "C", FF_TEMPERATURE_UNIT_CELSIUS }, + { "FAHRENHEIT", FF_TEMPERATURE_UNIT_FAHRENHEIT }, + { "F", FF_TEMPERATURE_UNIT_FAHRENHEIT }, + { "KELVIN", FF_TEMPERATURE_UNIT_KELVIN }, + { "K", FF_TEMPERATURE_UNIT_KELVIN }, {}, }); } else if (ffStrEqualsIgnCase(subkey, "ndigits")) { @@ -656,9 +656,9 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key ffOptionParseColor(value, &options->tempColorRed); } else if (ffStrEqualsIgnCase(subkey, "space-before-unit")) { options->tempSpaceBeforeUnit = (FFSpaceBeforeUnitType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); } else { @@ -678,9 +678,9 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key ffOptionParseColor(value, &options->percentColorRed); } else if (ffStrEqualsIgnCase(subkey, "space-before-unit")) { options->percentSpaceBeforeUnit = (FFSpaceBeforeUnitType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); } else if (ffStrEqualsIgnCase(subkey, "width")) { @@ -692,9 +692,9 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key options->fractionNdigits = (int8_t) ffOptionParseInt32(key, value); } else if (ffStrEqualsIgnCase(key, "--fraction-trailing-zeros")) { options->fractionTrailingZeros = (FFFractionTrailingZerosType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"default", FF_FRACTION_TRAILING_ZEROS_TYPE_DEFAULT}, - {"always", FF_FRACTION_TRAILING_ZEROS_TYPE_ALWAYS}, - {"never", FF_FRACTION_TRAILING_ZEROS_TYPE_NEVER}, + { "default", FF_FRACTION_TRAILING_ZEROS_TYPE_DEFAULT }, + { "always", FF_FRACTION_TRAILING_ZEROS_TYPE_ALWAYS }, + { "never", FF_FRACTION_TRAILING_ZEROS_TYPE_NEVER }, {}, }); } else if (ffStrEqualsIgnCase(key, "--no-buffer")) { @@ -736,9 +736,9 @@ bool ffOptionsParseDisplayCommandLine(FFOptionsDisplay* options, const char* key options->freqNdigits = (int8_t) ffOptionParseInt32(key, value); } else if (ffStrEqualsIgnCase(subkey, "space-before-unit")) { options->freqSpaceBeforeUnit = (FFSpaceBeforeUnitType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"default", FF_SPACE_BEFORE_UNIT_DEFAULT}, - {"always", FF_SPACE_BEFORE_UNIT_ALWAYS}, - {"never", FF_SPACE_BEFORE_UNIT_NEVER}, + { "default", FF_SPACE_BEFORE_UNIT_DEFAULT }, + { "always", FF_SPACE_BEFORE_UNIT_ALWAYS }, + { "never", FF_SPACE_BEFORE_UNIT_NEVER }, {}, }); } else { diff --git a/src/options/general.c b/src/options/general.c index 9ebb74daa..599f0717f 100644 --- a/src/options/general.c +++ b/src/options/general.c @@ -39,9 +39,9 @@ const char* ffOptionsParseGeneralJsonConfig(FFOptionsGeneral* options, yyjson_va if (yyjson_is_str(val)) { int value; const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) { - {"sysfs-only", FF_DS_FORCE_DRM_TYPE_SYSFS_ONLY}, - {"false", FF_DS_FORCE_DRM_TYPE_FALSE}, - {"true", FF_DS_FORCE_DRM_TYPE_TRUE}, + { "sysfs-only", FF_DS_FORCE_DRM_TYPE_SYSFS_ONLY }, + { "false", FF_DS_FORCE_DRM_TYPE_FALSE }, + { "true", FF_DS_FORCE_DRM_TYPE_TRUE }, {}, }); if (error) { diff --git a/src/options/logo.c b/src/options/logo.c index d6b671601..d04f1e2fb 100644 --- a/src/options/logo.c +++ b/src/options/logo.c @@ -49,22 +49,22 @@ bool ffOptionsParseLogoCommandLine(FFOptionsLogo* options, const char* key, cons } } else if (ffStrEqualsIgnCase(subKey, "type")) { options->type = (FFLogoType) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"auto", FF_LOGO_TYPE_AUTO}, - {"builtin", FF_LOGO_TYPE_BUILTIN}, - {"small", FF_LOGO_TYPE_SMALL}, - {"file", FF_LOGO_TYPE_FILE}, - {"file-raw", FF_LOGO_TYPE_FILE_RAW}, - {"data", FF_LOGO_TYPE_DATA}, - {"data-raw", FF_LOGO_TYPE_DATA_RAW}, - {"command-raw", FF_LOGO_TYPE_COMMAND_RAW}, - {"sixel", FF_LOGO_TYPE_IMAGE_SIXEL}, - {"kitty", FF_LOGO_TYPE_IMAGE_KITTY}, - {"kitty-direct", FF_LOGO_TYPE_IMAGE_KITTY_DIRECT}, - {"kitty-icat", FF_LOGO_TYPE_IMAGE_KITTY_ICAT}, - {"iterm", FF_LOGO_TYPE_IMAGE_ITERM}, - {"chafa", FF_LOGO_TYPE_IMAGE_CHAFA}, - {"raw", FF_LOGO_TYPE_IMAGE_RAW}, - {"none", FF_LOGO_TYPE_NONE}, + { "auto", FF_LOGO_TYPE_AUTO }, + { "builtin", FF_LOGO_TYPE_BUILTIN }, + { "small", FF_LOGO_TYPE_SMALL }, + { "file", FF_LOGO_TYPE_FILE }, + { "file-raw", FF_LOGO_TYPE_FILE_RAW }, + { "data", FF_LOGO_TYPE_DATA }, + { "data-raw", FF_LOGO_TYPE_DATA_RAW }, + { "command-raw", FF_LOGO_TYPE_COMMAND_RAW }, + { "sixel", FF_LOGO_TYPE_IMAGE_SIXEL }, + { "kitty", FF_LOGO_TYPE_IMAGE_KITTY }, + { "kitty-direct", FF_LOGO_TYPE_IMAGE_KITTY_DIRECT }, + { "kitty-icat", FF_LOGO_TYPE_IMAGE_KITTY_ICAT }, + { "iterm", FF_LOGO_TYPE_IMAGE_ITERM }, + { "chafa", FF_LOGO_TYPE_IMAGE_CHAFA }, + { "raw", FF_LOGO_TYPE_IMAGE_RAW }, + { "none", FF_LOGO_TYPE_NONE }, {}, }); } else if (ffStrStartsWithIgnCase(subKey, "color-") && subKey[6] != '\0' && subKey[7] == '\0') // matches "--logo-color-*" @@ -107,9 +107,9 @@ bool ffOptionsParseLogoCommandLine(FFOptionsLogo* options, const char* key, cons exit(477); } else if (ffStrEqualsIgnCase(subKey, "position")) { options->position = (FFLogoPosition) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"left", FF_LOGO_POSITION_LEFT}, - {"right", FF_LOGO_POSITION_RIGHT}, - {"top", FF_LOGO_POSITION_TOP}, + { "left", FF_LOGO_POSITION_LEFT }, + { "right", FF_LOGO_POSITION_RIGHT }, + { "top", FF_LOGO_POSITION_TOP }, {}, }); } else { @@ -163,27 +163,27 @@ bool ffOptionsParseLogoCommandLine(FFOptionsLogo* options, const char* key, cons ffOptionParseString(key, value, &options->chafaSymbols); } else if (ffStrEqualsIgnCase(subKey, "canvas-mode")) { options->chafaCanvasMode = (uint32_t) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"TRUECOLOR", 0}, - {"INDEXED_256", 1}, - {"INDEXED_240", 2}, - {"INDEXED_16", 3}, - {"FGBG_BGFG", 4}, - {"FGBG", 5}, - {"INDEXED_8", 6}, - {"INDEXED_16_8", 7}, + { "TRUECOLOR", 0 }, + { "INDEXED_256", 1 }, + { "INDEXED_240", 2 }, + { "INDEXED_16", 3 }, + { "FGBG_BGFG", 4 }, + { "FGBG", 5 }, + { "INDEXED_8", 6 }, + { "INDEXED_16_8", 7 }, {}, }); } else if (ffStrEqualsIgnCase(subKey, "color-space")) { options->chafaColorSpace = (uint32_t) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"RGB", 0}, - {"DIN99D", 1}, + { "RGB", 0 }, + { "DIN99D", 1 }, {}, }); } else if (ffStrEqualsIgnCase(subKey, "dither-mode")) { options->chafaDitherMode = (uint32_t) ffOptionParseEnum(key, value, (FFKeyValuePair[]) { - {"NONE", 0}, - {"ORDERED", 1}, - {"DIFFUSION", 2}, + { "NONE", 0 }, + { "ORDERED", 1 }, + { "DIFFUSION", 2 }, {}, }); } else { @@ -232,22 +232,22 @@ const char* ffOptionsParseLogoJsonConfig(FFOptionsLogo* options, yyjson_val* roo if (unsafe_yyjson_equals_str(key, "type")) { int value; const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) { - {"auto", FF_LOGO_TYPE_AUTO}, - {"builtin", FF_LOGO_TYPE_BUILTIN}, - {"small", FF_LOGO_TYPE_SMALL}, - {"file", FF_LOGO_TYPE_FILE}, - {"file-raw", FF_LOGO_TYPE_FILE_RAW}, - {"data", FF_LOGO_TYPE_DATA}, - {"data-raw", FF_LOGO_TYPE_DATA_RAW}, - {"command-raw", FF_LOGO_TYPE_COMMAND_RAW}, - {"sixel", FF_LOGO_TYPE_IMAGE_SIXEL}, - {"kitty", FF_LOGO_TYPE_IMAGE_KITTY}, - {"kitty-direct", FF_LOGO_TYPE_IMAGE_KITTY_DIRECT}, - {"kitty-icat", FF_LOGO_TYPE_IMAGE_KITTY_ICAT}, - {"iterm", FF_LOGO_TYPE_IMAGE_ITERM}, - {"chafa", FF_LOGO_TYPE_IMAGE_CHAFA}, - {"raw", FF_LOGO_TYPE_IMAGE_RAW}, - {"none", FF_LOGO_TYPE_NONE}, + { "auto", FF_LOGO_TYPE_AUTO }, + { "builtin", FF_LOGO_TYPE_BUILTIN }, + { "small", FF_LOGO_TYPE_SMALL }, + { "file", FF_LOGO_TYPE_FILE }, + { "file-raw", FF_LOGO_TYPE_FILE_RAW }, + { "data", FF_LOGO_TYPE_DATA }, + { "data-raw", FF_LOGO_TYPE_DATA_RAW }, + { "command-raw", FF_LOGO_TYPE_COMMAND_RAW }, + { "sixel", FF_LOGO_TYPE_IMAGE_SIXEL }, + { "kitty", FF_LOGO_TYPE_IMAGE_KITTY }, + { "kitty-direct", FF_LOGO_TYPE_IMAGE_KITTY_DIRECT }, + { "kitty-icat", FF_LOGO_TYPE_IMAGE_KITTY_ICAT }, + { "iterm", FF_LOGO_TYPE_IMAGE_ITERM }, + { "chafa", FF_LOGO_TYPE_IMAGE_CHAFA }, + { "raw", FF_LOGO_TYPE_IMAGE_RAW }, + { "none", FF_LOGO_TYPE_NONE }, {}, }); @@ -326,9 +326,9 @@ const char* ffOptionsParseLogoJsonConfig(FFOptionsLogo* options, yyjson_val* roo } else if (unsafe_yyjson_equals_str(key, "position")) { int value; const char* error = ffJsonConfigParseEnum(val, &value, (FFKeyValuePair[]) { - {"left", FF_LOGO_POSITION_LEFT}, - {"top", FF_LOGO_POSITION_TOP}, - {"right", FF_LOGO_POSITION_RIGHT}, + { "left", FF_LOGO_POSITION_LEFT }, + { "top", FF_LOGO_POSITION_TOP }, + { "right", FF_LOGO_POSITION_RIGHT }, {}, }); @@ -356,14 +356,14 @@ const char* ffOptionsParseLogoJsonConfig(FFOptionsLogo* options, yyjson_val* roo if (canvasMode) { int value; const char* error = ffJsonConfigParseEnum(canvasMode, &value, (FFKeyValuePair[]) { - {"TRUECOLOR", 0}, - {"INDEXED_256", 1}, - {"INDEXED_240", 2}, - {"INDEXED_16", 3}, - {"FGBG_BGFG", 4}, - {"FGBG", 5}, - {"INDEXED_8", 6}, - {"INDEXED_16_8", 7}, + { "TRUECOLOR", 0 }, + { "INDEXED_256", 1 }, + { "INDEXED_240", 2 }, + { "INDEXED_16", 3 }, + { "FGBG_BGFG", 4 }, + { "FGBG", 5 }, + { "INDEXED_8", 6 }, + { "INDEXED_16_8", 7 }, {}, }); @@ -377,8 +377,8 @@ const char* ffOptionsParseLogoJsonConfig(FFOptionsLogo* options, yyjson_val* roo if (colorSpace) { int value; const char* error = ffJsonConfigParseEnum(colorSpace, &value, (FFKeyValuePair[]) { - {"RGB", 0}, - {"DIN99D", 1}, + { "RGB", 0 }, + { "DIN99D", 1 }, {}, }); @@ -392,9 +392,9 @@ const char* ffOptionsParseLogoJsonConfig(FFOptionsLogo* options, yyjson_val* roo if (ditherMode) { int value; const char* error = ffJsonConfigParseEnum(ditherMode, &value, (FFKeyValuePair[]) { - {"NONE", 0}, - {"ORDERED", 1}, - {"DIFFUSION", 2}, + { "NONE", 0 }, + { "ORDERED", 1 }, + { "DIFFUSION", 2 }, {}, }); diff --git a/tests/format.c b/tests/format.c index 6e9b32f0e..868586adb 100644 --- a/tests/format.c +++ b/tests/format.c @@ -7,7 +7,7 @@ static void verify(const char* format, const char* arg, const char* expected, int lineNo) { FF_STRBUF_AUTO_DESTROY result = ffStrbufCreate(); FF_STRBUF_AUTO_DESTROY formatter = ffStrbufCreateStatic(format); - const FFformatarg arguments[] = {{.type = FF_ARG_TYPE_STRING, arg}}; + const FFformatarg arguments[] = { { .type = FF_ARG_TYPE_STRING, arg } }; ffParseFormatString(&result, &formatter, 1, arguments); if (!ffStrbufEqualS(&result, expected)) { fprintf(stderr, FASTFETCH_TEXT_MODIFIER_ERROR "[%d] %s: expected \"%s\", got \"%s\"\n" FASTFETCH_TEXT_MODIFIER_RESET, lineNo, format, expected, result.chars); diff --git a/tests/strbuf.c b/tests/strbuf.c index 9e63cfdd7..ef6fca671 100644 --- a/tests/strbuf.c +++ b/tests/strbuf.c @@ -151,7 +151,7 @@ int main(void) { // removeStrings - ffStrbufRemoveStrings(&strbuf, 3, (const char*[]) {"23", "45", "9"}); + ffStrbufRemoveStrings(&strbuf, 3, (const char*[]) { "23", "45", "9" }); VERIFY(strbuf.length == 2); VERIFY(strcmp(strbuf.chars, "16") == 0);