Skip to content

Commit 4a1037d

Browse files
authored
Merge pull request #1509 from fastfetch-cli/dev
Release: v2.34.1
2 parents 52de8df + dbcd5b9 commit 4a1037d

File tree

25 files changed

+328
-95
lines changed

25 files changed

+328
-95
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,25 @@
1+
# 2.34.1
2+
3+
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.
4+
5+
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!
6+
7+
Features:
8+
* Report vendor name when detecting GPUs by OpenGL
9+
* 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.
10+
11+
Bugfixes:
12+
* Fix Ghostty termfont detection (#1495, TerminalFont, macOS)
13+
* Fix compatibility with KDE Plasma 6.3 (#1504, Display, Linux)
14+
* Make memory usage detection logic consistent with other systems (Memory, OpenBSD / NetBSD)
15+
* Report media file name if media title is not available (Media)
16+
* Fix max frequency detection for CPUs with both performance and efficiency cores (CPU, FreeBSD)
17+
18+
Logo:
19+
* Add HeliumOS
20+
* Add Oreon
21+
* Update SnigdhaOS
22+
123
# 2.34.0
224

325
Changes:

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 2.34.0
4+
VERSION 2.34.1
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -752,7 +752,7 @@ elseif(NetBSD)
752752
src/detection/localip/localip_linux.c
753753
src/detection/gamepad/gamepad_nosupport.c
754754
src/detection/media/media_linux.c
755-
src/detection/memory/memory_obsd.c
755+
src/detection/memory/memory_nbsd.c
756756
src/detection/mouse/mouse_nosupport.c
757757
src/detection/netio/netio_bsd.c
758758
src/detection/opengl/opengl_linux.c

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.34.0) jammy; urgency=medium
2+
3+
* Update to 2.34.0
4+
5+
-- Carter Li <[email protected]> Thu, 09 Jan 2025 09:03:17 +0800
6+
17
fastfetch (2.33.0) jammy; urgency=medium
28

39
* Update to 2.33.0

debian/files

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fastfetch_2.33.0_source.buildinfo universe/utils optional
1+
fastfetch_2.34.0_source.buildinfo universe/utils optional

src/detection/cpu/cpu_bsd.c

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
#include "cpu.h"
22
#include "common/sysctl.h"
33

4+
#include <sys/param.h>
5+
#if __has_include(<sys/cpuset.h>)
6+
#include <sys/cpuset.h>
7+
#define FF_HAVE_CPUSET 1
8+
#endif
9+
410
static const char* detectCpuTemp(double* current)
511
{
612
int temp = ffSysctlGetInt("dev.cpu.0.temperature", -999999);
@@ -60,9 +66,19 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
6066
}
6167
}
6268

69+
#if FF_HAVE_CPUSET && (__x86_64__ || __i386__)
70+
// Bind current process to the first two cores, which is *usually* a performance core
71+
cpuset_t currentCPU;
72+
CPU_ZERO(&currentCPU);
73+
CPU_SET(1, &currentCPU);
74+
CPU_SET(2, &currentCPU);
75+
cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(cpuset_t), &currentCPU);
76+
#endif
77+
6378
ffCPUDetectSpeedByCpuid(cpu);
6479

65-
cpu->frequencyBase = (uint32_t) ffSysctlGetInt("hw.clockrate", 0);
80+
uint32_t clockrate = (uint32_t) ffSysctlGetInt("hw.clockrate", 0);
81+
if (clockrate > cpu->frequencyBase) cpu->frequencyBase = clockrate;
6682
cpu->temperature = FF_CPU_TEMP_UNSET;
6783

6884
if (options->temp)

src/detection/cpu/cpu_nbsd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
5858
ffCPUDetectSpeedByCpuid(cpu);
5959

6060
uint32_t freq = (uint32_t) ffSysctlGetInt("machdep.cpu.frequency.target", 0);
61-
if (freq > cpu->frequencyBase)
62-
cpu->frequencyBase = freq;
61+
if (freq > cpu->frequencyBase) cpu->frequencyBase = freq;
6362

