Skip to content

Commit f3417b1

Browse files
authored
Merge pull request #818 from fastfetch-cli/dev
Release: v2.10.3
2 parents 42b7d56 + c597b7e commit f3417b1

File tree

20 files changed

+358
-171
lines changed

20 files changed

+358
-171
lines changed

.github/workflows/ci.yml

Lines changed: 11 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@ jobs:
1414

1515
- name: Install codespell
1616
shell: bash
17-
run: sudo apt update && sudo apt install -y codespell
17+
run: |
18+
sudo apt-get update || true
19+
sudo apt-get install -y codespell
1820
1921
- name: Run Spellchecker
2022
run: codespell
2123

22-
Linux-old-amd64:
23-
name: Linux-old-amd64
24-
runs-on: ubuntu-20.04
24+
no-features-test:
25+
name: No-features-test
26+
runs-on: ubuntu-latest
2527
permissions:
2628
security-events: write
2729
contents: read
@@ -32,28 +34,12 @@ jobs:
3234
- name: uname -a
3335
run: uname -a
3436

35-
- name: install required packages
36-
run: sudo apt-get update && sudo apt-get install -y libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libnm-dev libpulse-dev libdrm-dev directx-headers-dev
37-
38-
- name: install linuxbrew packages
39-
run: |
40-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
41-
/home/linuxbrew/.linuxbrew/bin/brew install imagemagick chafa ddcutil --ignore-dependencies
42-
43-
- name: Initialize CodeQL
44-
uses: github/codeql-action/init@v3
45-
with:
46-
languages: c
47-
4837
- name: configure project
49-
run: PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/lib/pkgconfig:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
38+
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr . -DENABLE_VULKAN=OFF -DENABLE_WAYLAND=OFF -DENABLE_XCB_RANDR=OFF -DENABLE_XCB=OFF -DENABLE_XRANDR=OFF -DENABLE_X11=OFF -DENABLE_DRM=OFF -DENABLE_GIO=OFF -DENABLE_DCONF=OFF -DENABLE_DBUS=OFF -DENABLE_XFCONF=OFF -DENABLE_SQLITE3=OFF -DENABLE_RPM=OFF -DENABLE_IMAGEMAGICK7=OFF -DENABLE_IMAGEMAGICK6=OFF -DENABLE_CHAFA=OFF -DENABLE_ZLIB=OFF -DENABLE_EGL=OFF -DENABLE_GLX=OFF -DENABLE_OSMESA=OFF -DENABLE_OPENCL=OFF -DENABLE_LIBNM=OFF -DENABLE_FREETYPE=OFF -DENABLE_PULSE=OFF -DENABLE_DDCUTIL=OFF -DENABLE_DIRECTX_HEADERS=OFF -DENABLE_THREADS=OFF
5039

5140
- name: build project
5241
run: cmake --build . --target package --verbose -j4
5342

54-
- name: perform CodeQL analysis
55-
uses: github/codeql-action/analyze@v3
56-
5743
- name: list features
5844
run: ./fastfetch --list-features
5945

@@ -72,20 +58,12 @@ jobs:
7258
- name: run tests
7359
run: ctest
7460

75-
- name: upload artifacts
76-
uses: actions/upload-artifact@v4
77-
with:
78-
name: fastfetch-linux-old-amd64
79-
path: ./fastfetch-*.*
80-
8161
linux-amd64:
8262
name: Linux-amd64
83-
runs-on: ubuntu-22.04 # Ubuntu 22.04 uses Glibc 2.35. Should be fine with Debian 12, which uses Glibc 2.36 (https://packages.debian.org/source/bookworm/glibc)
63+
runs-on: ubuntu-20.04
8464
permissions:
8565
security-events: write
8666
contents: read
87-
outputs:
88-
ffversion: ${{ steps.ffversion.outputs.ffversion }}
8967
steps:
9068
- name: checkout repository
9169
uses: actions/checkout@v4
@@ -94,12 +72,12 @@ jobs:
9472
run: uname -a
9573

