Skip to content

Commit 52de8df

Browse files
authored
Merge pull request #1492 from fastfetch-cli/dev
Release: v2.34.0
2 parents 1a9e637 + be99c4c commit 52de8df

Some content is hidden

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

72 files changed

+982
-244
lines changed

.github/workflows/ci.yml

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,41 @@ jobs:
232232
name: fastfetch-linux-riscv64
233233
path: ./fastfetch-*.*
234234

235+
linux-ppc64le:
236+
name: Linux-ppc64le
237+
runs-on: ubuntu-22.04
238+
permissions:
239+
security-events: write
240+
contents: read
241+
steps:
242+
- name: checkout repository
243+
uses: actions/checkout@v4
244+
245+
- name: run VM
246+
uses: uraimo/run-on-arch-action@v2
247+
id: runcmd
248+
with:
249+
arch: ppc64le
250+
distro: ubuntu20.04
251+
githubToken: ${{ github.token }}
252+
run: |
253+
uname -a
254+
apt-get update && apt-get install -y cmake make g++ 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 libpulse-dev libdrm-dev libchafa-dev libelf-dev directx-headers-dev rpm
255+
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
256+
cmake --build . --target package --verbose -j4
257+
./fastfetch --list-features
258+
time ./fastfetch -c presets/ci.jsonc --stat false
259+
time ./fastfetch -c presets/ci.jsonc --format json
260+
time ./flashfetch
261+
ldd fastfetch
262+
ctest
263+
264+
- name: upload artifacts
265+
uses: actions/upload-artifact@v4
266+
with:
267+
name: fastfetch-linux-ppc64le
268+
path: ./fastfetch-*.*
269+
235270
musl-amd64:
236271
name: Musl-amd64
237272
runs-on: ubuntu-latest
@@ -377,7 +412,7 @@ jobs:
377412
architecture: x86-64
378413
cpu_count: 4
379414
shell: bash
380-
version: '14.1'
415+
version: '14.2'
381416
run: |
382417
uname -a
383418
sudo pkg update
@@ -449,7 +484,7 @@ jobs:
449484
architecture: x86-64
450485
cpu_count: 4
451486
shell: bash
452-
version: '7.5'
487+
version: '7.6'
453488
run: |
454489
uname -a
455490
sudo pkg_add -r cmake git pkgconf wayland vulkan-headers vulkan-loader glib2 dconf dbus sqlite3 xfconf imagemagick chafa pulseaudio hwdata py3-requests
@@ -578,6 +613,7 @@ jobs:
578613
- linux-aarch64
579614
- linux-armv7
580615
- linux-riscv64
616+
- linux-ppc64le
581617
- musl-amd64
582618
- macos-universal
583619
- freebsd-amd64

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,39 @@
1+
# 2.34.0
2+
3+
Changes:
4+
* We now print distro pretty name if available (OS)
5+
* This is a long requested feature. However, it may break some distros. File a bug with the content of `/etc/os-release` if it breaks your distro.
6+
7+
Bugfixes:
8+
* Fix thunderbolt version of new MBPs (#1465, Host, macOS)
9+
* Fix backlight name detection on FreeBSD (Brightness, FreeBSD)
10+
* Fix Terminal detection when running fastfetch in `pk-command-not-found` (#1467, Terminal, Linux)
11+
* Relax detection of terminals in NixOS (#1479, Terminal, Linux)
12+
* Should fix konsole, ghostty and maybe others
13+
* Fix core count output in multi-package platforms (CPU)
14+
* Don't suppress the output of `preRun` (#1489)
15+
* Fix battery percentage detection (Battery, NetBSD)
16+
17+
Features:
18+
* Support ghostty terminal font detection (TerminalFont, Linux / macOS)
19+
* Support `kitty-icat` image protocol, which uses `kitten icat` to generate image data
20+
* Pros: support tmux; support gif animations; good performance
21+
* Cons: due to the limitation of `kitten icat`, we need to clear the screen before displaying the image logo
22+
* Support WM version detection (WM)
23+
* In Linux, Hyprland & sway are supported currently
24+
* Improve performance when stdout is redirected (TerminalSize)
25+
* Report thermal zone temp if CPU temp is not available (CPU, Linux)
26+
* Report sound server (Pipewire or PulseAudio) if available (#1454, Sound, Linux)
27+
* Enable OpenGL & OpenCL detection on Android (OpenGL / OpenCL, Android)
28+
* Detect & report MediaTek Dimensity 9000+ SOC name (CPU, Android)
29+
* Support appman (am-user) package manager detection (Packages, Linux)
30+
31+
Logo:
32+
* Add Lubuntu
33+
* Update Xray_os
34+
* Add SnigdhaOS
35+
* Add Rhino Linux
36+
137
# 2.33.0
238

339
Changes:

CMakeLists.txt

Lines changed: 24 additions & 6 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.33.0
4+
VERSION 2.34.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -70,8 +70,8 @@ cmake_dependent_option(ENABLE_IMAGEMAGICK7 "Enable imagemagick 7" ON "LINUX OR F
7070
cmake_dependent_option(ENABLE_IMAGEMAGICK6 "Enable imagemagick 6" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR APPLE OR SunOS" OFF)
7171
cmake_dependent_option(ENABLE_CHAFA "Enable chafa" ON "ENABLE_IMAGEMAGICK6 OR ENABLE_IMAGEMAGICK7" OFF)
7272
cmake_dependent_option(ENABLE_ZLIB "Enable zlib" ON "ENABLE_IMAGEMAGICK6 OR ENABLE_IMAGEMAGICK7" OFF)
73-
cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR WIN32 OR SunOS" OFF)
74-
cmake_dependent_option(ENABLE_GLX "Enable glx" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF)
73+
cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR ANDROID OR WIN32 OR SunOS" OFF)
74+
cmake_dependent_option(ENABLE_GLX "Enable glx" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR ANDROID OR SunOS" OFF)
7575
cmake_dependent_option(ENABLE_OSMESA "Enable osmesa" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR SunOS" OFF)
7676
cmake_dependent_option(ENABLE_OPENCL "Enable opencl" ON "LINUX OR FreeBSD OR OpenBSD OR NetBSD OR WIN32 OR ANDROID OR SunOS" OFF)
7777
cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF)
@@ -534,7 +534,7 @@ if(LINUX)
534534
src/detection/users/users_linux.c
535535
src/detection/wallpaper/wallpaper_linux.c
536536
src/detection/wifi/wifi_linux.c
537-
src/detection/wm/wm_nosupport.c
537+
src/detection/wm/wm_linux.c
538538
src/detection/de/de_linux.c
539539
src/detection/wmtheme/wmtheme_linux.c
540540
src/detection/camera/camera_linux.c
@@ -617,7 +617,6 @@ elseif(FreeBSD)
617617
src/common/sysctl.c
618618
src/detection/battery/battery_bsd.c
619619
src/detection/bios/bios_bsd.c
620-
src/detection/bluetooth/bluetooth_nosupport.c
621620
src/detection/bluetoothradio/bluetoothradio_nosupport.c
622621
src/detection/board/board_bsd.c
623622
src/detection/bootmgr/bootmgr_bsd.c
@@ -690,6 +689,15 @@ elseif(FreeBSD)
690689
src/util/platform/FFPlatform_unix.c
691690
src/util/binary_linux.c
692691
)
692+
if(DragonFly)
693+
list(APPEND LIBFASTFETCH_SRC
694+
src/detection/bluetooth/bluetooth_nosupport.c
695+
)
696+
else()
697+
list(APPEND LIBFASTFETCH_SRC
698+
src/detection/bluetooth/bluetooth_bsd.c
699+
)
700+
endif()
693701
elseif(NetBSD)
694702
list(APPEND LIBFASTFETCH_SRC
695703
src/common/dbus.c
@@ -914,7 +922,7 @@ elseif(APPLE)
914922
src/detection/users/users_linux.c
915923
src/detection/wallpaper/wallpaper_apple.m
916924
src/detection/wifi/wifi_apple.m
917-
src/detection/wm/wm_apple.c
925+
src/detection/wm/wm_apple.m
918926
src/detection/de/de_nosupport.c
919927
src/detection/wmtheme/wmtheme_apple.m
920928
src/detection/camera/camera_apple.m
@@ -995,6 +1003,7 @@ elseif(WIN32)
9951003
src/util/windows/registry.c
9961004
src/util/windows/unicode.c
9971005
src/util/windows/wmi.cpp
1006+
src/util/windows/version.c
9981007
src/util/platform/FFPlatform_windows.c
9991008
src/util/binary_windows.c
10001009
)
@@ -1133,6 +1142,14 @@ else()
11331142
endif()
11341143
endif()
11351144

1145+
if(ANDROID)
1146+
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
1147+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/vendor/lib64 -Wl,-rpath,/system/lib64")
1148+
else()
1149+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-rpath,/vendor/lib -Wl,-rpath,/system/lib")
1150+
endif()
1151+
endif()
1152+
11361153
if(LINUX AND EXISTS "/lib/ld-musl-${CMAKE_HOST_SYSTEM_PROCESSOR}.so.1")
11371154
execute_process(COMMAND "/lib/ld-musl-${CMAKE_HOST_SYSTEM_PROCESSOR}.so.1"
11381155
ERROR_VARIABLE LD_MUSL_RESULT)
@@ -1468,6 +1485,7 @@ elseif(FreeBSD)
14681485
target_link_libraries(libfastfetch
14691486
PRIVATE "m"
14701487
PRIVATE "usbhid"
1488+
PRIVATE "bluetooth"
14711489
)
14721490
if(NOT DragonFly)
14731491
target_link_libraries(libfastfetch

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,35 @@ Try `export XAUTHORITY=$HOME/.Xauthority`
207207

208208
Try `fastfetch --wm-detect-plugin`. See also [#984](https://github.com/fastfetch-cli/fastfetch/issues/984)
209209

210+
### Q: How can I change the colors of my ASCII logo?
211+
212+
Try `fastfetch --logo-color-[1-9] <color>`. `[1-9]` is the index of color placeholders.
213+
214+
For example: `fastfetch --logo-color-1 red --logo-color-2 green`.
215+
216+
In JSONC, you can use:
217+
218+
```jsonc
219+
{
220+
"logo": {
221+
"color": {
222+
"1": "red",
223+
"2": "green"
224+
}
225+
}
226+
}
227+
```
228+
229+
### Q: How to hide a key?
230+
231+
Set the key to a white space.
232+
233+
```jsonc
234+
{
235+
"key": " "
236+
}
237+
```
238+
210239
### Q: I want feature A / B / C. Will fastfetch support it?
211240

212241
Fastfetch is a system information tool. We only accept hardware or system level software feature requests. For most personal uses, I recommend using `Command` module to detect it yourself, which can be used to grab output from a custom shell script:

debian/changelog

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

39
* Update to 2.32.0

debian/files

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

doc/json_schema.json

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@
275275
"type": "string"
276276
},
277277
"osFormat": {
278-
"description": "Output format of the module `OS`. See `-h format` for formatting syntax\n 1. {sysname}: Name of the kernel\n 2. {name}: Name of the OS\n 3. {pretty-name}: Pretty name of the OS\n 4. {id}: ID of the OS\n 5. {id-like}: ID like of the OS\n 6. {variant}: Variant of the OS\n 7. {variant-id}: Variant ID of the OS\n 8. {version}: Version of the OS\n 9. {version-id}: Version ID of the OS\n 10. {codename}: Version codename of the OS\n 11. {build-id}: Build ID of the OS\n 12. {arch}: Architecture of the OS",
278+
"description": "Output format of the module `OS`. See `-h format` for formatting syntax\n 1. {sysname}: Name of the kernel\n 2. {name}: Name of the OS\n 3. {pretty-name}: Pretty name of the OS, if available\n 4. {id}: ID of the OS\n 5. {id-like}: ID like of the OS\n 6. {variant}: Variant of the OS\n 7. {variant-id}: Variant ID of the OS\n 8. {version}: Version of the OS\n 9. {version-id}: Version ID of the OS\n 10. {codename}: Version codename of the OS\n 11. {build-id}: Build ID of the OS\n 12. {arch}: Architecture of the OS",
279279
"type": "string"
280280
},
281281
"packagesFormat": {
282-
"description": "Output format of the module `Packages`. See `-h format` for formatting syntax\n 1. {all}: Number of all packages\n 2. {pacman}: Number of pacman packages\n 3. {pacman-branch}: Pacman branch on manjaro\n 4. {dpkg}: Number of dpkg packages\n 5. {rpm}: Number of rpm packages\n 6. {emerge}: Number of emerge packages\n 7. {eopkg}: Number of eopkg packages\n 8. {xbps}: Number of xbps packages\n 9. {nix-system}: Number of nix-system packages\n 10. {nix-user}: Number of nix-user packages\n 11. {nix-default}: Number of nix-default packages\n 12. {apk}: Number of apk packages\n 13. {pkg}: Number of pkg packages\n 14. {flatpak-system}: Number of flatpak-system app packages\n 15. {flatpak-user}: Number of flatpak-user app packages\n 16. {snap}: Number of snap packages\n 17. {brew}: Number of brew packages\n 18. {brew-cask}: Number of brew-cask packages\n 19. {macports}: Number of macports packages\n 20. {scoop}: Number of scoop packages\n 21. {choco}: Number of choco packages\n 22. {pkgtool}: Number of pkgtool packages\n 23. {paludis}: Number of paludis packages\n 24. {winget}: Number of winget packages\n 25. {opkg}: Number of opkg packages\n 26. {am}: Number of am packages\n 27. {sorcery}: Number of sorcery packages\n 28. {lpkg}: Number of lpkg packages\n 29. {lpkgbuild}: Number of lpkgbuild packages\n 30. {guix-system}: Number of guix-system packages\n 31. {guix-user}: Number of guix-user packages\n 32. {guix-home}: Number of guix-home packages\n 33. {linglong}: Number of linglong packages\n 34. {pacstall}: Number of pacstall packages\n 35. {mport}: Number of mport packages\n 36. {qi}: Number of qi packages\n 37. {nix-all}: Total number of all nix packages\n 38. {flatpak-all}: Total number of all flatpak app packages\n 39. {brew-all}: Total number of all brew packages\n 40. {guix-all}: Total number of all guix packages",
282+
"description": "Output format of the module `Packages`. See `-h format` for formatting syntax\n 1. {all}: Number of all packages\n 2. {pacman}: Number of pacman packages\n 3. {pacman-branch}: Pacman branch on manjaro\n 4. {dpkg}: Number of dpkg packages\n 5. {rpm}: Number of rpm packages\n 6. {emerge}: Number of emerge packages\n 7. {eopkg}: Number of eopkg packages\n 8. {xbps}: Number of xbps packages\n 9. {nix-system}: Number of nix-system packages\n 10. {nix-user}: Number of nix-user packages\n 11. {nix-default}: Number of nix-default packages\n 12. {apk}: Number of apk packages\n 13. {pkg}: Number of pkg packages\n 14. {flatpak-system}: Number of flatpak-system app packages\n 15. {flatpak-user}: Number of flatpak-user app packages\n 16. {snap}: Number of snap packages\n 17. {brew}: Number of brew packages\n 18. {brew-cask}: Number of brew-cask packages\n 19. {macports}: Number of macports packages\n 20. {scoop}: Number of scoop packages\n 21. {choco}: Number of choco packages\n 22. {pkgtool}: Number of pkgtool packages\n 23. {paludis}: Number of paludis packages\n 24. {winget}: Number of winget packages\n 25. {opkg}: Number of opkg packages\n 26. {am-system}: Number of am-system packages\n 27. {sorcery}: Number of sorcery packages\n 28. {lpkg}: Number of lpkg packages\n 29. {lpkgbuild}: Number of lpkgbuild packages\n 30. {guix-system}: Number of guix-system packages\n 31. {guix-user}: Number of guix-user packages\n 32. {guix-home}: Number of guix-home packages\n 33. {linglong}: Number of linglong packages\n 34. {pacstall}: Number of pacstall packages\n 35. {mport}: Number of mport packages\n 36. {qi}: Number of qi packages\n 37. {am-user}: Number of am-user (aka appman) packages\n 38. {nix-all}: Total number of all nix packages\n 39. {flatpak-all}: Total number of all flatpak app packages\n 40. {brew-all}: Total number of all brew packages\n 41. {guix-all}: Total number of all guix packages",
283283
"type": "string"
284284
},
285285
"physicaldiskFormat": {
@@ -315,7 +315,7 @@
315315
"type": "string"
316316
},
317317
"soundFormat": {
318-
"description": "Output format of the module `Sound`. See `-h format` for formatting syntax\n 1. {is-main}: Is main sound device\n 2. {name}: Device name\n 3. {volume-percentage}: Volume (in percentage num)\n 4. {identifier}: Identifier\n 5. {volume-percentage-bar}: Volume (in percentage bar)",
318+
"description": "Output format of the module `Sound`. See `-h format` for formatting syntax\n 1. {is-main}: Is main sound device\n 2. {name}: Device name\n 3. {volume-percentage}: Volume (in percentage num)\n 4. {identifier}: Identifier\n 5. {volume-percentage-bar}: Volume (in percentage bar)\n 6. {platform-api}: Platform API used",
319319
"type": "string"
320320
},
321321
"swapFormat": {
@@ -375,7 +375,7 @@
375375
"type": "string"
376376
},
377377
"wmFormat": {
378-
"description": "Output format of the module `WM`. See `-h format` for formatting syntax\n 1. {process-name}: WM process name\n 2. {pretty-name}: WM pretty name\n 3. {protocol-name}: WM protocol name\n 4. {plugin-name}: WM plugin name",
378+
"description": "Output format of the module `WM`. See `-h format` for formatting syntax\n 1. {process-name}: WM process name\n 2. {pretty-name}: WM pretty name\n 3. {protocol-name}: WM protocol name\n 4. {plugin-name}: WM plugin name\n 5. {version}: WM version",
379379
"type": "string"
380380
},
381381
"wifiFormat": {
@@ -432,6 +432,7 @@
432432
"sixel",
433433
"kitty",
434434
"kitty-direct",
435+
"kitty-icat",
435436
"iterm",
436437
"chafa",
437438
"raw",

src/common/processing_windows.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,9 @@ bool ffProcessGetInfoWindows(uint32_t pid, uint32_t* ppid, FFstrbuf* pname, FFst
169169
? GetCurrentProcess()
170170
: OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, FALSE, pid);
171171

172+
if (hProcess == NULL)
173+
return false;
174+
172175
if (gui)
173176
*gui = GetGuiResources(hProcess, GR_GDIOBJECTS) > 0;
174177

src/data/help.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@
186186
"data-raw": "Text data, printed as is",
187187
"sixel": "Image file, printed as sixel codes",
188188
"kitty": "Image file, printed as kitty graphics protocol",
189-
"kitty_direct": "Image file, tell the terminal emulator to read image data from the specified file (Supported by kitty and wezterm)",
189+
"kitty-direct": "Image file, tell the terminal emulator to read image data from the specified file (Supported by kitty and wezterm)",
190+
"kitty-icat": "Image file, use `kitten icat` to display the image. Requires binary `kitten` to be installed",
190191
"iterm": "Image file, printed as iterm graphics protocol",
191192
"chafa": "Image file, printed as ascii art using libchafa",
192193
"raw": "Image file, printed as raw binary string",
@@ -351,6 +352,14 @@
351352
"type": "path"
352353
}
353354
},
355+
{
356+
"long": "kitty-icat",
357+
"desc": "Short for --logo-type kitty-icat --logo <path>",
358+
"remark": "See \"--help logo-type\" for more info",
359+
"arg": {
360+
"type": "path"
361+
}
362+
},
354363
{
355364
"long": "iterm",
356365
"desc": "Short for --logo-type iterm --logo <path>",

src/detection/battery/battery_nbsd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ const char* ffDetectBattery(FF_MAYBE_UNUSED FFBatteryOptions* options, FFlist* r
4646
{
4747
if (prop_object_type(dict) != PROP_TYPE_DICTIONARY)
4848
continue;
49-
49+
5050
const char* desc = NULL;
5151
if (!prop_dictionary_get_string(dict, "description", &desc))
5252
continue;
@@ -88,7 +88,7 @@ const char* ffDetectBattery(FF_MAYBE_UNUSED FFBatteryOptions* options, FFlist* r
8888
ffStrbufInit(&battery->manufactureDate);
8989
battery->timeRemaining = -1;
9090

91-
battery->capacity = (double) curr / max;
91+
battery->capacity = (double) curr / (double) max * 100.;
9292
if (charging)
9393
ffStrbufAppendS(&battery->status, "Charging, ");
9494
else if (dischargeRate)
@@ -102,6 +102,6 @@ const char* ffDetectBattery(FF_MAYBE_UNUSED FFBatteryOptions* options, FFlist* r
102102
}
103103
}
104104
prop_object_iterator_release(itKey);
105-
105+
106106
return NULL;
107107
}

0 commit comments

Comments
 (0)