Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: v2.30.0 #1401

Merged
merged 61 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7220634
Packaging: update debian stuff [ci skip]
CarterLi Nov 4, 2024
211fd4b
Display: add `hdr-compatible`
CarterLi Nov 5, 2024
40671c7
Monitor: don't display `()` if display name is not available
CarterLi Nov 5, 2024
ef974ef
Bluetooth (macOS): support battery level detection
CarterLi Nov 5, 2024
9a34cb9
Bluetooth (macOS): normalize mac address strings
CarterLi Nov 5, 2024
f69a9da
CMake: Add initial support for MidnightBSD (#1377)
laffer1 Nov 5, 2024
8f750da
Bluetooth (Windows): fix mac address detection
CarterLi Nov 5, 2024
2389d7b
FFstrbuf: correct definition of `StrStrIA`
CarterLi Nov 6, 2024
7396208
Logo (Builtin): fix Lilidog
CarterLi Nov 6, 2024
acb38fa
Bluetooth (Windows): detect battery (WIP)
CarterLi Nov 5, 2024
07f2a71
Bluetooth (Windows): detect battery level
CarterLi Nov 9, 2024
3fa0d1a
Host (macOS): add HwModel support for new Mac (2024) (#1381)
xiaoran007 Nov 9, 2024
837903e
DisplayServer: fix deprecation warnings
CarterLi Nov 9, 2024
0284e4c
IO: optimize createSubfolders (#1382)
apocelipes Nov 10, 2024
7b81ffc
FFstrbuf: fix small FFstrbuf allocations in ffStrbufEnsureFree (#1383)
apocelipes Nov 10, 2024
7d406bb
Logo (Builtin): add MidnightBSD
CarterLi Nov 10, 2024
7fab6f2
Packages (BSD): support mport
CarterLi Nov 10, 2024
59c6665
Version (MidnightBSD): support libc version detection
CarterLi Nov 10, 2024
f98e6c9
Sound (BSD): trim device names
CarterLi Nov 10, 2024
4534f18
Battery: don't print index in multi-battery device
CarterLi Nov 10, 2024
d10c147
Disk: be able to print disk indices
CarterLi Nov 10, 2024
08a92a4
CPU (OpenBSD): support CPU temp detection
CarterLi Nov 10, 2024
4f9645e
Logo (Builtin): add Unifi
CarterLi Nov 10, 2024
f9713d5
OS (Android): display android icon
CarterLi Nov 10, 2024
f989a1a
Doc: fix typo in README (#1385) [ci skip]
emilyastranova Nov 10, 2024
07d0743
Logo (Builtin): add cosmicDE logo (#1386)
Tiuxi Nov 10, 2024
0a61031
tests: add FFstrbuf smallest allocation test & minor fix (#1387)
apocelipes Nov 10, 2024
4799f92
Revert "IO: optimize createSubfolders (#1382)" (#1390)
CarterLi Nov 11, 2024
5e7d9ed
Packages (Linux): add qi support
CarterLi Nov 10, 2024
830c71d
DisplayServer (NetBSD): detect WM / DE by process name
CarterLi Nov 10, 2024
c368908
Shell (macOS): try fixing segfault in old macOS
CarterLi Nov 11, 2024
7c8250c
StringUtil: rename `ffStrCopy` and correctly reflect its usage
CarterLi Nov 11, 2024
748b7df
Smbios: clean up more garbage values
CarterLi Nov 12, 2024
e618303
Media (macOS): try fixing error `CFStringGetCString() failed`
CarterLi Nov 12, 2024
644458b
CPU (macOS): try fixing CPU freq detection on Apple M4
CarterLi Nov 12, 2024
c70c37c
GPU (macOS): apply the same logic as CPU just in case
CarterLi Nov 12, 2024
bccf241
Scripts: Add python script to generate man page (#1392)
Tiuxi Nov 13, 2024
5a1be25
Scripts: make `gen-pciids.py` executable
CarterLi Nov 13, 2024
fe57b28
Scripts: clean up `gen-man.py`
CarterLi Nov 13, 2024
d7fa041
CMake: use `gen-man.py` to generate man file
CarterLi Nov 13, 2024
5efb879
Util (macOS): cleanup `cf_helpers.c`
CarterLi Nov 13, 2024
2cfc8ec
Processing (macOS): fix exe path detection
CarterLi Nov 13, 2024
1d92bf8
IO (macOS): fix logo fails to load from symlinked files
CarterLi Nov 13, 2024
bad85a5
Host (Android): detect marketing name of vivo smartphone
CarterLi Nov 13, 2024
e821a99
CPU (Linux): add more Apple SOC code names
CarterLi Nov 13, 2024
97e1b98
Global: pack all enums and make flag enums unsigned
CarterLi Nov 14, 2024
c9e3f8d
Global: support percent type config in module level
CarterLi Nov 14, 2024
1c41c6c
Percent: allow use enum to set type value in JSON config
CarterLi Nov 14, 2024
6801fe3
Doc: update schema for percent type config
CarterLi Nov 14, 2024
782af25
Percent: in custom format, only set num and bar string if enabled in …
CarterLi Nov 14, 2024
e77a4e8
Doc: update changelog [ci skip]
CarterLi Nov 14, 2024
b8ec070
Logo (Builtin): update openSUSE Tumbleweed
CarterLi Nov 15, 2024
563ed58
Scripts: `gen-man.py` honors SOURCE_DATE_EPOCH. (#1400)
Dariqq Nov 15, 2024
56eb8b8
NetIO (macOS): fix 32bit trancation
CarterLi Nov 15, 2024
9f314a2
NetIO (BSD): add txDrops detection if supported
CarterLi Nov 15, 2024
e5451b6
NetIO (BSD): remove unnecessary checks
CarterLi Nov 15, 2024
b7a9fe5
Terminal (Linux): support tilix version detection
CarterLi Nov 15, 2024
ba7d3ed
GPU (Windows): fix a bad assignment
CarterLi Nov 15, 2024
dcdf2b5
Display: concat flags
CarterLi Nov 15, 2024
a73a308
Doc: remove guix package installer as it's outdated [ci skip]
CarterLi Nov 18, 2024
dbb6a4b
Release: v2.30.0
CarterLi Nov 18, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
# 2.30.0

Changes:
* Percent: bar type must be enabled in `percent.type` before using percent bar in custom format

Features:
* Port to MidnightBSD; add mport package manager support
* Support bluetooth battery detection for macOS and Windows (Bluetooth, macOS / Windows)
* Support M4 model detection (Host, macOS)
* Support CPU temperature detection on OpenBSD (CPU, OpenBSD)
* Display Android icon in Android devices (OS, Android)
* Support qi package manager detection (Packages, Linux)
* Detect WM / DE by enumerating running processes (WM / DE, NetBSD)
* Generate manual pages from `help.json` (Doc)
* Detect marketing name of vivo smartphone (Host, Android)
* Add txDrops detection if supported (NetIO, *BSD)
* Support tilix version detection (Terminal, Linux)
* Support percent type config in module level. Example:

```json
{
"type": "memory",
"percent": {
"green": 20, // [0%, 20%) will be displayed in green
"yellow": 40, // [20, 40) will be displayed in yellow and [40, 100] will be displayed in red
"type": [ // Display percent value in monochrome bar, same as 10
"bar",
"bar-monochrome"
]
}
}
```

Bugfixes:
* Don't display `()` in key if display name is not available (Display)
* Fix & normalize bluetooth mac address detection (Bluetooth, macOS / Windows)
* Don't print index in multi-battery devices (Battery)
* Fix segfault in macOS (#1388, macOS)
* Fix `CFStringGetCString() failed` errors (#1394, Media, macOS)
* Fix CPU frequency detection on Apple M4 (#1394, CPU, macOS)
* Fix exe path detection on macOS (Shell / Terminal, macOS)
* Fix logo fails to load from symlinked files on macOS (#1395, Logo, macOS)
* Fix 32-bit truncation (NetIO, macOS)

Logos:
* Fix Lilidog
* Add MidnightBSD
* Add Unifi
* Add Cosmic DE
* Update openSUSE Tumbleweed

# 2.29.0

Changes:
Expand Down
54 changes: 43 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.29.0
VERSION 2.30.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand All @@ -20,6 +20,9 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "OpenBSD")
set(OpenBSD TRUE CACHE BOOL "..." FORCE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "MidnightBSD")
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
set(MidnightBSD TRUE CACHE BOOL "..." FORCE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "NetBSD")
set(NetBSD TRUE CACHE BOOL "..." FORCE)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")
Expand Down Expand Up @@ -253,27 +256,39 @@ endfunction(fastfetch_load_text)

find_package(Python)
if(Python_FOUND)
message(STATUS "Minifying 'help.json'")
execute_process(COMMAND ${Python_EXECUTABLE} -c "import json,sys;json.dump(json.load(sys.stdin),sys.stdout,separators=(',',':'))"
INPUT_FILE "${CMAKE_CURRENT_SOURCE_DIR}/src/data/help.json"
OUTPUT_VARIABLE DATATEXT_JSON_HELP)
if(DATATEXT_JSON_HELP STREQUAL "")
message(ERROR "DATATEXT_JSON_HELP is empty, which should not happen!")
endif()
else()
message(STATUS "Python3 is not found, 'help.json' will not be minified")
message(WARNING "Python3 is not found, 'help.json' will not be minified")
file(READ "src/data/help.json" DATATEXT_JSON_HELP)
endif()

if(ENABLE_EMBEDDED_PCIIDS AND NOT EXISTS "fastfetch_pciids.c.inc")
if(Python_FOUND)
message(STATUS "Generating 'fastfetch_pciids.c.inc'")
execute_process(COMMAND ${Python_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/scripts/gen-pciids.py"
OUTPUT_FILE "fastfetch_pciids.c.inc")
else()
message(STATUS "Python3 is not found, 'fastfetch_pciids.c.inc' will not be generated")
message(WARNING "Python3 is not found, 'fastfetch_pciids.c.inc' will not be generated")
set(ENABLE_EMBEDDED_PCIIDS OFF)
endif()
endif()

if(Python_FOUND)
message(STATUS "Generating 'fastfetch.1'")
execute_process(COMMAND ${Python_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/scripts/gen-man.py"
OUTPUT_FILE "fastfetch.1")
else()
message(WARNING "Python3 is not found, use basic 'fastfetch.1.in' instead")
string(TIMESTAMP FASTFETCH_BUILD_DATE "%d %B %Y" UTC)
configure_file(doc/fastfetch.1.in fastfetch.1 @ONLY)
endif()

fastfetch_encode_c_string("${DATATEXT_JSON_HELP}" DATATEXT_JSON_HELP)
fastfetch_load_text(src/data/structure.txt DATATEXT_STRUCTURE)
fastfetch_load_text(src/data/help_footer.txt DATATEXT_HELP_FOOTER)
Expand All @@ -286,9 +301,6 @@ if(APPLE)
configure_file(src/util/apple/Info.plist.in Info.plist @ONLY)
endif()

string(TIMESTAMP FASTFETCH_BUILD_DATE "%d %B %Y" UTC)
configure_file(doc/fastfetch.1.in fastfetch.1 @ONLY)

####################
# Ascii image data #
####################
Expand Down Expand Up @@ -875,7 +887,7 @@ elseif(APPLE)
src/detection/media/media_apple.m
src/detection/memory/memory_apple.c
src/detection/mouse/mouse_apple.c
src/detection/netio/netio_bsd.c
src/detection/netio/netio_apple.c
src/detection/opengl/opengl_apple.c
src/detection/os/os_apple.m
src/detection/packages/packages_apple.c
Expand Down Expand Up @@ -912,6 +924,7 @@ elseif(WIN32)
src/detection/battery/battery_windows.c
src/detection/bios/bios_windows.c
src/detection/bluetooth/bluetooth_windows.c
src/detection/bluetooth/bluetooth_windows.cpp
src/detection/bluetoothradio/bluetoothradio_windows.c
src/detection/board/board_windows.c
src/detection/bootmgr/bootmgr_windows.c
Expand Down Expand Up @@ -1123,17 +1136,25 @@ if(APPLE AND EXISTS "/usr/bin/otool")
target_compile_definitions(libfastfetch PUBLIC FF_LIBSYSTEM_VERSION="${CMAKE_MATCH_1}")
endif()
endif()
if(FreeBSD AND EXISTS "/usr/local/bin/objdump")
if(MidnightBSD AND EXISTS "/usr/bin/objdump")
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"
OUTPUT_VARIABLE OBJDUMP_T_RESULT)
if("${OBJDUMP_T_RESULT}" MATCHES "FBSD_([0-9]+\\.[0-9]+)")
message(STATUS "Found FBSD ${CMAKE_MATCH_1}")
target_compile_definitions(libfastfetch PUBLIC FF_FBSD_VERSION="${CMAKE_MATCH_1}")
endif()
elseif(FreeBSD AND EXISTS "/usr/local/bin/objdump")
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"
OUTPUT_VARIABLE OBJDUMP_T_RESULT)
if("${OBJDUMP_T_RESULT}" MATCHES "FBSD_([0-9]+\\.[0-9]+)")
message(STATUS "Found FBSD ${CMAKE_MATCH_1}")
target_compile_definitions(libfastfetch PUBLIC FF_FBSD_VERSION="${CMAKE_MATCH_1}")
endif()
endif()
if(DragonFly AND EXISTS "/usr/local/bin/objdump")
elseif(DragonFly AND EXISTS "/usr/local/bin/objdump")
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"
OUTPUT_VARIABLE OBJDUMP_T_RESULT)
if("${OBJDUMP_T_RESULT}" MATCHES "DF([0-9]+\\.[0-9]+)")
message(STATUS "Found DF ${CMAKE_MATCH_1}")
target_compile_definitions(libfastfetch PUBLIC FF_DF_VERSION="${CMAKE_MATCH_1}")
endif()
endif()
Expand All @@ -1143,7 +1164,7 @@ if(LINUX)
elseif(ANDROID)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE _FILE_OFFSET_BITS=64 "$<$<CONFIG:DEBUG>:__BIONIC_FORTIFY>" "$<$<CONFIG:DEBUG>:__BIONIC_FORTIFY_RUNTIME_CHECKS_ENABLED>")
elseif(WIN32)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE WIN32_LEAN_AND_MEAN=1 _WIN32_WINNT=0x0A00 NOMINMAX) # "$<$<CONFIG:Release>:_FORTIFY_SOURCE=3>"
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE WIN32_LEAN_AND_MEAN _WIN32_WINNT=0x0A00 NOMINMAX UNICODE) # "$<$<CONFIG:Release>:_FORTIFY_SOURCE=3>"
elseif(APPLE)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE __STDC_WANT_LIB_EXT1__ _FILE_OFFSET_BITS=64 _DARWIN_C_SOURCE)
elseif(OpenBSD)
Expand All @@ -1159,6 +1180,16 @@ elseif(NetBSD)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/usr/X11R7/lib -Wl,-rpath,/usr/pkg/lib") # ditto
endif()

if(FreeBSD OR OpenBSD OR NetBSD)
include(CheckStructHasMember)
set(CMAKE_REQUIRED_DEFINITIONS "-D_IFI_OQDROPS=1")
CHECK_STRUCT_HAS_MEMBER("struct if_data" ifi_oqdrops net/if.h HAVE_IFI_OQDROPS LANGUAGE C)
if(HAVE_IFI_OQDROPS)
target_compile_definitions(libfastfetch PUBLIC _IFI_OQDROPS FF_HAVE_IFI_OQDROPS)
endif()
unset(CMAKE_REQUIRED_DEFINITIONS)
endif()

if(HAVE_STATX)
target_compile_definitions(libfastfetch PUBLIC FF_HAVE_STATX)
endif()
Expand Down Expand Up @@ -1425,6 +1456,7 @@ elseif(WIN32)
PRIVATE "imagehlp"
PRIVATE "cfgmgr32"
PRIVATE "winbrand"
PRIVATE "propsys"
)
elseif(FreeBSD)
target_link_libraries(libfastfetch
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Some distros package an outdated fastfetch version. Older versions receive no su
* openSUSE: `zypper install fastfetch`
* ALT Linux: `apt-get install fastfetch`
* Exherbo: `cave resolve --execute app-misc/fastfetch`
* GNU Guix: `guix install fastfetch`
* Solus: `eopkg install fastfetch`
* Slackware: `sbopkg -i fastfetch`
* Void Linux: `xbps-install fastfetch`
Expand Down Expand Up @@ -194,7 +193,7 @@ See [#1096](https://github.com/fastfetch-cli/fastfetch/issues/1096).

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

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

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`

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
fastfetch (2.29.0) jammy; urgency=medium

* Update to 2.29.0

-- Carter Li <[email protected]> Mon, 04 Nov 2024 15:05:02 +0800

fastfetch (2.28.0) jammy; urgency=medium

* Update to 2.28.0
Expand Down
2 changes: 1 addition & 1 deletion debian/files
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fastfetch_2.28.0_source.buildinfo universe/utils optional
fastfetch_2.29.0_source.buildinfo universe/utils optional
42 changes: 37 additions & 5 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,35 @@
"description": "Output color of the module. Left empty to use `display.color.output`",
"$ref": "#/$defs/colors"
},
"percentType": {
"description": "Set the percentage output type",
"oneOf": [
{
"type": "number",
"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",
"minimum": 0,
"maximum": 255,
"default": 9
},
{
"type": "array",
"description": "array of string flags",
"items": {
"enum": [
"num",
"bar",
"hide-others",
"num-color",
"bar-monochrome"
]
},
"default": [
"num",
"num-color"
]
}
]
},
"percent": {
"description": "Threshold of percentage colors",
"type": "object",
Expand All @@ -50,6 +79,9 @@
"minimum": 0,
"maximum": 100,
"description": "Value greater than green and less then yellow will be shown in yellow.\nValue greater than yellow will be shown in red"
},
"type": {
"$ref": "#/$defs/percentType"
}
}
},
Expand Down Expand Up @@ -576,11 +608,7 @@
"description": "Set how a percentage value should be displayed",
"properties": {
"type": {
"type": "number",
"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",
"minimum": 0,
"maximum": 255,
"default": 9
"$ref": "#/$defs/percentType"
},
"ndigits": {
"type": "number",
Expand Down Expand Up @@ -1942,15 +1970,19 @@
"eopkg",
"flatpak",
"guix",
"linglong",
"lpkg",
"lpkgbuild",
"macports",
"mport",
"nix",
"opkg",
"pacman",
"pacstall",
"paludis",
"pkg",
"pkgtool",
"qi",
"rpm",
"scoop",
"snap",
Expand Down
Loading
Loading