9674
- name: install required packages
97-
run: sudo apt-get update && sudo apt-get install -y libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libnm-dev libpulse-dev libdrm-dev libddcutil-dev libchafa-dev directx-headers-dev
75+
run: sudo apt-get update && sudo apt-get install -y libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libnm-dev libpulse-dev libdrm-dev directx-headers-dev
9876

9977
- name: install linuxbrew packages
10078
run: |
10179
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
102-
/home/linuxbrew/.linuxbrew/bin/brew install imagemagick --ignore-dependencies
80+
/home/linuxbrew/.linuxbrew/bin/brew install imagemagick chafa ddcutil --ignore-dependencies
10381
10482
- name: Initialize CodeQL
10583
uses: github/codeql-action/init@v3
@@ -133,10 +111,6 @@ jobs:
133111
- name: run tests
134112
run: ctest
135113

136-
- name: get fastfetch version
137-
id: ffversion
138-
run: echo "ffversion=$(./fastfetch --version-raw)" >> $GITHUB_OUTPUT
139-
140114
- name: upload artifacts
141115
uses: actions/upload-artifact@v4
142116
with:
@@ -258,7 +232,7 @@ jobs:
258232

259233
macos-universal:
260234
name: macOS-universal
261-
runs-on: macos-latest
235+
runs-on: macos-12
262236
permissions:
263237
security-events: write
264238
contents: read
@@ -541,11 +515,6 @@ jobs:
541515
if: needs.linux-amd64.outputs.ffversion != steps.get_version_release.outputs.release
542516
uses: actions/download-artifact@v4
543517