6463
cpu->temperature = FF_CPU_TEMP_UNSET;
6564

src/detection/cpu/cpu_obsd.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,9 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
1515

1616
ffCPUDetectSpeedByCpuid(cpu);
1717

18-
cpu->frequencyBase = (uint32_t) ffSysctlGetInt(CTL_HW, HW_CPUSPEED, 0);
18+
uint32_t cpuspeed = (uint32_t) ffSysctlGetInt(CTL_HW, HW_CPUSPEED, 0);
19+
if (cpuspeed > cpu->frequencyBase) cpu->frequencyBase = cpuspeed;
20+
1921
cpu->temperature = FF_CPU_TEMP_UNSET;
2022
if (options->temp)
2123
{

src/detection/diskio/diskio_bsd.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,7 @@ const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options)
9999
device->writeCount = current->num_writes;
100100
}
101101

102-
if (stats.dinfo->mem_ptr)
103-
free(stats.dinfo->mem_ptr);
102+
free(stats.dinfo->mem_ptr);
104103
free(stats.dinfo);
105104

106105
return NULL;

src/detection/displayserver/linux/wayland/kde-output-device-v2-client-protocol.h

Lines changed: 120 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Generated by wayland-scanner 1.22.0 */
1+
/* Generated by wayland-scanner 1.23.1 */
22

33
#ifndef KDE_OUTPUT_DEVICE_V2_CLIENT_PROTOCOL_H
44
#define KDE_OUTPUT_DEVICE_V2_CLIENT_PROTOCOL_H
@@ -53,6 +53,11 @@ struct kde_output_device_v2;
5353
* This object is published as global during start up for every available
5454
* display devices, or when one later becomes available, for example by
5555
* being hotplugged via a physical connector.
56+
*
57+
* Warning! The protocol described in this file is a desktop environment
58+
* implementation detail. Regular clients must not use this protocol.
59+
* Backward incompatible changes may be added without bumping the major
60+
* version of the extension.
5661
* @section page_iface_kde_output_device_v2_api API
5762
* See @ref iface_kde_output_device_v2.
5863
*/
@@ -75,6 +80,11 @@ struct kde_output_device_v2;
7580
* This object is published as global during start up for every available
7681
* display devices, or when one later becomes available, for example by
7782
* being hotplugged via a physical connector.
83+
*
84+
* Warning! The protocol described in this file is a desktop environment
85+
* implementation detail. Regular clients must not use this protocol.
86+
* Backward incompatible changes may be added without bumping the major
87+
* version of the extension.
7888
*/
7989
extern const struct wl_interface kde_output_device_v2_interface;
8090
#endif
@@ -199,6 +209,11 @@ enum kde_output_device_v2_capability {
199209
* @since 5
200210
*/
201211
KDE_OUTPUT_DEVICE_V2_CAPABILITY_ICC_PROFILE = 0x40,
212+
/**
213+
* if this outputdevice supports the brightness setting
214+
* @since 9
215+
*/
216+
KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS = 0x80,
202217
};
203218
/**
204219
* @ingroup iface_kde_output_device_v2
@@ -216,6 +231,10 @@ enum kde_output_device_v2_capability {
216231
* @ingroup iface_kde_output_device_v2
217232
*/
218233
#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_ICC_PROFILE_SINCE_VERSION 5
234+
/**
235+
* @ingroup iface_kde_output_device_v2
236+
*/
237+
#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS_SINCE_VERSION 9
219238
#endif /* KDE_OUTPUT_DEVICE_V2_CAPABILITY_ENUM */
220239

221240
#ifndef KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ENUM
@@ -274,6 +293,29 @@ enum kde_output_device_v2_color_profile_source {
274293
};
275294
#endif /* KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_ENUM */
276295

