Skip to content

Commit 62dcd12

Browse files
authored
Merge pull request #1401 from fastfetch-cli/dev
Release: v2.30.0
2 parents 9be70a7 + dbb6a4b commit 62dcd12

File tree

111 files changed

+1302
-320
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+1302
-320
lines changed

CHANGELOG.md

+51
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,54 @@
1+
# 2.30.0
2+
3+
Changes:
4+
* Percent: bar type must be enabled in `percent.type` before using percent bar in custom format
5+
6+
Features:
7+
* Port to MidnightBSD; add mport package manager support
8+
* Support bluetooth battery detection for macOS and Windows (Bluetooth, macOS / Windows)
9+
* Support M4 model detection (Host, macOS)
10+
* Support CPU temperature detection on OpenBSD (CPU, OpenBSD)
11+
* Display Android icon in Android devices (OS, Android)
12+
* Support qi package manager detection (Packages, Linux)
13+
* Detect WM / DE by enumerating running processes (WM / DE, NetBSD)
14+
* Generate manual pages from `help.json` (Doc)
15+
* Detect marketing name of vivo smartphone (Host, Android)
16+
* Add txDrops detection if supported (NetIO, *BSD)
17+
* Support tilix version detection (Terminal, Linux)
18+
* Support percent type config in module level. Example:
19+
20+
```json
21+
{
22+
"type": "memory",
23+
"percent": {
24+
"green": 20, // [0%, 20%) will be displayed in green
25+
"yellow": 40, // [20, 40) will be displayed in yellow and [40, 100] will be displayed in red
26+
"type": [ // Display percent value in monochrome bar, same as 10
27+
"bar",
28+
"bar-monochrome"
29+
]
30+
}
31+
}
32+
```
33+
34+
Bugfixes:
35+
* Don't display `()` in key if display name is not available (Display)
36+
* Fix & normalize bluetooth mac address detection (Bluetooth, macOS / Windows)
37+
* Don't print index in multi-battery devices (Battery)
38+
* Fix segfault in macOS (#1388, macOS)
39+
* Fix `CFStringGetCString() failed` errors (#1394, Media, macOS)
40+
* Fix CPU frequency detection on Apple M4 (#1394, CPU, macOS)
41+
* Fix exe path detection on macOS (Shell / Terminal, macOS)
42+
* Fix logo fails to load from symlinked files on macOS (#1395, Logo, macOS)
43+
* Fix 32-bit truncation (NetIO, macOS)
44+
45+
Logos:
46+
* Fix Lilidog
47+
* Add MidnightBSD
48+
* Add Unifi
49+
* Add Cosmic DE
50+
* Update openSUSE Tumbleweed
51+
152
# 2.29.0
253

354
Changes:

CMakeLists.txt

+43-11
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.29.0
4+
VERSION 2.30.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -20,6 +20,9 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
2020
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
2121
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
2222
set(OpenBSD TRUE CACHE BOOL "..." FORCE)
23+
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "MidnightBSD")
24+
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
25+
set(MidnightBSD TRUE CACHE BOOL "..." FORCE)
2326
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "NetBSD")
2427
set(NetBSD TRUE CACHE BOOL "..." FORCE)
2528
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
@@ -253,27 +256,39 @@ endfunction(fastfetch_load_text)
253256

254257
find_package(Python)
255258
if(Python_FOUND)
259+
message(STATUS "Minifying 'help.json'")
256260
execute_process(COMMAND ${Python_EXECUTABLE} -c "import json,sys;json.dump(json.load(sys.stdin),sys.stdout,separators=(',',':'))"
257261
INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/data/help.json"
258262
OUTPUT_VARIABLE DATATEXT_JSON_HELP)
259263
if(DATATEXT_JSON_HELP STREQUAL "")
260264
message(ERROR "DATATEXT_JSON_HELP is empty, which should not happen!")
261265
endif()
262266
else()
263-
message(STATUS "Python3 is not found, 'help.json' will not be minified")
267+
message(WARNING "Python3 is not found, 'help.json' will not be minified")
264268
file(READ "src/data/help.json" DATATEXT_JSON_HELP)
265269
endif()
266270

267271
if(ENABLE_EMBEDDED_PCIIDS AND NOT EXISTS "fastfetch_pciids.c.inc")
268272
if(Python_FOUND)
273+
message(STATUS "Generating 'fastfetch_pciids.c.inc'")
269274
execute_process(COMMAND ${Python_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/scripts/gen-pciids.py"
270275
OUTPUT_FILE "fastfetch_pciids.c.inc")
271276
else()
272-
message(STATUS "Python3 is not found, 'fastfetch_pciids.c.inc' will not be generated")
277+
message(WARNING "Python3 is not found, 'fastfetch_pciids.c.inc' will not be generated")
273278
set(ENABLE_EMBEDDED_PCIIDS OFF)
274279
endif()
275280
endif()
276281

282+
if(Python_FOUND)
283+
message(STATUS "Generating 'fastfetch.1'")
284+
execute_process(COMMAND ${Python_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/scripts/gen-man.py"
285+
OUTPUT_FILE "fastfetch.1")
286+
else()
287+
message(WARNING "Python3 is not found, use basic 'fastfetch.1.in' instead")
288+
string(TIMESTAMP FASTFETCH_BUILD_DATE "%d %B %Y" UTC)
289+
configure_file(doc/fastfetch.1.in fastfetch.1 @ONLY)
290+
endif()
291+
277292
fastfetch_encode_c_string("${DATATEXT_JSON_HELP}" DATATEXT_JSON_HELP)
278293
fastfetch_load_text(src/data/structure.txt DATATEXT_STRUCTURE)
279294
fastfetch_load_text(src/data/help_footer.txt DATATEXT_HELP_FOOTER)
@@ -286,9 +301,6 @@ if(APPLE)
286301
configure_file(src/util/apple/Info.plist.in Info.plist @ONLY)
287302
endif()
288303

289-
string(TIMESTAMP FASTFETCH_BUILD_DATE "%d %B %Y" UTC)
290-
configure_file(doc/fastfetch.1.in fastfetch.1 @ONLY)
291-
292304
####################
293305
# Ascii image data #
294306
####################
@@ -875,7 +887,7 @@ elseif(APPLE)
875887
src/detection/media/media_apple.m
876888
src/detection/memory/memory_apple.c
877889
src/detection/mouse/mouse_apple.c
878-
src/detection/netio/netio_bsd.c
890+
src/detection/netio/netio_apple.c
879891
src/detection/opengl/opengl_apple.c
880892
src/detection/os/os_apple.m
881893
src/detection/packages/packages_apple.c
@@ -912,6 +924,7 @@ elseif(WIN32)
912924
src/detection/battery/battery_windows.c
913925
src/detection/bios/bios_windows.c
914926
src/detection/bluetooth/bluetooth_windows.c
927+
src/detection/bluetooth/bluetooth_windows.cpp
915928
src/detection/bluetoothradio/bluetoothradio_windows.c
916929
src/detection/board/board_windows.c
917930
src/detection/bootmgr/bootmgr_windows.c
@@ -1123,17 +1136,25 @@ if(APPLE AND EXISTS "/usr/bin/otool")
11231136
target_compile_definitions(libfastfetch PUBLIC FF_LIBSYSTEM_VERSION="${CMAKE_MATCH_1}")
11241137
endif()
11251138
endif()
1126-
if(FreeBSD AND EXISTS "/usr/local/bin/objdump")
1139+
if(MidnightBSD AND EXISTS "/usr/bin/objdump")
1140+
execute_process(COMMAND /bin/sh -c "/usr/bin/objdump -T /lib/libc.so.* | grep 'FBSD_[0-9][0-9]*\\.[0-9][0-9]*' -o | sort -Vru | head -1"
1141+
OUTPUT_VARIABLE OBJDUMP_T_RESULT)
1142+
if("${OBJDUMP_T_RESULT}" MATCHES "FBSD_([0-9]+\\.[0-9]+)")
1143+
message(STATUS "Found FBSD ${CMAKE_MATCH_1}")
1144+
target_compile_definitions(libfastfetch PUBLIC FF_FBSD_VERSION="${CMAKE_MATCH_1}")
1145+
endif()
1146+
elseif(FreeBSD AND EXISTS "/usr/local/bin/objdump")
11271147
execute_process(COMMAND /bin/sh -c "/usr/local/bin/objdump -T /lib/libc.so.* | grep 'FBSD_[0-9][0-9]*\\.[0-9][0-9]*' -o | sort -Vru | head -1"
11281148
OUTPUT_VARIABLE OBJDUMP_T_RESULT)
11291149
if("${OBJDUMP_T_RESULT}" MATCHES "FBSD_([0-9]+\\.[0-9]+)")
1150+
message(STATUS "Found FBSD ${CMAKE_MATCH_1}")
11301151
target_compile_definitions(libfastfetch PUBLIC FF_FBSD_VERSION="${CMAKE_MATCH_1}")
11311152
endif()
1132-
endif()
1133-
if(DragonFly AND EXISTS "/usr/local/bin/objdump")
1153+
elseif(DragonFly AND EXISTS "/usr/local/bin/objdump")
11341154
execute_process(COMMAND /bin/sh -c "/usr/local/bin/objdump -T /lib/libc.so.* | grep 'DF[0-9][0-9]*\\.[0-9][0-9]*' -o | sort -Vru | head -1"
11351155
OUTPUT_VARIABLE OBJDUMP_T_RESULT)
11361156
if("${OBJDUMP_T_RESULT}" MATCHES "DF([0-9]+\\.[0-9]+)")
1157+
message(STATUS "Found DF ${CMAKE_MATCH_1}")
11371158
target_compile_definitions(libfastfetch PUBLIC FF_DF_VERSION="${CMAKE_MATCH_1}")
11381159
endif()
11391160
endif()
@@ -1143,7 +1164,7 @@ if(LINUX)
11431164
elseif(ANDROID)
11441165
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE _FILE_OFFSET_BITS=64 "$<$<CONFIG:DEBUG>:__BIONIC_FORTIFY>" "$<$<CONFIG:DEBUG>:__BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED>")
11451166
elseif(WIN32)
1146-
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE WIN32_LEAN_AND_MEAN=1 _WIN32_WINNT=0x0A00 NOMINMAX) # "$<$<CONFIG:Release>:_FORTIFY_SOURCE=3>"
1167+
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0A00 NOMINMAX UNICODE) # "$<$<CONFIG:Release>:_FORTIFY_SOURCE=3>"
11471168
elseif(APPLE)
11481169
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE __STDC_WANT_LIB_EXT1__ _FILE_OFFSET_BITS=64 _DARWIN_C_SOURCE)
11491170
elseif(OpenBSD)
@@ -1159,6 +1180,16 @@ elseif(NetBSD)
11591180
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/usr/X11R7/lib -Wl,-rpath,/usr/pkg/lib") # ditto
11601181
endif()
11611182