544-
- name: rm old artifacts
545-
if: needs.linux-amd64.outputs.ffversion != steps.get_version_release.outputs.release
546-
run: |
547-
rm -rf fastfetch-*-old-*
548-
549518
- name: create release
550519
if: needs.linux-amd64.outputs.ffversion != steps.get_version_release.outputs.release
551520
uses: ncipollo/release-action@v1

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
# 2.10.3
2+
3+
Changes:
4+
* Default `hideCursor` to false. It doesn't make much difference but makes user's terminal unusable if fastfetch is not exited correctly.
5+
* Linux amd64 binaries are built with Ubuntu 20.04 again (#808)
6+
7+
Bugfixes:
8+
* Fix swap usage detection in x86-32 build (Windows, Swap)
9+
* Fix minimum cmake version support (#810)
10+
* Fix wifi detection on platforms that don't use NetworkManager (#811, Wifi, Linux)
11+
* Fix NixOS wrapped process name (#814, Terminal, Linux)
12+
* Fix GPU type detection for AMD cards (#816, GPU, Linux)
13+
14+
Features:
15+
* Add basic support DE detection support for UKUI (DE, Linux)
16+
* Support printing total number of nix / flatpak / brew packages (Packages)
17+
* See `fastfetch -h packages-format` for detail
18+
* Better max CPU frequency detection support with `CPUID / 16H` instruction (CPU, Windows)
19+
* This requires Core I Gen 6 or newer, and with `Virtual Machine Platform` Windows feature disabled. X86 only.
20+
* Improve performance of nix packages detection (Packages, Linux)
21+
122
# 2.10.2
223

324
Bugfixes:

CMakeLists.txt

Lines changed: 13 additions & 13 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.10.2
4+
VERSION 2.10.3
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -255,7 +255,7 @@ file(GLOB LOGO_FILES "src/logo/ascii/*.txt")
255255
set(LOGO_BUILTIN_H "#pragma once\n#pragma GCC diagnostic ignored \"-Wtrigraphs\"\n\n")
256256
foreach(file ${LOGO_FILES})
257257
fastfetch_load_text("${file}" content)
258-
get_filename_component(file "${file}" NAME_WLE)
258+
get_filename_component(file "${file}" NAME_WE)
259259
string(TOUPPER "${file}" file)
260260
string(REGEX REPLACE "\\$\\{c([0-9]+)\\}" "$\\1" content "${content}")
261261
set(LOGO_BUILTIN_H "${LOGO_BUILTIN_H}#define FASTFETCH_DATATEXT_LOGO_${file} ${content}\n")
@@ -933,10 +933,6 @@ if(ENABLE_THREADS)
933933
endif()
934934
endif()
935935

936-
if(ENABLE_PCI_MEMORY)
937-
target_compile_definitions(libfastfetch PRIVATE FF_USE_PCI_MEMORY)
938-
endif()
939-
940936
if(LINUX)
941937
target_link_libraries(libfastfetch
942938
PRIVATE "m"
@@ -1147,16 +1143,20 @@ endif()
11471143

11481144
if(LINUX)
11491145
find_program(HAVE_DPKG "dpkg")
1150-
find_program(HAVE_RPMBUILD "rpmbuild")
1151-
if(HAVE_DPKG AND HAVE_RPMBUILD)
1152-
set(CPACK_GENERATOR "${CPACK_GENERATOR};DEB;RPM")
1146+
if(HAVE_DPKG)
1147+
set(CPACK_GENERATOR "${CPACK_GENERATOR};DEB")
1148+
1149+
set(CPACK_DEBIAN_PACKAGE_SECTION, "utils")
1150+
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
1151+
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6")
11531152
endif()
11541153

1155-
set(CPACK_DEBIAN_PACKAGE_SECTION, "utils")
1156-
set(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
1157-
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libc6")
1154+
find_program(HAVE_RPMBUILD "rpmbuild")
1155+
if(HAVE_RPMBUILD)
1156+
set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
11581157

1159-
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
1158+
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
1159+
endif()
11601160
endif()
11611161

11621162
set(CPACK_SET_DESTDIR ON)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ There are [screenshots on different platforms](https://github.com/fastfetch-cli/
2929

3030
Some distros packaged an outdated fastfetch version. Older version is not supported, please always ensure that the latest version is used.
3131

32-
* Ubuntu: [`ppa:zhangsongcui3371/fastfetch`](https://launchpad.net/~zhangsongcui3371/+archive/ubuntu/fastfetch) (for Ubuntu 22.04 or above)
33-
* Debian / Ubuntu: Download `fastfetch-<version>-Linux.deb` from [Github release page](https://github.com/fastfetch-cli/fastfetch/releases/latest) and `dpkg -i fastfetch-<version>-Linux.deb` (for Ubuntu 22.04 or above and Debian 12 or above).
32+
* Ubuntu: [`ppa:zhangsongcui3371/fastfetch`](https://launchpad.net/~zhangsongcui3371/+archive/ubuntu/fastfetch) (for Ubuntu 22.04 or newer)
33+
* Debian / Ubuntu: Download `fastfetch-<version>-Linux.deb` from [Github release page](https://github.com/fastfetch-cli/fastfetch/releases/latest) and `dpkg -i fastfetch-<version>-Linux.deb` (for Ubuntu 20.04 or newer and Debian 11 or newer).
3434
* Arch Linux: `sudo pacman -S fastfetch`
3535
* Fedora: `sudo dnf install fastfetch`
3636
* Gentoo: `sudo emerge --ask app-misc/fastfetch`

doc/json_schema.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -679,6 +679,7 @@
679679
"board",
680680
"break",
681681
"brightness",
682+
"camera",
682683
"chassis",
683684
"cpu",
684685
"cpuusage",
@@ -772,6 +773,10 @@
772773
"const": "board",
773774
"description": "Print mather board name and other info"
774775
},
776+
{
777+
"const": "camera",
778+
"description": "Print available cameras"
779+
},
775780
{
776781
"const": "cursor",
777782
"description": "Print cursor style name"

src/common/init.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,6 @@ void ffListFeatures(void)
238238
#ifdef FF_HAVE_DDCUTIL
239239
"libddcutil\n"
240240
#endif
241-
#if __has_include(<linux/videodev2.h>)
242-
"videodev2\n"
243-
#endif
244241
#ifdef FF_HAVE_DIRECTX_HEADERS
245242
"Directx Headers\n"
246243
#endif
@@ -250,8 +247,11 @@ void ffListFeatures(void)
250247
#ifdef FF_USE_SYSTEM_YYJSON
251248
"System yyjson\n"
252249
#endif
253-
#ifdef FF_USE_PCI_MEMORY
254-
"PCI memory\n"
250+
#if __has_include(<linux/videodev2.h>)
251+
"linux/videodev2\n"
252+
#endif
253+
#if __has_include(<linux/wireless.h>)
254+
"linux/wireless\n"
255255
#endif
256256
""
257257
, stdout);

src/common/library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include <stdarg.h>
55

66
//Clang doesn't define __SANITIZE_ADDRESS__ but defines __has_feature(address_sanitizer)
7-
#if defined(__has_feature)
7+
#if !defined(__SANITIZE_ADDRESS__) && defined(__has_feature)
88
#if __has_feature(address_sanitizer)
99
#define __SANITIZE_ADDRESS__
1010
#endif

src/detection/cpu/cpu_windows.c

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,31 @@ typedef struct FFSmbiosProcessorInfo
5050
uint16_t ThreadEnabled; // varies
5151
} FFSmbiosProcessorInfo;
5252

53+
#if defined(__x86_64__) || defined(__i386__)
54+
55+
#include <cpuid.h>
56+
57+
inline static const char* detectSpeedByCpuid(FFCPUResult* cpu)
58+
{
59+
uint32_t base = 0, max = 0, bus = 0, unused = 0;
60+
if (!__get_cpuid(0x16, &base, &max, &bus, &unused))
61+
return "Unsupported instruction";
62+
63+
// cpuid returns 0 MHz when hyper-v is enabled
64+
if (base) cpu->frequencyBase = base / 1000.0;
65+
if (max) cpu->frequencyMax = max / 1000.0;
66+
return NULL;
67+
}
68+
69+
#else
70+
71+
inline static const char* detectSpeedByCpuid(FFCPUResult* cpu)
72+
{
73+
return "Unsupported platform";
74+
}
75+
76+
#endif
77+
5378
static const char* detectMaxSpeedBySmbios(FFCPUResult* cpu)
5479
{
5580
const FFSmbiosProcessorInfo* data = (const FFSmbiosProcessorInfo*) (*ffGetSmbiosHeaderTable())[FF_SMBIOS_TYPE_PROCESSOR_INFO];
@@ -114,6 +139,7 @@ static const char* detectByRegistry(FFCPUResult* cpu)
114139
if(!ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, L"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0", &hKey, NULL))
115140
return "ffRegOpenKeyForRead(HKEY_LOCAL_MACHINE, L\"HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0\", &hKey, NULL) failed";
116141

142+
if (detectSpeedByCpuid(cpu) != NULL || cpu->frequencyBase != cpu->frequencyBase)
117143
{
118144
uint32_t mhz;
119145
if(ffRegReadUint(hKey, L"~MHz", &mhz, NULL))
@@ -141,7 +167,8 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
141167
if (error)
142168
return error;
143169

144-
detectMaxSpeedBySmbios(cpu);
170+
if (cpu->frequencyMax != cpu->frequencyMax)
171+
detectMaxSpeedBySmbios(cpu);
145172

146173
if(options->temp)
147174
ffDetectSmbiosTemp(&cpu->temperature, NULL);

src/detection/displayserver/displayserver.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#define FF_DE_PRETTY_BUDGIE "Budgie"
1414
#define FF_DE_PRETTY_CDE "CDE"
1515
#define FF_DE_PRETTY_UNITY "Unity"
16+
#define FF_DE_PRETTY_UKUI "UKUI"
1617

1718
#define FF_WM_PRETTY_KWIN "KWin"
1819
#define FF_WM_PRETTY_MUTTER "Mutter"

src/detection/displayserver/linux/wayland/global-output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ void ffWaylandHandleGlobalOutput(WaylandData* wldata, struct wl_registry* regist
118118
rotation,
119119
display.edidName.length
120120
? &display.edidName
121-
: display.description.length
121+
: display.description.length && !ffStrbufEndsWithS(&display.description, "-unknown")
122122
? &display.description
123123
: &display.name,
124124
display.type,

0 commit comments

Comments
 (0)