diff --git a/CHANGELOG.md b/CHANGELOG.md index 5436497641..07048761b7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,25 @@ +# 2.34.1 + +An early release to fix KDE Plasma 6.3 compatibility. Hopefully it can be accepted by package managers before KDE 6.3 is officially released. + +To package managers: if you find fastfetch bugs, it's highly appreciated if you can report them to the upstream, so that all users can benefit from the fix, instead of maintaining out-of-tree patches. Thanks! + +Features: +* Report vendor name when detecting GPUs by OpenGL + * Note: the vendor name is actually the creator of the OpenGL driver (such as `Mesa`) and may not be the same as the GPU vendor. + +Bugfixes: +* Fix Ghostty termfont detection (#1495, TerminalFont, macOS) +* Fix compatibility with KDE Plasma 6.3 (#1504, Display, Linux) +* Make memory usage detection logic consistent with other systems (Memory, OpenBSD / NetBSD) +* Report media file name if media title is not available (Media) +* Fix max frequency detection for CPUs with both performance and efficiency cores (CPU, FreeBSD) + +Logo: +* Add HeliumOS +* Add Oreon +* Update SnigdhaOS + # 2.34.0 Changes: diff --git a/CMakeLists.txt b/CMakeLists.txt index d524a7ada2..be052dfaa6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url project(fastfetch - VERSION 2.34.0 + VERSION 2.34.1 LANGUAGES C DESCRIPTION "Fast neofetch-like system information tool" HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch" @@ -752,7 +752,7 @@ elseif(NetBSD) src/detection/localip/localip_linux.c src/detection/gamepad/gamepad_nosupport.c src/detection/media/media_linux.c - src/detection/memory/memory_obsd.c + src/detection/memory/memory_nbsd.c src/detection/mouse/mouse_nosupport.c src/detection/netio/netio_bsd.c src/detection/opengl/opengl_linux.c diff --git a/debian/changelog b/debian/changelog index 3b280a6733..5931bab71a 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +fastfetch (2.34.0) jammy; urgency=medium + + * Update to 2.34.0 + + -- Carter Li Thu, 09 Jan 2025 09:03:17 +0800 + fastfetch (2.33.0) jammy; urgency=medium * Update to 2.33.0 diff --git a/debian/files b/debian/files index 185e493196..27dbba6015 100644 --- a/debian/files +++ b/debian/files @@ -1 +1 @@ -fastfetch_2.33.0_source.buildinfo universe/utils optional +fastfetch_2.34.0_source.buildinfo universe/utils optional diff --git a/src/detection/cpu/cpu_bsd.c b/src/detection/cpu/cpu_bsd.c index 7a5b72144c..bf1f293940 100644 --- a/src/detection/cpu/cpu_bsd.c +++ b/src/detection/cpu/cpu_bsd.c @@ -1,6 +1,12 @@ #include "cpu.h" #include "common/sysctl.h" +#include +#if __has_include() + #include + #define FF_HAVE_CPUSET 1 +#endif + static const char* detectCpuTemp(double* current) { int temp = ffSysctlGetInt("dev.cpu.0.temperature", -999999); @@ -60,9 +66,19 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) } } +#if FF_HAVE_CPUSET && (__x86_64__ || __i386__) + // Bind current process to the first two cores, which is *usually* a performance core + cpuset_t currentCPU; + CPU_ZERO(¤tCPU); + CPU_SET(1, ¤tCPU); + CPU_SET(2, ¤tCPU); + cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(cpuset_t), ¤tCPU); +#endif + ffCPUDetectSpeedByCpuid(cpu); - cpu->frequencyBase = (uint32_t) ffSysctlGetInt("hw.clockrate", 0); + uint32_t clockrate = (uint32_t) ffSysctlGetInt("hw.clockrate", 0); + if (clockrate > cpu->frequencyBase) cpu->frequencyBase = clockrate; cpu->temperature = FF_CPU_TEMP_UNSET; if (options->temp) diff --git a/src/detection/cpu/cpu_nbsd.c b/src/detection/cpu/cpu_nbsd.c index 12e6bb4cd1..4d9530b5ac 100644 --- a/src/detection/cpu/cpu_nbsd.c +++ b/src/detection/cpu/cpu_nbsd.c @@ -58,8 +58,7 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) ffCPUDetectSpeedByCpuid(cpu); uint32_t freq = (uint32_t) ffSysctlGetInt("machdep.cpu.frequency.target", 0); - if (freq > cpu->frequencyBase) - cpu->frequencyBase = freq; + if (freq > cpu->frequencyBase) cpu->frequencyBase = freq; cpu->temperature = FF_CPU_TEMP_UNSET; diff --git a/src/detection/cpu/cpu_obsd.c b/src/detection/cpu/cpu_obsd.c index 298f064d68..33b754ddfe 100644 --- a/src/detection/cpu/cpu_obsd.c +++ b/src/detection/cpu/cpu_obsd.c @@ -15,7 +15,9 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu) ffCPUDetectSpeedByCpuid(cpu); - cpu->frequencyBase = (uint32_t) ffSysctlGetInt(CTL_HW, HW_CPUSPEED, 0); + uint32_t cpuspeed = (uint32_t) ffSysctlGetInt(CTL_HW, HW_CPUSPEED, 0); + if (cpuspeed > cpu->frequencyBase) cpu->frequencyBase = cpuspeed; + cpu->temperature = FF_CPU_TEMP_UNSET; if (options->temp) { diff --git a/src/detection/diskio/diskio_bsd.c b/src/detection/diskio/diskio_bsd.c index afb271a102..f8fc1d8c78 100644 --- a/src/detection/diskio/diskio_bsd.c +++ b/src/detection/diskio/diskio_bsd.c @@ -99,8 +99,7 @@ const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options) device->writeCount = current->num_writes; } - if (stats.dinfo->mem_ptr) - free(stats.dinfo->mem_ptr); + free(stats.dinfo->mem_ptr); free(stats.dinfo); return NULL; diff --git a/src/detection/displayserver/linux/wayland/kde-output-device-v2-client-protocol.h b/src/detection/displayserver/linux/wayland/kde-output-device-v2-client-protocol.h index 6e585d281e..b220a2e98d 100644 --- a/src/detection/displayserver/linux/wayland/kde-output-device-v2-client-protocol.h +++ b/src/detection/displayserver/linux/wayland/kde-output-device-v2-client-protocol.h @@ -1,4 +1,4 @@ -/* Generated by wayland-scanner 1.22.0 */ +/* Generated by wayland-scanner 1.23.1 */ #ifndef KDE_OUTPUT_DEVICE_V2_CLIENT_PROTOCOL_H #define KDE_OUTPUT_DEVICE_V2_CLIENT_PROTOCOL_H @@ -53,6 +53,11 @@ struct kde_output_device_v2; * This object is published as global during start up for every available * display devices, or when one later becomes available, for example by * being hotplugged via a physical connector. + * + * Warning! The protocol described in this file is a desktop environment + * implementation detail. Regular clients must not use this protocol. + * Backward incompatible changes may be added without bumping the major + * version of the extension. * @section page_iface_kde_output_device_v2_api API * See @ref iface_kde_output_device_v2. */ @@ -75,6 +80,11 @@ struct kde_output_device_v2; * This object is published as global during start up for every available * display devices, or when one later becomes available, for example by * being hotplugged via a physical connector. + * + * Warning! The protocol described in this file is a desktop environment + * implementation detail. Regular clients must not use this protocol. + * Backward incompatible changes may be added without bumping the major + * version of the extension. */ extern const struct wl_interface kde_output_device_v2_interface; #endif @@ -199,6 +209,11 @@ enum kde_output_device_v2_capability { * @since 5 */ KDE_OUTPUT_DEVICE_V2_CAPABILITY_ICC_PROFILE = 0x40, + /** + * if this outputdevice supports the brightness setting + * @since 9 + */ + KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS = 0x80, }; /** * @ingroup iface_kde_output_device_v2 @@ -216,6 +231,10 @@ enum kde_output_device_v2_capability { * @ingroup iface_kde_output_device_v2 */ #define KDE_OUTPUT_DEVICE_V2_CAPABILITY_ICC_PROFILE_SINCE_VERSION 5 +/** + * @ingroup iface_kde_output_device_v2 + */ +#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS_SINCE_VERSION 9 #endif /* KDE_OUTPUT_DEVICE_V2_CAPABILITY_ENUM */ #ifndef KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ENUM @@ -274,6 +293,29 @@ enum kde_output_device_v2_color_profile_source { }; #endif /* KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_ENUM */ +#ifndef KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM +#define KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM +/** + * @ingroup iface_kde_output_device_v2 + * tradeoff between power and accuracy + * + * The compositor can do a lot of things that trade between + * performance, power and color accuracy. This setting describes + * a high level preference from the user about in which direction + * that tradeoff should be made. + */ +enum kde_output_device_v2_color_power_tradeoff { + /** + * prefer efficiency and performance + */ + KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_EFFICIENCY = 0, + /** + * prefer accuracy + */ + KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ACCURACY = 1, +}; +#endif /* KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM */ + /** * @ingroup iface_kde_output_device_v2 * @struct kde_output_device_v2_listener @@ -593,6 +635,29 @@ struct kde_output_device_v2_listener { void (*brightness)(void *data, struct kde_output_device_v2 *kde_output_device_v2, uint32_t brightness); + /** + * the preferred color/power tradeoff + * + * + * @since 10 + */ + void (*color_power_tradeoff)(void *data, + struct kde_output_device_v2 *kde_output_device_v2, + uint32_t preference); + /** + * dimming multiplier + * + * This is the dimming multiplier of the output. This is similar + * to the brightness setting, except it's meant to be a temporary + * setting only, not persistent and may be implemented differently + * depending on the display. 0 is the minimum dimming factor (not + * completely dark) and 10000 means the output is not dimmed. + * @param multiplier multiplier in 0-10000 + * @since 11 + */ + void (*dimming)(void *data, + struct kde_output_device_v2 *kde_output_device_v2, + uint32_t multiplier); }; /** @@ -706,34 +771,42 @@ kde_output_device_v2_add_listener(struct kde_output_device_v2 *kde_output_device * @ingroup iface_kde_output_device_v2 */ #define KDE_OUTPUT_DEVICE_V2_BRIGHTNESS_SINCE_VERSION 8 +/** + * @ingroup iface_kde_output_device_v2 + */ +#define KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_SINCE_VERSION 10 +/** + * @ingroup iface_kde_output_device_v2 + */ +#define KDE_OUTPUT_DEVICE_V2_DIMMING_SINCE_VERSION 11 -// /** @ingroup iface_kde_output_device_v2 */ -// static inline void -// kde_output_device_v2_set_user_data(struct kde_output_device_v2 *kde_output_device_v2, void *user_data) -// { -// wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_v2, user_data); -// } +/** @ingroup iface_kde_output_device_v2 */ +static inline void +kde_output_device_v2_set_user_data(struct kde_output_device_v2 *kde_output_device_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_v2, user_data); +} -// /** @ingroup iface_kde_output_device_v2 */ -// static inline void * -// kde_output_device_v2_get_user_data(struct kde_output_device_v2 *kde_output_device_v2) -// { -// return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_v2); -// } +/** @ingroup iface_kde_output_device_v2 */ +static inline void * +kde_output_device_v2_get_user_data(struct kde_output_device_v2 *kde_output_device_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_v2); +} -// static inline uint32_t -// kde_output_device_v2_get_version(struct kde_output_device_v2 *kde_output_device_v2) -// { -// return wl_proxy_get_version((struct wl_proxy *) kde_output_device_v2); -// } +static inline uint32_t +kde_output_device_v2_get_version(struct kde_output_device_v2 *kde_output_device_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) kde_output_device_v2); +} -// /** @ingroup iface_kde_output_device_v2 */ -// static inline void -// kde_output_device_v2_destroy(struct kde_output_device_v2 *kde_output_device_v2) -// { -// wl_proxy_destroy((struct wl_proxy *) kde_output_device_v2); -// } +/** @ingroup iface_kde_output_device_v2 */ +static inline void +kde_output_device_v2_destroy(struct kde_output_device_v2 *kde_output_device_v2) +{ + wl_proxy_destroy((struct wl_proxy *) kde_output_device_v2); +} /** * @ingroup iface_kde_output_device_mode_v2 @@ -811,32 +884,32 @@ kde_output_device_mode_v2_add_listener(struct kde_output_device_mode_v2 *kde_out #define KDE_OUTPUT_DEVICE_MODE_V2_REMOVED_SINCE_VERSION 1 -// /** @ingroup iface_kde_output_device_mode_v2 */ -// static inline void -// kde_output_device_mode_v2_set_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2, void *user_data) -// { -// wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_mode_v2, user_data); -// } +/** @ingroup iface_kde_output_device_mode_v2 */ +static inline void +kde_output_device_mode_v2_set_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2, void *user_data) +{ + wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_mode_v2, user_data); +} -// /** @ingroup iface_kde_output_device_mode_v2 */ -// static inline void * -// kde_output_device_mode_v2_get_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2) -// { -// return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_mode_v2); -// } +/** @ingroup iface_kde_output_device_mode_v2 */ +static inline void * +kde_output_device_mode_v2_get_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2) +{ + return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_mode_v2); +} -// static inline uint32_t -// kde_output_device_mode_v2_get_version(struct kde_output_device_mode_v2 *kde_output_device_mode_v2) -// { -// return wl_proxy_get_version((struct wl_proxy *) kde_output_device_mode_v2); -// } +static inline uint32_t +kde_output_device_mode_v2_get_version(struct kde_output_device_mode_v2 *kde_output_device_mode_v2) +{ + return wl_proxy_get_version((struct wl_proxy *) kde_output_device_mode_v2); +} -// /** @ingroup iface_kde_output_device_mode_v2 */ -// static inline void -// kde_output_device_mode_v2_destroy(struct kde_output_device_mode_v2 *kde_output_device_mode_v2) -// { -// wl_proxy_destroy((struct wl_proxy *) kde_output_device_mode_v2); -// } +/** @ingroup iface_kde_output_device_mode_v2 */ +static inline void +kde_output_device_mode_v2_destroy(struct kde_output_device_mode_v2 *kde_output_device_mode_v2) +{ + wl_proxy_destroy((struct wl_proxy *) kde_output_device_mode_v2); +} #ifdef __cplusplus } 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 885962e5b6..aaf23a4738 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 @@ -1,6 +1,6 @@ #ifdef FF_HAVE_WAYLAND -/* Generated by wayland-scanner 1.22.0 */ +/* Generated by wayland-scanner 1.23.1 */ /* * SPDX-FileCopyrightText: 2008-2011 Kristian Høgsberg @@ -12,6 +12,7 @@ * SPDX-License-Identifier: MIT-CMU */ +#include #include #include #include @@ -57,12 +58,14 @@ static const struct wl_message kde_output_device_v2_events[] = { { "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 }, }; WL_EXPORT const struct wl_interface kde_output_device_v2_interface = { - "kde_output_device_v2", 8, + "kde_output_device_v2", 11, 0, NULL, - 25, kde_output_device_v2_events, + 27, kde_output_device_v2_events, }; static const struct wl_message kde_output_device_mode_v2_events[] = { diff --git a/src/detection/displayserver/linux/wayland/kde-output.c b/src/detection/displayserver/linux/wayland/kde-output.c index a47548ea4a..4f7d8ece16 100644 --- a/src/detection/displayserver/linux/wayland/kde-output.c +++ b/src/detection/displayserver/linux/wayland/kde-output.c @@ -163,6 +163,8 @@ static struct kde_output_device_v2_listener outputListener = { .sdr_gamut_wideness = (void*) stubListener, .color_profile_source = (void*) stubListener, .brightness = (void*) stubListener, + .color_power_tradeoff = (void*) stubListener, + .dimming = (void*) stubListener, }; void ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version) diff --git a/src/detection/gpu/gpu.c b/src/detection/gpu/gpu.c index 86e16716d2..1822cb4471 100644 --- a/src/detection/gpu/gpu.c +++ b/src/detection/gpu/gpu.c @@ -51,9 +51,9 @@ const char* detectByOpenGL(FFlist* gpus) { FFGPUResult* gpu = (FFGPUResult*) ffListAdd(gpus); gpu->type = FF_GPU_TYPE_UNKNOWN; - ffStrbufInit(&gpu->vendor); + ffStrbufInitMove(&gpu->vendor, &result.vendor); ffStrbufInitMove(&gpu->name, &result.renderer); - ffStrbufInitMove(&gpu->driver, &result.vendor); + ffStrbufInit(&gpu->driver); ffStrbufInitF(&gpu->platformApi, "OpenGL %s", result.version.chars); gpu->index = FF_GPU_INDEX_UNSET; gpu->temperature = FF_GPU_TEMP_UNSET; diff --git a/src/detection/gtk_qt/qt.c b/src/detection/gtk_qt/qt.c index cefdf86dc2..ad2c0ab2d8 100644 --- a/src/detection/gtk_qt/qt.c +++ b/src/detection/gtk_qt/qt.c @@ -74,8 +74,7 @@ static bool detectPlasmaFromFile(const char* filename, FFQtResult* result) } } - if(line != NULL) - free(line); + free(line); fclose(kdeglobals); diff --git a/src/detection/media/media_linux.c b/src/detection/media/media_linux.c index 479fa431d6..d9fbe8ad18 100644 --- a/src/detection/media/media_linux.c +++ b/src/detection/media/media_linux.c @@ -8,7 +8,6 @@ #ifdef FF_HAVE_DBUS #include "common/dbus.h" -#include "common/library.h" #define FF_DBUS_ITER_CONTINUE(dbus, iterator) \ { \ @@ -116,10 +115,35 @@ static bool getBusProperties(FFDBusData* data, const char* busName, FFMediaResul if(result->song.length == 0) { - ffStrbufClear(&result->artist); - ffStrbufClear(&result->album); - ffStrbufClear(&result->url); - return false; + if(result->url.length) + { + const char* fileName = memrchr(result->url.chars, '/', result->url.length); + assert(fileName); + ++fileName; + ffStrbufEnsureFixedLengthFree(&result->song, result->url.length - (uint32_t) (fileName - result->url.chars)); + for(; *fileName && *fileName != '?'; ++fileName) + { + if (*fileName != '%') + { + ffStrbufAppendC(&result->song, *fileName); + } + else + { + char str[] = { fileName[1], fileName[2], 0 }; + if (str[0] == 0 || str[1] == 0) + break; + ffStrbufAppendC(&result->song, (char) strtoul(str, NULL, 16)); + fileName += 2; + } + } + } + else + { + ffStrbufClear(&result->artist); + ffStrbufClear(&result->album); + ffStrbufClear(&result->url); + return false; + } } //Set short bus name diff --git a/src/detection/memory/memory_bsd.c b/src/detection/memory/memory_bsd.c index 587ca7f1f0..0db20527a2 100644 --- a/src/detection/memory/memory_bsd.c +++ b/src/detection/memory/memory_bsd.c @@ -4,13 +4,7 @@ const char* ffDetectMemory(FFMemoryResult* ram) { size_t length = sizeof(ram->bytesTotal); - if (sysctl((int[]){ CTL_HW, -#if __NetBSD__ - HW_PHYSMEM64 -#else - HW_PHYSMEM -#endif - }, 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"; // vm.stats.vm.* are int values diff --git a/src/detection/memory/memory_nbsd.c b/src/detection/memory/memory_nbsd.c new file mode 100644 index 0000000000..6510586860 --- /dev/null +++ b/src/detection/memory/memory_nbsd.c @@ -0,0 +1,18 @@ +#include "memory.h" +#include "common/sysctl.h" + +#include +#include + +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) + return "sysctl(CTL_VM, VM_UVMEXP2) failed"; + + ram->bytesTotal = (uint64_t) buf.npages * instance.state.platform.sysinfo.pageSize; + ram->bytesUsed = ((uint64_t) buf.active + (uint64_t) buf.inactive + (uint64_t) buf.wired) * instance.state.platform.sysinfo.pageSize; + + return NULL; +} diff --git a/src/detection/memory/memory_obsd.c b/src/detection/memory/memory_obsd.c index 3dda7656aa..e58bf0d378 100644 --- a/src/detection/memory/memory_obsd.c +++ b/src/detection/memory/memory_obsd.c @@ -2,10 +2,7 @@ #include "common/sysctl.h" #include - -#if __NetBSD__ - #include -#endif +#include const char* ffDetectMemory(FFMemoryResult* ram) { @@ -15,7 +12,7 @@ const char* ffDetectMemory(FFMemoryResult* ram) return "sysctl(CTL_VM, VM_UVMEXP) failed"; ram->bytesTotal = (uint64_t) buf.npages * instance.state.platform.sysinfo.pageSize; - ram->bytesUsed = ram->bytesTotal - (uint64_t) buf.free * instance.state.platform.sysinfo.pageSize; + ram->bytesUsed = ((uint64_t) buf.active + (uint64_t) buf.inactive + (uint64_t) buf.wired) * instance.state.platform.sysinfo.pageSize; return NULL; } diff --git a/src/detection/sound/sound_linux.c b/src/detection/sound/sound_linux.c index bd309aca0d..8fc371d121 100644 --- a/src/detection/sound/sound_linux.c +++ b/src/detection/sound/sound_linux.c @@ -13,7 +13,7 @@ static void paSinkInfoCallback(pa_context *c, const pa_sink_info *i, int eol, vo FFSoundDevice* device = ffListAdd(userdata); ffStrbufInitS(&device->identifier, i->name); - ffStrbufInitS(&device->platformApi, "PulseAudio"); + ffStrbufInitStatic(&device->platformApi, "PulseAudio"); ffStrbufTrimRightSpace(&device->identifier); ffStrbufInitS(&device->name, i->description); ffStrbufTrimRightSpace(&device->name); diff --git a/src/detection/terminalfont/terminalfont.c b/src/detection/terminalfont/terminalfont.c index 005c3f32b9..156cfb3c70 100644 --- a/src/detection/terminalfont/terminalfont.c +++ b/src/detection/terminalfont/terminalfont.c @@ -58,18 +58,14 @@ static void detectGhostty(FFTerminalFontResult* terminalFont) {"font-size =", &fontSize}, }; - if ( - #if __APPLE__ - !ffParsePropFileConfigValues("com.mitchellh.ghostty/config", 2, fontQueryToml) && - #endif - !ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml) - ) { - ffStrbufAppendS(&terminalFont->error, "Couldn't find file `ghostty/config`"); - return; - } + #if __APPLE__ + ffParsePropFileConfigValues("com.mitchellh.ghostty/config", 2, fontQueryToml); + #endif + + ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml); if(fontName.length == 0) - ffStrbufAppendS(&fontName, "JetBrains Mono"); + ffStrbufAppendS(&fontName, "JetBrainsMono Nerd Font"); if(fontSize.length == 0) ffStrbufAppendS(&fontSize, "13"); diff --git a/src/logo/ascii/heliumos.txt b/src/logo/ascii/heliumos.txt new file mode 100644 index 0000000000..30430cd4ee --- /dev/null +++ b/src/logo/ascii/heliumos.txt @@ -0,0 +1,20 @@ + ,,╥╥╥╦╦╦╥╥,, + ,╓╦Ñ╨^`_,,,,,,. `"╨╩Nw + ,╥Ñ^`,╥╦╫╫╫╫╫╫╫╫╫╫╫╫ÑN≥,`╙Ñ╦_ + ,j╩_,╦Ñ╙╙╩╫╫╫╫╫╫╫╫╫╫╫╫╫Ñ╨╨╩N,`╨N, + j╩_╓╫╫Ñ ]N ]╫╫╫╫╫╫╫╫╫╫╫╫_]N ]╫Ñw_╩N + ,╫^ ]╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫N_╙╫ + _╫`,╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫ `╫ + ÑH ╫╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫╫_]Ñ +j╫ ]╫╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫╫H ╫H +j╫ ╟╫╫╫╫╫╫Ñ ╫╫,,,,,,,,,,,,,,,╫╫ ]╫╫╫╫╫╫╫ ╠N +j╫ ]╫╫╫╫╫╫Ñ ╫╫```````````````╫╫ ]╫╫╫╫╫╫╫ 1╡ + ╫_j╫╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫╫N ╫H + ╟H_╫╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫╫ jÑ + _╫╕ ╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫ ,╫ + ╫╥ ╩╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫Ñ ╓Ñ + _╚N_`╫╫Ñ ╩╩ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╩╩ 1╫Ñ`,jÑ_ + `╩N,`╨N╦╦Ñ╫╫╫╫╫╫╫╫╫╫╫╫╫N╦╥]╩`,╦╩` + _╙Ñ╦,`"╩Ñ╫╫╫╫╫╫╫╫╫╫╫Ñ╩^`,╥Ñ^_ + _"╨N╦w,_ `````_ ,╓╦N╩^ + __`"^╙╙╨╙╙^^`__ \ No newline at end of file diff --git a/src/logo/ascii/netbsd_small.txt b/src/logo/ascii/netbsd_small.txt new file mode 100644 index 0000000000..b37056c0b9 --- /dev/null +++ b/src/logo/ascii/netbsd_small.txt @@ -0,0 +1,8 @@ +$2 \\$1`-______,----__ +$2 \\ $1 __,---`_ +$2 \\ $1 `.____ +$2 \\$1-______,----`- +$2 \\ +$2 \\ +$2 \\ +$2 \\ \ No newline at end of file diff --git a/src/logo/ascii/oreon.txt b/src/logo/ascii/oreon.txt new file mode 100644 index 0000000000..73fce33ecd --- /dev/null +++ b/src/logo/ascii/oreon.txt @@ -0,0 +1,22 @@ + @@@@@@@@@@ + @@@@@@@@@@@@@@@@@@ + @@@@@@@@@@@@@@@@@@@@@@@@@@ + @@@@@@@@@@ @@@@@@@@@@@ + @@@@@@@@ @@@@@@@@@ + @@@@@@@@ @@@@@@@@ + @@@@@@@ @@@@@@@ + @@@@@@@@ @@@@@@@ + @@@@@@@@ @@@@@@ + @@@@@@@@@ @@@@@@ +@@@@@@@@@@ @@@@@@ +@@@@@@@@@@ @@@@@@ + @@@@@@@@@ @@@@@@ + @@@@@@@@ @@@@@@ + @@@@@@@@ @@@@@@@ + @@@@@@@ @@@@@@@ + @@@@@@@@ @@@@@@@@ + @@@@@@@@ @@@@@@@@ + @@@@@@@@@@ @@@@@@@@@@@ + @@@@@@@@@@@@@@@@@@@@@@@@ + @@@@@@@@@@@@@@@@@@ + @@@@@@@@@@ \ No newline at end of file diff --git a/src/logo/builtin.c b/src/logo/builtin.c index a940abb34b..e5a42ac05a 100644 --- a/src/logo/builtin.c +++ b/src/logo/builtin.c @@ -2047,6 +2047,16 @@ static const FFlogo H[] = { FF_COLOR_FG_256 "123", }, }, + // HeliumOS + { + .names = {"HeliumOS"}, + .lines = FASTFETCH_DATATEXT_LOGO_HELIUMOS, + .colors = { + FF_COLOR_FG_256 "81", + }, + .colorKeys = FF_COLOR_FG_256 "81", + .colorTitle = FF_COLOR_FG_DEFAULT, + }, // Huawei Cloud EulerOS { .names = {"Huawei Cloud EulerOS", "hce"}, @@ -3075,10 +3085,22 @@ static const FFlogo N[] = { }, // NetBSD { - .names = {"netbsd"}, + .names = {"NetBSD"}, .lines = FASTFETCH_DATATEXT_LOGO_NETBSD, .colors = { - FF_COLOR_FG_MAGENTA, + FF_COLOR_FG_RED, + FF_COLOR_FG_WHITE, + }, + .colorKeys = FF_COLOR_FG_RED, + .colorTitle = FF_COLOR_FG_WHITE, + }, + // NetBSD Small + { + .names = {"NetBSD_small"}, + .lines = FASTFETCH_DATATEXT_LOGO_NETBSD_SMALL, + .type = FF_LOGO_LINE_TYPE_SMALL_BIT, + .colors = { + FF_COLOR_FG_RED, FF_COLOR_FG_WHITE, }, .colorKeys = FF_COLOR_FG_MAGENTA, @@ -3389,6 +3411,15 @@ static const FFlogo O[] = { .colorKeys = FF_COLOR_FG_WHITE, .colorTitle = FF_COLOR_FG_MAGENTA, }, + // Oreon + { + .names = {"Oreon"}, + .lines = FASTFETCH_DATATEXT_LOGO_OREON, + .colors = { + FF_COLOR_FG_DEFAULT, + FF_COLOR_FG_DEFAULT, + }, + }, // OS_Elbrus { .names = {"OS Elbrus"}, @@ -4245,7 +4276,7 @@ static const FFlogo S[] = { // SnigdhaOS { .names = {"SnigdhaOS", "Snigdha"}, - .lines = FASTFETCH_DATATEXT_LOGO_SMARTOS, + .lines = FASTFETCH_DATATEXT_LOGO_SNIGDHAOS, .colors = { FF_COLOR_FG_CYAN, FF_COLOR_FG_WHITE, diff --git a/src/modules/gpu/gpu.c b/src/modules/gpu/gpu.c index 887a8a8994..10d1b46d26 100644 --- a/src/modules/gpu/gpu.c +++ b/src/modules/gpu/gpu.c @@ -26,7 +26,7 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu FF_STRBUF_AUTO_DESTROY output = ffStrbufCreate(); - if(gpu->vendor.length > 0 && !ffStrbufStartsWith(&gpu->name, &gpu->vendor)) + if(gpu->vendor.length > 0 && !ffStrbufStartsWithIgnCase(&gpu->name, &gpu->vendor)) { ffStrbufAppend(&output, &gpu->vendor); ffStrbufAppendC(&output, ' '); diff --git a/src/modules/sound/sound.c b/src/modules/sound/sound.c index e91b378f47..93edf3e46c 100644 --- a/src/modules/sound/sound.c +++ b/src/modules/sound/sound.c @@ -105,6 +105,7 @@ void ffPrintSound(FFSoundOptions* options) { ffStrbufDestroy(&device->identifier); ffStrbufDestroy(&device->name); + ffStrbufDestroy(&device->platformApi); } } @@ -226,6 +227,7 @@ void ffGenerateSoundJsonResult(FF_MAYBE_UNUSED FFSoundOptions* options, yyjson_m { ffStrbufDestroy(&device->identifier); ffStrbufDestroy(&device->name); + ffStrbufDestroy(&device->platformApi); } }