1183+
if(FreeBSD OR OpenBSD OR NetBSD)
1184+
include(CheckStructHasMember)
1185+
set(CMAKE_REQUIRED_DEFINITIONS "-D_IFI_OQDROPS=1")
1186+
CHECK_STRUCT_HAS_MEMBER("struct if_data" ifi_oqdrops net/if.h HAVE_IFI_OQDROPS LANGUAGE C)
1187+
if(HAVE_IFI_OQDROPS)
1188+
target_compile_definitions(libfastfetch PUBLIC _IFI_OQDROPS FF_HAVE_IFI_OQDROPS)
1189+
endif()
1190+
unset(CMAKE_REQUIRED_DEFINITIONS)
1191+
endif()
1192+
11621193
if(HAVE_STATX)
11631194
target_compile_definitions(libfastfetch PUBLIC FF_HAVE_STATX)
11641195
endif()
@@ -1425,6 +1456,7 @@ elseif(WIN32)
14251456
PRIVATE "imagehlp"
14261457
PRIVATE "cfgmgr32"
14271458
PRIVATE "winbrand"
1459+
PRIVATE "propsys"
14281460
)
14291461
elseif(FreeBSD)
14301462
target_link_libraries(libfastfetch

README.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ Some distros package an outdated fastfetch version. Older versions receive no su
4040
* openSUSE: `zypper install fastfetch`
4141
* ALT Linux: `apt-get install fastfetch`
4242
* Exherbo: `cave resolve --execute app-misc/fastfetch`
43-
* GNU Guix: `guix install fastfetch`
4443
* Solus: `eopkg install fastfetch`
4544
* Slackware: `sbopkg -i fastfetch`
4645
* Void Linux: `xbps-install fastfetch`
@@ -194,7 +193,7 @@ See [#1096](https://github.com/fastfetch-cli/fastfetch/issues/1096).
194193

195194
Neofetch incorrectly counts `rc` packages ( the package has been removed, but that the configuration files remain ). Bug https://github.com/dylanaraps/neofetch/issues/2278
196195

197-
### Q: I use Debian / Ubuntu / Debian deserved distro. My GPU is detected as `XXXX Device XXXX (VGA compatible)`. Is it a bug?
196+
### Q: I use Debian / Ubuntu / Debian derived distro. My GPU is detected as `XXXX Device XXXX (VGA compatible)`. Is it a bug?
198197

199198
Try upgrading `pci.ids`: Download <https://pci-ids.ucw.cz/v2.2/pci.ids> and overwrite file `/usr/share/hwdata/pci.ids`. For AMD GPUs, you should also upgrade `amdgpu.ids`: Download <https://gitlab.freedesktop.org/mesa/drm/-/raw/main/data/amdgpu.ids> and overwrite file `/usr/share/libdrm/amdgpu.ids`
200199

debian/changelog

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.29.0) jammy; urgency=medium
2+
3+
* Update to 2.29.0
4+
5+
-- Carter Li <[email protected]> Mon, 04 Nov 2024 15:05:02 +0800
6+
17
fastfetch (2.28.0) jammy; urgency=medium
28

39
* Update to 2.28.0

debian/files

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fastfetch_2.28.0_source.buildinfo universe/utils optional
1+
fastfetch_2.29.0_source.buildinfo universe/utils optional

doc/json_schema.json

+37-5
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,35 @@
3434
"description": "Output color of the module. Left empty to use `display.color.output`",
3535
"$ref": "#/$defs/colors"
3636
},
37+
"percentType": {
38+
"description": "Set the percentage output type",
39+
"oneOf": [
40+
{
41+
"type": "number",
42+
"description": "1 for percentage number, 2 for multi-color bar, 3 for both, 6 for bar only, 9 for colored number, 10 for monochrome bar",
43+
"minimum": 0,
44+
"maximum": 255,
45+
"default": 9
46+
},
47+
{
48+
"type": "array",
49+
"description": "array of string flags",
50+
"items": {
51+
"enum": [
52+
"num",
53+
"bar",
54+
"hide-others",
55+
"num-color",
56+
"bar-monochrome"
57+
]
58+
},
59+
"default": [
60+
"num",
61+
"num-color"
62+
]
63+
}
64+
]
65+
},
3766
"percent": {
3867
"description": "Threshold of percentage colors",
3968
"type": "object",
@@ -50,6 +79,9 @@
5079
"minimum": 0,
5180
"maximum": 100,
5281
"description": "Value greater than green and less then yellow will be shown in yellow.\nValue greater than yellow will be shown in red"
82+
},
83+
"type": {
84+
"$ref": "#/$defs/percentType"
5385
}
5486
}
5587
},
@@ -576,11 +608,7 @@
576608
"description": "Set how a percentage value should be displayed",
577609
"properties": {
578610
"type": {
579-
"type": "number",
580-
"description": "Set the percentage output type. 1 for percentage number, 2 for multi-color bar, 3 for both, 6 for bar only, 9 for colored number, 10 for monochrome bar",
581-
"minimum": 0,
582-
"maximum": 255,
583-
"default": 9
611+
"$ref": "#/$defs/percentType"
584612
},
585613
"ndigits": {
586614
"type": "number",
@@ -1942,15 +1970,19 @@
19421970
"eopkg",
19431971
"flatpak",
19441972
"guix",
1973+
"linglong",
19451974
"lpkg",
19461975
"lpkgbuild",
19471976
"macports",
1977+
"mport",
19481978
"nix",
19491979
"opkg",
19501980
"pacman",
1981+
"pacstall",
19511982
"paludis",
19521983
"pkg",
19531984
"pkgtool",
1985+
"qi",
19541986
"rpm",
19551987
"scoop",
19561988
"snap",

0 commit comments

Comments
 (0)