Skip to content

Commit e0452d9

Browse files
authored
Merge pull request #1784 from fastfetch-cli/dev
Release: v2.45.0
2 parents 7e235b6 + d8e74ba commit e0452d9

38 files changed

+670
-139
lines changed

.github/workflows/ci.yml

Lines changed: 75 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ jobs:
383383
run: |
384384
cat /etc/alpine-release
385385
uname -a
386-
apk add cmake samurai vulkan-loader-dev libxcb-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev elfutils-dev gcc g++
386+
apk add cmake samurai vulkan-loader-dev libxcb-dev libxrandr-dev rpm-dev wayland-dev libdrm-dev dconf-dev imagemagick-dev chafa-dev zlib-dev dbus-dev mesa-dev opencl-dev xfconf-dev sqlite-dev networkmanager-dev pulseaudio-dev ddcutil-dev elfutils-dev gcc g++
387387
shell: alpine.sh --root {0}
388388

389389
- name: build
@@ -597,6 +597,80 @@ jobs:
597597
name: fastfetch-netbsd-amd64
598598
path: ./fastfetch-*.*
599599

600+
dragonfly-amd64:
601+
name: DragonFly-amd64
602+
runs-on: ubuntu-latest
603+
if: false
604+
permissions:
605+
security-events: write
606+
contents: read
607+
steps:
608+
- name: checkout repository
609+
uses: actions/checkout@v4
610+
611+
- name: run VM
612+
uses: vmactions/dragonflybsd-vm@v1
613+
with:
614+
usesh: yes
615+
prepare: |
616+
uname -a
617+
pkg update
618+
pkg install -y cmake git pkgconf binutils wayland vulkan-headers vulkan-loader libxcb libXrandr libX11 libdrm glib dconf dbus sqlite3-tcl xfce4-conf egl opencl ocl-icd v4l_compat chafa libelf
619+
620+
run: |
621+
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On .
622+
cmake --build . --target package --verbose -j4
623+
./fastfetch --list-features
624+
time ./fastfetch -c presets/ci.jsonc --stat false
625+
time ./fastfetch -c presets/ci.jsonc --format json
626+
time ./flashfetch
627+
ldd fastfetch
628+
ctest --output-on-failure
629+
630+
- name: upload artifacts
631+
uses: actions/upload-artifact@v4
632+
with:
633+
name: fastfetch-dragonfly-amd64
634+
path: ./fastfetch-*.*
635+
636+
haiku-amd64:
637+
name: Haiku-amd64
638+
runs-on: ubuntu-latest
639+
if: false
640+
permissions:
641+
security-events: write
642+
contents: read
643+
steps:
644+
- name: checkout repository
645+
uses: actions/checkout@v4
646+
647+
- name: run VM
648+
uses: cross-platform-actions/action@master
649+
with:
650+
operating_system: haiku
651+
architecture: x86-64
652+
cpu_count: 4
653+
shell: bash
654+
version: 'r1beta5'
655+
run: |
656+
uname -a
657+
ls -l
658+
pkgman install -y git dbus_devel mesa_devel libelf_devel imagemagick_devel opencl_headers ocl_icd_devel vulkan_devel zlib_devel chafa_devel cmake gcc make pkgconfig python3.10
659+
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On .
660+
cmake --build . --target package --verbose -j4
661+
./fastfetch --list-features
662+
time ./fastfetch -c presets/ci.jsonc --stat false
663+
time ./fastfetch -c presets/ci.jsonc --format json
664+
time ./flashfetch
665+
ldd fastfetch
666+
ctest --output-on-failure
667+
668+
- name: upload artifacts
669+
uses: actions/upload-artifact@v4
670+
with:
671+
name: fastfetch-haiku-amd64
672+
path: ./fastfetch-*.*
673+
600674
windows-amd64:
601675
name: Windows-amd64
602676
runs-on: windows-latest

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,29 @@
1+
# 2.45.0
2+
3+
Features:
4+
* Support OnePlus marketing name detection (#1768, Host, Android)
5+
* Recognize additional GPU vendors (GPU, Linux)
6+
* Support CTWM, FVWM and I3 window manager version detection (WM)
7+
* Support KDE version detection on *BSD (DE, FreeBSD)
8+
* Support `"logo": { "type": "command-raw" }` to run a command and display its output as logo (#1780, Logo)
9+
* Useful for displaying custom logos generated by other programs such as `pokeget`: `{ "type": "command-raw", "source": "pokeget random --hide-name" }`
10+
* Supported in JSONC config file only. `pokeget random --hide-name | fastfetch --file-raw -` should be used in shell.
11+
* Acquire SMBIOS information on DragonFly BSD from `/dev/mem`; legacy BIOS only (PhysicalMemory, DragonFly)
12+
* Support swap usage detection on DragonFly BSD (Swap, DragonFly)
13+
* Support `--swap-separate` to display detailed swap devices on separate lines (Swap)
14+
15+
Bugfixes
16+
* Fix MacBook Air model name (#1779, Host, macOS)
17+
* Don't ignore sshfs mountpoints (#1776, Disk, Linux / FreeBSD)
18+
* Fix dnf package count detection (#1777, Packages, Linux)
19+
20+
Logos:
21+
* Add Starry Linux (#1771)
22+
* Add rhel_small (#1774)
23+
* Update color palette of voidlinux (#1775)
24+
* Add void2
25+
* Update Xenia Linux (#1783)
26+
127
# 2.44.0
228

329
Features:

CMakeLists.txt

Lines changed: 13 additions & 8 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.44.0
4+
VERSION 2.45.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -787,7 +787,7 @@ elseif(NetBSD)
787787
src/detection/netio/netio_bsd.c
788788
src/detection/opengl/opengl_linux.c
789789
src/detection/os/os_nbsd.c
790-
src/detection/packages/packages_obsd.c
790+
src/detection/packages/packages_nbsd.c
791791
src/detection/poweradapter/poweradapter_nosupport.c
792792
src/detection/processes/processes_nbsd.c
793793
src/detection/gtk_qt/qt.c
@@ -802,7 +802,7 @@ elseif(NetBSD)
802802
src/detection/users/users_linux.c
803803
src/detection/wallpaper/wallpaper_linux.c
804804
src/detection/wifi/wifi_nbsd.c
805-
src/detection/wm/wm_nosupport.c
805+
src/detection/wm/wm_linux.c
806806
src/detection/de/de_linux.c
807807
src/detection/wmtheme/wmtheme_linux.c
808808
src/detection/camera/camera_linux.c
@@ -884,7 +884,7 @@ elseif(OpenBSD)
884884
src/detection/users/users_obsd.c
885885
src/detection/wallpaper/wallpaper_linux.c
886886
src/detection/wifi/wifi_obsd.c
887-
src/detection/wm/wm_nosupport.c
887+
src/detection/wm/wm_linux.c
888888
src/detection/de/de_linux.c
889889
src/detection/wmtheme/wmtheme_linux.c
890890
src/detection/camera/camera_linux.c
@@ -1961,12 +1961,17 @@ if(LINUX)
19611961
endif()
19621962
endif()
19631963

1964-
find_program(HAVE_RPMBUILD "rpmbuild")
1965-
if(HAVE_RPMBUILD)
1966-
set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
1964+
if(NOT IS_MUSL)
1965+
find_program(HAVE_RPMBUILD "rpmbuild")
1966+
if(HAVE_RPMBUILD)
1967+
set(CPACK_GENERATOR "${CPACK_GENERATOR};RPM")
19671968

1968-
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
1969+
set(CPACK_RPM_PACKAGE_LICENSE "MIT")
1970+
endif()
19691971
endif()
1972+
elseif(FreeBSD)
1973+
set(CPACK_FREEBSD_PACKAGE_LICENSE "MIT")
1974+
set(CPACK_GENERATOR "${CPACK_GENERATOR};FREEBSD")
19701975
endif()
19711976

19721977
set(CPACK_SET_DESTDIR ON)

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.44.0) jammy; urgency=medium
2+
3+
* Update to 2.44.0
4+
5+
-- Carter Li <[email protected]> Mon, 26 May 2025 14:59:01 +0800
6+
17
fastfetch (2.43.0) jammy; urgency=medium
28

39
* Update to 2.43.0

debian/files

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

doc/json_schema.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@
115115
"type": "string"
116116
},
117117
"biosFormat": {
118-
"description": "Output format of the module `Bios`. See Wiki for formatting syntax\n 1. {date}: Bios date\n 2. {release}: Bios release\n 3. {vendor}: Bios vendor\n 4. {version}: Bios version\n 5. {type}: Firmware type",
118+
"description": "Output format of the module `BIOS`. See Wiki for formatting syntax\n 1. {date}: Bios date\n 2. {release}: Bios release\n 3. {vendor}: Bios vendor\n 4. {version}: Bios version\n 5. {type}: Firmware type",
119119
"type": "string"
120120
},
121121
"bluetoothFormat": {
@@ -339,7 +339,7 @@
339339
"type": "string"
340340
},
341341
"titleFormat": {
342-
"description": "Output format of the module `Title`. See Wiki for formatting syntax\n 1. {user-name}: User name\n 2. {host-name}: Host name\n 3. {home-dir}: Home directory\n 4. {exe-path}: Executable path of current process\n 5. {user-shell}: User's default shell\n 6. {user-name-colored}: User name (colored)\n 7. {at-symbol-colored}: @ symbol (colored)\n 8. {host-name-colored}: Host name (colored)",
342+
"description": "Output format of the module `Title`. See Wiki for formatting syntax\n 1. {user-name}: User name\n 2. {host-name}: Host name\n 3. {home-dir}: Home directory\n 4. {exe-path}: Executable path of current process\n 5. {user-shell}: User's default shell\n 6. {user-name-colored}: User name (colored)\n 7. {at-symbol-colored}: @ symbol (colored)\n 8. {host-name-colored}: Host name (colored)\n 9. {full-user-name}: Full user name",
343343
"type": "string"
344344
},
345345
"themeFormat": {
@@ -429,6 +429,7 @@
429429
"file-raw",
430430
"data",
431431
"data-raw",
432+
"command-raw",
432433
"sixel",
433434
"kitty",
434435
"kitty-direct",

src/detection/cpu/cpu_windows.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ static const char* detectNCores(FFCPUResult* cpu)
151151
else if (ptr->Relationship == RelationProcessorCore)
152152
++cpu->coresPhysical;
153153
else if (ptr->Relationship == RelationProcessorPackage)
154-
cpu->packages++;
154+
++cpu->packages;
155155
}
156156

157157
return NULL;

src/detection/de/de_linux.c

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,29 @@
1010
#include "util/stringUtils.h"
1111

1212
#include <ctype.h>
13+
#ifdef __FreeBSD__
14+
#include <paths.h>
15+
#ifndef _PATH_LOCALBASE
16+
#define _PATH_LOCALBASE "/usr/local"
17+
#endif
18+
#elif __OpenBSD__
19+
#define _PATH_LOCALBASE "/usr/local"
20+
#elif __NetBSD__
21+
#define _PATH_LOCALBASE "/usr/pkg"
22+
#endif
1323

1424
static void getKDE(FFstrbuf* result, FFDEOptions* options)
1525
{
16-
ffParsePropFileValues(FASTFETCH_TARGET_DIR_USR "/share/wayland-sessions/plasma.desktop", 1, (FFpropquery[]) {
17-
{"X-KDE-PluginInfo-Version =", result}
18-
});
26+
#ifdef _PATH_LOCALBASE
27+
ffParsePropFile(_PATH_LOCALBASE "/share/wayland-sessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result);
1928
if(result->length == 0)
20-
{
21-
ffParsePropFileValues(FASTFETCH_TARGET_DIR_USR "/share/xsessions/plasmax11.desktop", 1, (FFpropquery[]) {
22-
{"X-KDE-PluginInfo-Version =", result}
23-
});
24-
}
29+
ffParsePropFile(_PATH_LOCALBASE "/share/xsessions/plasmax11.desktop", "X-KDE-PluginInfo-Version =", result);
30+
#else
31+
ffParsePropFile(FASTFETCH_TARGET_DIR_USR "/share/wayland-sessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result);
32+
if(result->length == 0)
33+
ffParsePropFile(FASTFETCH_TARGET_DIR_USR "/share/xsessions/plasmax11.desktop", "X-KDE-PluginInfo-Version =", result);
34+
#endif
35+
2536
if(result->length == 0)
2637
ffParsePropFileData("xsessions/plasma.desktop", "X-KDE-PluginInfo-Version =", result);
2738
if(result->length == 0)

src/detection/disk/disk_bsd.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ static const char* detectFsLabel(struct statfs* fs, FFDisk* disk)
5252
return NULL;
5353
}
5454
#else
55-
static const char* detectFsLabel(struct statfs* fs, FFDisk* disk)
55+
static const char* detectFsLabel(FF_MAYBE_UNUSED struct statfs* fs, FF_MAYBE_UNUSED FFDisk* disk)
5656
{
5757
return "Fastfetch was compiled without libgeom support";
5858
}
@@ -148,7 +148,7 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
148148
if(!ffDiskMatchMountpoint(&options->folders, fs->f_mntonname))
149149
continue;
150150
}
151-
else if(!ffStrEquals(fs->f_mntonname, "/") && !ffStrStartsWith(fs->f_mntfromname, "/dev/") && !ffStrEquals(fs->f_fstypename, "zfs"))
151+
else if(!ffStrEquals(fs->f_mntonname, "/") && !ffStrStartsWith(fs->f_mntfromname, "/dev/") && !ffStrEquals(fs->f_fstypename, "zfs") && !ffStrEquals(fs->f_fstypename, "fusefs.sshfs"))
152152
continue;
153153

154154
#ifdef __FreeBSD__
@@ -159,13 +159,13 @@ const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
159159

160160
FFDisk* disk = ffListAdd(disks);
161161

162-
disk->bytesTotal = (uint64_t)fs->f_blocks * fs->f_bsize;
163-
disk->bytesFree = (uint64_t)fs->f_bfree * fs->f_bsize;
164-
disk->bytesAvailable = (uint64_t)fs->f_bavail * fs->f_bsize;
162+
disk->bytesTotal = (uint64_t)fs->f_blocks * (uint64_t)fs->f_bsize;
163+
disk->bytesFree = (uint64_t)fs->f_bfree * (uint64_t)fs->f_bsize;
164+
disk->bytesAvailable = (uint64_t)fs->f_bavail * (uint64_t)fs->f_bsize;
165165
disk->bytesUsed = 0; // To be filled in ./disk.c
166166

167167
disk->filesTotal = (uint32_t) fs->f_files;
168-
disk->filesUsed = (uint32_t) (fs->f_files - fs->f_ffree);
168+
disk->filesUsed = (uint32_t) fs->f_files - (uint32_t) fs->f_ffree;
169169

170170
ffStrbufInitS(&disk->mountFrom, fs->f_mntfromname);
171171
ffStrbufInitS(&disk->mountpoint, fs->f_mntonname);

src/detection/disk/disk_linux.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ static bool isPhysicalDevice(const struct mntent* device)
3737
if(ffStrEquals(device->mnt_type, "zfs"))
3838
return true;
3939

40+
//sshfs
41+
if(ffStrEquals(device->mnt_type, "fuse.sshfs"))
42+
return true;
43+
4044
//Pseudo filesystems don't have a device in /dev
4145
if(!ffStrStartsWith(device->mnt_fsname, "/dev/"))
4246
return false;

0 commit comments

Comments
 (0)