Skip to content

Commit 3247aab

Browse files
authored
Merge pull request #1151 from fastfetch-cli/dev
Release v2.21.0
2 parents 8e5017a + 312d4cc commit 3247aab

Some content is hidden

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

83 files changed

+2256
-867
lines changed

.codespellrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
check-filenames =
33
builtin = clear,rare,usage,informal
44
skip = */.git,*/cmake-build-*,*/.idea,*/completions,*/presets,*/screenshots,*/tests,*/3rdparty,*/logo/ascii
5-
ignore-words-list = iterm,compiletime,unknwn,pengwin,siduction,master,sur,doas
5+
ignore-words-list = iterm,compiletime,unknwn,pengwin,siduction,master,sur,doas,conexant

.github/ISSUE_TEMPLATE/logo_request.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ Paste content of /etc/os-release and /etc/lsb-release here. If none of these fil
1515
```
1616

1717
# Ascii
18+
19+
An ASCII logo should not take up too much space (smaller than 50x20 characters). Please also include the color codes if not available in `os-release`
20+
1821
```
1922
Paste ascii art here.
2023
```

.github/workflows/ci.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
run: uname -a
3636

3737
- name: configure project
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
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_FREETYPE=OFF -DENABLE_PULSE=OFF -DENABLE_DDCUTIL=OFF -DENABLE_DIRECTX_HEADERS=OFF -DENABLE_THREADS=OFF
3939

4040
- name: build project
4141
run: cmake --build . --target package --verbose -j4
@@ -74,7 +74,7 @@ jobs:
7474
run: uname -a
7575

7676
- name: install required packages
77-
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
77+
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 libpulse-dev libdrm-dev directx-headers-dev
7878

7979
- name: install linuxbrew packages
8080
run: |
@@ -138,11 +138,11 @@ jobs:
138138
id: runcmd
139139
with:
140140
arch: aarch64
141-
distro: ubuntu22.04
141+
distro: ubuntu20.04
142142
githubToken: ${{ github.token }}
143143
run: |
144144
uname -a
145-
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 libnm-dev libpulse-dev libdrm-dev libddcutil-dev libchafa-dev directx-headers-dev rpm
145+
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 directx-headers-dev rpm
146146
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
147147
cmake --build . --target package --verbose -j4
148148
./fastfetch --list-features
@@ -181,7 +181,7 @@ jobs:
181181
# CMake installed by apt has bug `list sub-command REMOVE_ITEM requires two or more arguments`
182182
wget --no-check-certificate https://apt.kitware.com/ubuntu/pool/main/c/cmake/{cmake_3.29.2-0kitware1ubuntu20.04.1_armhf.deb,cmake-data_3.29.2-0kitware1ubuntu20.04.1_all.deb}
183183
dpkg -i *.deb
184-
apt-get install -y 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 libnm-dev libpulse-dev libdrm-dev directx-headers-dev rpm
184+
apt-get install -y 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 directx-headers-dev rpm
185185
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
186186
cmake --build . --target package --verbose -j4
187187
./fastfetch --list-features
@@ -216,7 +216,7 @@ jobs:
216216
githubToken: ${{ github.token }}
217217
run: |
218218
uname -a
219-
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 libnm-dev libpulse-dev libdrm-dev libddcutil-dev libchafa-dev directx-headers-dev rpm
219+
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 libddcutil-dev libchafa-dev directx-headers-dev rpm
220220
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
221221
cmake --build . --target package --verbose -j4
222222
./fastfetch --list-features

CHANGELOG.md

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,40 @@
1+
# 2.21.0
2+
3+
Changes:
4+
* We no longer use `libnm` for Wifi detection on Linux. Instead, we use `libdbus` to communicate with NetworkManager directly
5+
* To package managers: libnm dependency should be removed
6+
7+
Features:
8+
* Add module `BluetoothRadio` that prints bluetooth radios installed on the system
9+
* Don't confuse with module `Bluetooth` which lists connected bluetooth devices
10+
* Detect more information when `--gpu-driver-specific` is used (GPU)
11+
* Detect which type of nvidia driver (open source or proprietary) is used (GPU, Linux)
12+
* `--gpu-driver-specific` adds supports for Moore Threads GPU (#1142, GPU, Linux / Windows)
13+
* Use SetupAPI for detecting GPUs to support GPU detection when running fastfetch as a Windows Service (GPU, Windows)
14+
* See https://github.com/gpustack/gpustack/pull/97#issuecomment-2264699787 for detail
15+
* Detect playback status (Media, Linux)
16+
17+
Bugfixes:
18+
* Don't try to connect display server in tty mode (Linux, #1110)
19+
* Improve ssh detection
20+
* Fix max frequency printing in custom format (CPU)
21+
* Fix displaying random characters when detecting kitty term font (#1136 / #1145, TerminalFont, Linux)
22+
* Make sure to detect all physical memory devices (#1137)
23+
* Don't detect `wl-restart` as WM (#1135, WM, Linux)
24+
* Use PCI bus ID to match Nvidia cards; fix multi-GPU detection (GPU)
25+
* Ignore invalid GPU (#1066, GPU, macOS)
26+
* Print error when invalid color code is found (#1138)
27+
* Fix invalid refresh rate detection on old macOS versions (Display, macOS)
28+
* Fix disk size detection on 32-bit systems (Disk, BSD)
29+
* Don't ignore disabled GPUs (#1140, GPU, Linux)
30+
* Fix GPU type detection on FreeBSD (GPU, FreeBSD)
31+
* Remove shell version detection for unknown shells (#1144, Shell)
32+
* Don't detect hyfetch as shell on NixOS (Shell, NixOS)
33+
34+
Logos:
35+
* Update EndeavourOS_small
36+
* Add QTS
37+
138
# 2.20.0
239

340
This release fixes regression of `2.19.0` on M1 MacBook Air. It also introduces a new option `--key-type icon` to display predefined icons in keys (requires newest nerd font). See `fastfetch -h key-type` for detail.
@@ -6,7 +43,7 @@ Changes:
643
* JSON option `display.keyWidth` has been renamed to `display.key.width`
744
* Previously: `{ "display": { "keyWidth": 3 } }`
845
* Now: `{ "display": { "key": { "width": 3 } } }`
9-
* Windows Terminal font detection **in WSL** has been removed due to [issue #1113](https://github.com/fastfetch/fastfetch/issues/1113)
46+
* Windows Terminal font detection **in WSL** has been removed due to [issue #1113](https://github.com/fastfetch-cli/fastfetch/issues/1113)
1047

1148
Features:
1249
* Add option `display.key.type: <enum>` to print icons in keys

CMakeLists.txt

Lines changed: 62 additions & 31 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.20.0
4+
VERSION 2.21.0
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -17,7 +17,7 @@ if(ANDROID)
1717
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
1818
set(LINUX TRUE CACHE BOOL "..." FORCE) # LINUX means GNU/Linux, not just the kernel
1919
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
20-
set(BSD TRUE CACHE BOOL "..." FORCE)
20+
set(FreeBSD TRUE CACHE BOOL "..." FORCE)
2121
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
2222
set(SunOS TRUE CACHE BOOL "..." FORCE)
2323
elseif(NOT APPLE AND NOT WIN32)
@@ -44,28 +44,27 @@ include(CheckIncludeFile)
4444

4545
include(CMakeDependentOption)
4646

47-
cmake_dependent_option(ENABLE_VULKAN "Enable vulkan" ON "LINUX OR APPLE OR BSD OR WIN32 OR ANDROID OR SunOS" OFF)
48-
cmake_dependent_option(ENABLE_WAYLAND "Enable wayland-client" ON "LINUX OR BSD" OFF)
49-
cmake_dependent_option(ENABLE_XCB_RANDR "Enable xcb-randr" ON "LINUX OR BSD OR SunOS" OFF)
50-
cmake_dependent_option(ENABLE_XCB "Enable xcb" ON "LINUX OR BSD OR SunOS" OFF)
51-
cmake_dependent_option(ENABLE_XRANDR "Enable xrandr" ON "LINUX OR BSD OR SunOS" OFF)
52-
cmake_dependent_option(ENABLE_X11 "Enable x11" ON "LINUX OR BSD OR SunOS" OFF)
53-
cmake_dependent_option(ENABLE_DRM "Enable libdrm" ON "LINUX OR BSD OR SunOS" OFF)
54-
cmake_dependent_option(ENABLE_GIO "Enable gio-2.0" ON "LINUX OR BSD OR SunOS" OFF)
55-
cmake_dependent_option(ENABLE_DCONF "Enable dconf" ON "LINUX OR BSD OR SunOS" OFF)
56-
cmake_dependent_option(ENABLE_DBUS "Enable dbus-1" ON "LINUX OR BSD OR SunOS" OFF)
57-
cmake_dependent_option(ENABLE_XFCONF "Enable libxfconf-0" ON "LINUX OR BSD OR SunOS" OFF)
58-
cmake_dependent_option(ENABLE_SQLITE3 "Enable sqlite3" ON "LINUX OR BSD OR APPLE OR SunOS" OFF)
47+
cmake_dependent_option(ENABLE_VULKAN "Enable vulkan" ON "LINUX OR APPLE OR FreeBSD OR WIN32 OR ANDROID OR SunOS" OFF)
48+
cmake_dependent_option(ENABLE_WAYLAND "Enable wayland-client" ON "LINUX OR FreeBSD" OFF)
49+
cmake_dependent_option(ENABLE_XCB_RANDR "Enable xcb-randr" ON "LINUX OR FreeBSD OR SunOS" OFF)
50+
cmake_dependent_option(ENABLE_XCB "Enable xcb" ON "LINUX OR FreeBSD OR SunOS" OFF)
51+
cmake_dependent_option(ENABLE_XRANDR "Enable xrandr" ON "LINUX OR FreeBSD OR SunOS" OFF)
52+
cmake_dependent_option(ENABLE_X11 "Enable x11" ON "LINUX OR FreeBSD OR SunOS" OFF)
53+
cmake_dependent_option(ENABLE_DRM "Enable libdrm" ON "LINUX OR FreeBSD OR SunOS" OFF)
54+
cmake_dependent_option(ENABLE_GIO "Enable gio-2.0" ON "LINUX OR FreeBSD OR SunOS" OFF)
55+
cmake_dependent_option(ENABLE_DCONF "Enable dconf" ON "LINUX OR FreeBSD OR SunOS" OFF)
56+
cmake_dependent_option(ENABLE_DBUS "Enable dbus-1" ON "LINUX OR FreeBSD OR SunOS" OFF)
57+
cmake_dependent_option(ENABLE_XFCONF "Enable libxfconf-0" ON "LINUX OR FreeBSD OR SunOS" OFF)
58+
cmake_dependent_option(ENABLE_SQLITE3 "Enable sqlite3" ON "LINUX OR FreeBSD OR APPLE OR SunOS" OFF)
5959
cmake_dependent_option(ENABLE_RPM "Enable rpm" ON "LINUX" OFF)
60-
cmake_dependent_option(ENABLE_IMAGEMAGICK7 "Enable imagemagick 7" ON "LINUX OR BSD OR APPLE OR WIN32 OR SunOS" OFF)
61-
cmake_dependent_option(ENABLE_IMAGEMAGICK6 "Enable imagemagick 6" ON "LINUX OR BSD OR APPLE OR SunOS" OFF)
60+
cmake_dependent_option(ENABLE_IMAGEMAGICK7 "Enable imagemagick 7" ON "LINUX OR FreeBSD OR APPLE OR WIN32 OR SunOS" OFF)
61+
cmake_dependent_option(ENABLE_IMAGEMAGICK6 "Enable imagemagick 6" ON "LINUX OR FreeBSD OR APPLE OR SunOS" OFF)
6262
cmake_dependent_option(ENABLE_CHAFA "Enable chafa" ON "ENABLE_IMAGEMAGICK6 OR ENABLE_IMAGEMAGICK7" OFF)
6363
cmake_dependent_option(ENABLE_ZLIB "Enable zlib" ON "ENABLE_IMAGEMAGICK6 OR ENABLE_IMAGEMAGICK7" OFF)
64-
cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR BSD OR WIN32 OR SunOS" OFF)
65-
cmake_dependent_option(ENABLE_GLX "Enable glx" ON "LINUX OR BSD OR SunOS" OFF)
66-
cmake_dependent_option(ENABLE_OSMESA "Enable osmesa" ON "LINUX OR BSD OR SunOS" OFF)
67-
cmake_dependent_option(ENABLE_OPENCL "Enable opencl" ON "LINUX OR BSD OR WIN32 OR ANDROID OR SunOS" OFF)
68-
cmake_dependent_option(ENABLE_LIBNM "Enable libnm" ON "LINUX" OFF)
64+
cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR FreeBSD OR WIN32 OR SunOS" OFF)
65+
cmake_dependent_option(ENABLE_GLX "Enable glx" ON "LINUX OR FreeBSD OR SunOS" OFF)
66+
cmake_dependent_option(ENABLE_OSMESA "Enable osmesa" ON "LINUX OR FreeBSD OR SunOS" OFF)
67+
cmake_dependent_option(ENABLE_OPENCL "Enable opencl" ON "LINUX OR FreeBSD OR WIN32 OR ANDROID OR SunOS" OFF)
6968
cmake_dependent_option(ENABLE_FREETYPE "Enable freetype" ON "ANDROID" OFF)
7069
cmake_dependent_option(ENABLE_PULSE "Enable pulse" ON "LINUX OR SunOS" OFF)
7170
cmake_dependent_option(ENABLE_DDCUTIL "Enable ddcutil" ON "LINUX" OFF)
@@ -294,6 +293,7 @@ set(LIBFASTFETCH_SRC
294293
src/common/properties.c
295294
src/common/settings.c
296295
src/common/temps.c
296+
src/detection/bluetoothradio/bluetoothradio.c
297297
src/detection/bootmgr/bootmgr.c
298298
src/detection/chassis/chassis.c
299299
src/detection/cpu/cpu.c
@@ -326,6 +326,7 @@ set(LIBFASTFETCH_SRC
326326
src/modules/battery/battery.c
327327
src/modules/bios/bios.c
328328
src/modules/bluetooth/bluetooth.c
329+
src/modules/bluetoothradio/bluetoothradio.c
329330
src/modules/board/board.c
330331
src/modules/bootmgr/bootmgr.c
331332
src/modules/brightness/brightness.c
@@ -421,6 +422,7 @@ if(LINUX)
421422
src/detection/cpuusage/cpuusage_linux.c
422423
src/detection/cursor/cursor_linux.c
423424
src/detection/bluetooth/bluetooth_linux.c
425+
src/detection/bluetoothradio/bluetoothradio_linux.c
424426
src/detection/disk/disk_linux.c
425427
src/detection/dns/dns_linux.c
426428
src/detection/physicaldisk/physicaldisk_linux.c
@@ -488,6 +490,7 @@ elseif(ANDROID)
488490
src/detection/battery/battery_android.c
489491
src/detection/bios/bios_android.c
490492
src/detection/bluetooth/bluetooth_nosupport.c
493+
src/detection/bluetoothradio/bluetoothradio_nosupport.c
491494
src/detection/board/board_android.c
492495
src/detection/bootmgr/bootmgr_nosupport.c
493496
src/detection/brightness/brightness_nosupport.c
@@ -539,7 +542,7 @@ elseif(ANDROID)
539542
src/detection/camera/camera_android.c
540543
src/util/platform/FFPlatform_unix.c
541544
)
542-
elseif(BSD)
545+
elseif(FreeBSD)
543546
list(APPEND LIBFASTFETCH_SRC
544547
src/common/dbus.c
545548
src/common/io/io_unix.c
@@ -550,6 +553,7 @@ elseif(BSD)
550553
src/detection/battery/battery_bsd.c
551554
src/detection/bios/bios_bsd.c
552555
src/detection/bluetooth/bluetooth_linux.c
556+
src/detection/bluetoothradio/bluetoothradio_linux.c
553557
src/detection/board/board_bsd.c
554558
src/detection/bootmgr/bootmgr_bsd.c
555559
src/detection/brightness/brightness_bsd.c
@@ -626,6 +630,7 @@ elseif(APPLE)
626630
src/detection/battery/battery_apple.c
627631
src/detection/bios/bios_apple.c
628632
src/detection/bluetooth/bluetooth_apple.m
633+
src/detection/bluetoothradio/bluetoothradio_apple.m
629634
src/detection/board/board_apple.c
630635
src/detection/bootmgr/bootmgr_apple.c
631636
src/detection/brightness/brightness_apple.c
@@ -689,6 +694,7 @@ elseif(WIN32)
689694
src/detection/battery/battery_windows.c
690695
src/detection/bios/bios_windows.c
691696
src/detection/bluetooth/bluetooth_windows.c
697+
src/detection/bluetoothradio/bluetoothradio_windows.c
692698
src/detection/board/board_windows.c
693699
src/detection/bootmgr/bootmgr_windows.c
694700
src/detection/brightness/brightness_windows.cpp
@@ -763,6 +769,7 @@ elseif(SunOS)
763769
src/detection/cpuusage/cpuusage_sunos.c
764770
src/detection/cursor/cursor_linux.c
765771
src/detection/bluetooth/bluetooth_nosupport.c
772+
src/detection/bluetoothradio/bluetoothradio_nosupport.c
766773
src/detection/disk/disk_sunos.c
767774
src/detection/dns/dns_linux.c
768775
src/detection/physicaldisk/physicaldisk_nosupport.c
@@ -828,14 +835,14 @@ if(ENABLE_DIRECTX_HEADERS)
828835
endif()
829836

830837
# Proprietary GPU driver APIs
831-
if(LINUX OR BSD OR WIN32)
838+
if(LINUX OR FreeBSD OR WIN32)
832839
list(APPEND LIBFASTFETCH_SRC src/detection/gpu/gpu_nvidia.c)
840+
list(APPEND LIBFASTFETCH_SRC src/detection/gpu/gpu_mthreads.c)
833841
endif()
834842
if(WIN32)
835843
list(APPEND LIBFASTFETCH_SRC src/detection/gpu/gpu_intel.c)
836844
list(APPEND LIBFASTFETCH_SRC src/detection/gpu/gpu_amd.c)
837845
endif()
838-
839846
include(CheckFunctionExists)
840847
check_function_exists(wcwidth HAVE_WCWIDTH)
841848
if(NOT HAVE_WCWIDTH)
@@ -888,7 +895,7 @@ if(APPLE AND EXISTS "/usr/bin/otool")
888895
target_compile_definitions(libfastfetch PUBLIC FF_LIBSYSTEM_VERSION="${CMAKE_MATCH_1}")
889896
endif()
890897
endif()
891-
if(BSD AND EXISTS "/usr/local/bin/objdump")
898+
if(FreeBSD AND EXISTS "/usr/local/bin/objdump")
892899
execute_process(COMMAND /bin/sh -c "/usr/local/bin/objdump -T /lib/libc.so.* | grep 'FBSD_[^ )]*' -o | sort -Vru | head -1"
893900
OUTPUT_VARIABLE OBJDUMP_T_RESULT)
894901
if("${OBJDUMP_T_RESULT}" MATCHES "FBSD_([0-9]+\\.[0-9]+)")
@@ -1056,10 +1063,6 @@ ff_lib_enable(OPENCL
10561063
"OpenCL"
10571064
"OpenCL"
10581065
)
1059-
ff_lib_enable(LIBNM
1060-
"libnm"
1061-
"libnm"
1062-
)
10631066
ff_lib_enable(FREETYPE
10641067
"freetype2"
10651068
"FreeType2"
@@ -1125,7 +1128,7 @@ elseif(WIN32)
11251128
PRIVATE "hid"
11261129
PRIVATE "wtsapi32"
11271130
)
1128-
elseif(BSD)
1131+
elseif(FreeBSD)
11291132
target_link_libraries(libfastfetch
11301133
PRIVATE "m"
11311134
PRIVATE "usbhid"
@@ -1178,7 +1181,35 @@ if(WIN32)
11781181
PRIVATE "-static" # stdc++, winpthread, gcc_s, etc.
11791182
)
11801183
endif()
1181-
set(CMAKE_CXX_STANDARD 17)
1184+
set(CMAKE_CXX_STANDARD 17)
1185+
endif()
1186+
if(LINUX)
1187+
CHECK_INCLUDE_FILE("linux/videodev2.h" HAVE_LINUX_VIDEODEV2)
1188+
if(HAVE_LINUX_VIDEODEV2)
1189+
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_LINUX_VIDEODEV2=1)
1190+
endif()
1191+
CHECK_INCLUDE_FILE("linux/wireless.h" HAVE_LINUX_WIRELESS)
1192+
if(HAVE_LINUX_WIRELESS)
1193+
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_LINUX_WIRELESS=1)
1194+
endif()
1195+
endif()
1196+
if(NOT WIN32)
1197+
CHECK_INCLUDE_FILE("utmpx.h" HAVE_UTMPX)
1198+
if(HAVE_UTMPX)
1199+
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_UTMPX=1)
1200+
endif()
1201+
CHECK_INCLUDE_FILE("wordexp.h" HAVE_WORDEXP)
1202+
if(HAVE_WORDEXP)
1203+
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_WORDEXP=1)
1204+
endif()
1205+
CHECK_INCLUDE_FILE("pthread_np.h" HAVE_PTHREAD_NP)
1206+
if(HAVE_PTHREAD_NP)
1207+
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_PTHREAD_NP=1)
1208+
endif()
1209+
check_function_exists("pthread_timedjoin_np" HAVE_TIMEDJOIN_NP)
1210+
if(HAVE_TIMEDJOIN_NP)
1211+
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_TIMEDJOIN_NP=1)
1212+
endif()
11821213
endif()
11831214

11841215
######################

0 commit comments

Comments
 (0)