mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 18:32:10 +02:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a1037d2b6 | |||
| dbcd5b922a | |||
| 8982b860f9 | |||
| 373b4353bb | |||
| ace336dfa9 | |||
| 4060626382 | |||
| 9f9e3dd931 | |||
| 3ed5a250a4 | |||
| fc969b01c7 | |||
| 41e22ea866 | |||
| 0b4a6055c6 | |||
| b340d4e149 | |||
| 878e516880 | |||
| 4e3673a2bb | |||
| 10c8c1b4bf | |||
| 17e3853f38 | |||
| 1bc41dfa54 | |||
| 8c227ae4b8 | |||
| c5c2589f4d | |||
| b273693842 |
@@ -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:
|
||||
|
||||
+2
-2
@@ -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
|
||||
|
||||
Vendored
+6
@@ -1,3 +1,9 @@
|
||||
fastfetch (2.34.0) jammy; urgency=medium
|
||||
|
||||
* Update to 2.34.0
|
||||
|
||||
-- Carter Li <zhangsongcui@live.cn> Thu, 09 Jan 2025 09:03:17 +0800
|
||||
|
||||
fastfetch (2.33.0) jammy; urgency=medium
|
||||
|
||||
* Update to 2.33.0
|
||||
|
||||
Vendored
+1
-1
@@ -1 +1 @@
|
||||
fastfetch_2.33.0_source.buildinfo universe/utils optional
|
||||
fastfetch_2.34.0_source.buildinfo universe/utils optional
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
#include "cpu.h"
|
||||
#include "common/sysctl.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#if __has_include(<sys/cpuset.h>)
|
||||
#include <sys/cpuset.h>
|
||||
#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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <wayland-util.h>
|
||||
@@ -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[] = {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -74,8 +74,7 @@ static bool detectPlasmaFromFile(const char* filename, FFQtResult* result)
|
||||
}
|
||||
}
|
||||
|
||||
if(line != NULL)
|
||||
free(line);
|
||||
free(line);
|
||||
|
||||
fclose(kdeglobals);
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "memory.h"
|
||||
#include "common/sysctl.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <uvm/uvm_extern.h>
|
||||
|
||||
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;
|
||||
}
|
||||
@@ -2,10 +2,7 @@
|
||||
#include "common/sysctl.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
#if __NetBSD__
|
||||
#include <uvm/uvm_extern.h>
|
||||
#endif
|
||||
#include <uvm/uvm_extern.h>
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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╩^
|
||||
__`"^╙╙╨╙╙^^`__
|
||||
@@ -0,0 +1,8 @@
|
||||
$2 \\$1`-______,----__
|
||||
$2 \\ $1 __,---`_
|
||||
$2 \\ $1 `.____
|
||||
$2 \\$1-______,----`-
|
||||
$2 \\
|
||||
$2 \\
|
||||
$2 \\
|
||||
$2 \\
|
||||
@@ -0,0 +1,22 @@
|
||||
@@@@@@@@@@
|
||||
@@@@@@@@@@@@@@@@@@
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
@@@@@@@@@@ @@@@@@@@@@@
|
||||
@@@@@@@@ @@@@@@@@@
|
||||
@@@@@@@@ @@@@@@@@
|
||||
@@@@@@@ @@@@@@@
|
||||
@@@@@@@@ @@@@@@@
|
||||
@@@@@@@@ @@@@@@
|
||||
@@@@@@@@@ @@@@@@
|
||||
@@@@@@@@@@ @@@@@@
|
||||
@@@@@@@@@@ @@@@@@
|
||||
@@@@@@@@@ @@@@@@
|
||||
@@@@@@@@ @@@@@@
|
||||
@@@@@@@@ @@@@@@@
|
||||
@@@@@@@ @@@@@@@
|
||||
@@@@@@@@ @@@@@@@@
|
||||
@@@@@@@@ @@@@@@@@
|
||||
@@@@@@@@@@ @@@@@@@@@@@
|
||||
@@@@@@@@@@@@@@@@@@@@@@@@
|
||||
@@@@@@@@@@@@@@@@@@
|
||||
@@@@@@@@@@
|
||||
+34
-3
@@ -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,
|
||||
|
||||
@@ -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, ' ');
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user