296+
#ifndef KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM
297+
#define KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM
298+
/**
299+
* @ingroup iface_kde_output_device_v2
300+
* tradeoff between power and accuracy
301+
*
302+
* The compositor can do a lot of things that trade between
303+
* performance, power and color accuracy. This setting describes
304+
* a high level preference from the user about in which direction
305+
* that tradeoff should be made.
306+
*/
307+
enum kde_output_device_v2_color_power_tradeoff {
308+
/**
309+
* prefer efficiency and performance
310+
*/
311+
KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_EFFICIENCY = 0,
312+
/**
313+
* prefer accuracy
314+
*/
315+
KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ACCURACY = 1,
316+
};
317+
#endif /* KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM */
318+
277319
/**
278320
* @ingroup iface_kde_output_device_v2
279321
* @struct kde_output_device_v2_listener
@@ -593,6 +635,29 @@ struct kde_output_device_v2_listener {
593635
void (*brightness)(void *data,
594636
struct kde_output_device_v2 *kde_output_device_v2,
595637
uint32_t brightness);
638+
/**
639+
* the preferred color/power tradeoff
640+
*
641+
*
642+
* @since 10
643+
*/
644+
void (*color_power_tradeoff)(void *data,
645+
struct kde_output_device_v2 *kde_output_device_v2,
646+
uint32_t preference);
647+
/**
648+
* dimming multiplier
649+
*
650+
* This is the dimming multiplier of the output. This is similar
651+
* to the brightness setting, except it's meant to be a temporary
652+
* setting only, not persistent and may be implemented differently
653+
* depending on the display. 0 is the minimum dimming factor (not
654+
* completely dark) and 10000 means the output is not dimmed.
655+
* @param multiplier multiplier in 0-10000
656+
* @since 11
657+
*/
658+
void (*dimming)(void *data,
659+
struct kde_output_device_v2 *kde_output_device_v2,
660+
uint32_t multiplier);
596661
};
597662

598663
/**
@@ -706,34 +771,42 @@ kde_output_device_v2_add_listener(struct kde_output_device_v2 *kde_output_device
706771
* @ingroup iface_kde_output_device_v2
707772
*/
708773
#define KDE_OUTPUT_DEVICE_V2_BRIGHTNESS_SINCE_VERSION 8
774+
/**
775+
* @ingroup iface_kde_output_device_v2
776+
*/
777+
#define KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_SINCE_VERSION 10
778+
/**
779+
* @ingroup iface_kde_output_device_v2
780+
*/
781+
#define KDE_OUTPUT_DEVICE_V2_DIMMING_SINCE_VERSION 11
709782

710783

711-
// /** @ingroup iface_kde_output_device_v2 */
712-
// static inline void
713-
// kde_output_device_v2_set_user_data(struct kde_output_device_v2 *kde_output_device_v2, void *user_data)
714-
// {
715-
// wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_v2, user_data);
716-
// }
784+
/** @ingroup iface_kde_output_device_v2 */
785+
static inline void
786+
kde_output_device_v2_set_user_data(struct kde_output_device_v2 *kde_output_device_v2, void *user_data)
787+
{
788+
wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_v2, user_data);
789+
}
717790

718-
// /** @ingroup iface_kde_output_device_v2 */
719-
// static inline void *
720-
// kde_output_device_v2_get_user_data(struct kde_output_device_v2 *kde_output_device_v2)
721-
// {
722-
// return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_v2);
723-
// }
791+
/** @ingroup iface_kde_output_device_v2 */
792+
static inline void *
793+
kde_output_device_v2_get_user_data(struct kde_output_device_v2 *kde_output_device_v2)
794+
{
795+
return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_v2);
796+
}
724797

725-
// static inline uint32_t
726-
// kde_output_device_v2_get_version(struct kde_output_device_v2 *kde_output_device_v2)
727-
// {
728-
// return wl_proxy_get_version((struct wl_proxy *) kde_output_device_v2);
729-
// }
798+
static inline uint32_t
799+
kde_output_device_v2_get_version(struct kde_output_device_v2 *kde_output_device_v2)
800+
{
801+
return wl_proxy_get_version((struct wl_proxy *) kde_output_device_v2);
802+
}
730803

731-
// /** @ingroup iface_kde_output_device_v2 */
732-
// static inline void
733-
// kde_output_device_v2_destroy(struct kde_output_device_v2 *kde_output_device_v2)
734-
// {
735-
// wl_proxy_destroy((struct wl_proxy *) kde_output_device_v2);
736-
// }
804+
/** @ingroup iface_kde_output_device_v2 */
805+
static inline void
806+
kde_output_device_v2_destroy(struct kde_output_device_v2 *kde_output_device_v2)
807+
{
808+
wl_proxy_destroy((struct wl_proxy *) kde_output_device_v2);
809+
}
737810

738811
/**
739812
* @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
811884
#define KDE_OUTPUT_DEVICE_MODE_V2_REMOVED_SINCE_VERSION 1
812885

813886

814-
// /** @ingroup iface_kde_output_device_mode_v2 */
815-
// static inline void
816-
// kde_output_device_mode_v2_set_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2, void *user_data)
817-
// {
818-
// wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_mode_v2, user_data);
819-
// }
887+
/** @ingroup iface_kde_output_device_mode_v2 */
888+
static inline void
889+
kde_output_device_mode_v2_set_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2, void *user_data)
890+
{
891+
wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_mode_v2, user_data);
892+
}
820893

821-
// /** @ingroup iface_kde_output_device_mode_v2 */
822-
// static inline void *
823-
// kde_output_device_mode_v2_get_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
824-
// {
825-
// return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_mode_v2);
826-
// }
894+
/** @ingroup iface_kde_output_device_mode_v2 */
895+
static inline void *
896+
kde_output_device_mode_v2_get_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
897+
{
898+
return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_mode_v2);
899+
}
827900

828-
// static inline uint32_t
829-
// kde_output_device_mode_v2_get_version(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
830-
// {
831-
// return wl_proxy_get_version((struct wl_proxy *) kde_output_device_mode_v2);
832-
// }
901+
static inline uint32_t
902+
kde_output_device_mode_v2_get_version(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
903+
{
904+
return wl_proxy_get_version((struct wl_proxy *) kde_output_device_mode_v2);
905+
}
833906

834-
// /** @ingroup iface_kde_output_device_mode_v2 */
835-
// static inline void
836-
// kde_output_device_mode_v2_destroy(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
837-
// {
838-
// wl_proxy_destroy((struct wl_proxy *) kde_output_device_mode_v2);
839-
// }
907+
/** @ingroup iface_kde_output_device_mode_v2 */
908+
static inline void
909+
kde_output_device_mode_v2_destroy(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
910+
{
911+
wl_proxy_destroy((struct wl_proxy *) kde_output_device_mode_v2);
912+
}
840913

841914
#ifdef __cplusplus
842915
}

src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifdef FF_HAVE_WAYLAND
22

3-
/* Generated by wayland-scanner 1.22.0 */
3+
/* Generated by wayland-scanner 1.23.1 */
44

55
/*
66
* SPDX-FileCopyrightText: 2008-2011 Kristian Høgsberg
@@ -12,6 +12,7 @@
1212
* SPDX-License-Identifier: MIT-CMU
1313
*/
1414

15+
#include <stdbool.h>
1516
#include <stdlib.h>
1617
#include <stdint.h>
1718
#include <wayland-util.h>
@@ -57,12 +58,14 @@ static const struct wl_message kde_output_device_v2_events[] = {
5758
{ "sdr_gamut_wideness", "6u", kde_output_device_v2_types + 0 },
5859
{ "color_profile_source", "7u", kde_output_device_v2_types + 0 },
5960
{ "brightness", "8u", kde_output_device_v2_types + 0 },
61+
{ "color_power_tradeoff", "10u", kde_output_device_v2_types + 0 },
62+
{ "dimming", "11u", kde_output_device_v2_types + 0 },
6063
};
6164

6265
WL_EXPORT const struct wl_interface kde_output_device_v2_interface = {
63-
"kde_output_device_v2", 8,
66+
"kde_output_device_v2", 11,
6467
0, NULL,
65-
25, kde_output_device_v2_events,
68+
27, kde_output_device_v2_events,
6669
};
6770

6871
static const struct wl_message kde_output_device_mode_v2_events[] = {

0 commit comments

Comments
 (0)