Skip to content

Commit

Permalink
Merge pull request #1353 from fastfetch-cli/dev
Browse files Browse the repository at this point in the history
Release: v2.28.0
  • Loading branch information
CarterLi authored Oct 23, 2024
2 parents 4059bca + 4d235a9 commit 18d5301
Show file tree
Hide file tree
Showing 179 changed files with 1,939 additions and 962 deletions.
2 changes: 1 addition & 1 deletion .codespellrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
check-filenames =
builtin = clear,rare,usage,informal
skip = */.git,*/cmake-build-*,*/.idea,*/completions,*/presets,*/screenshots,*/tests,*/3rdparty,*/logo/ascii
ignore-words-list = iterm,compiletime,unknwn,pengwin,siduction,master,slave,sur,doas,conexant
ignore-words-list = iterm,compiletime,unknwn,pengwin,siduction,master,slave,sur,doas,conexant,ags
50 changes: 4 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -272,47 +272,6 @@ jobs:
name: fastfetch-musl-amd64
path: ./fastfetch-*.*

musl-aarch64:
name: Musl-aarch64
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: setup alpine linux
uses: jirutka/setup-alpine@master
with:
branch: v3.19
arch: aarch64

- name: install dependencies
run: |
cat /etc/alpine-release
uname -a
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++
shell: alpine.sh --root {0}

- name: build
run: |
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr -DIS_MUSL=ON -GNinja .
cmake --build . --target package --verbose -j4
shell: alpine.sh {0}

- name: run
run: |
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
shell: alpine.sh {0}

- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-musl-aarch64
path: ./fastfetch-*.*

macos-universal:
name: macOS-universal
runs-on: macos-12
Expand Down Expand Up @@ -555,9 +514,9 @@ jobs:
- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: CLANG32
msystem: MINGW32
update: true
install: git p7zip mingw-w64-clang-i686-cmake mingw-w64-clang-i686-clang mingw-w64-clang-i686-vulkan-loader mingw-w64-clang-i686-vulkan-headers mingw-w64-clang-i686-opencl-icd mingw-w64-clang-i686-opencl-headers
install: git p7zip mingw-w64-i686-cmake mingw-w64-i686-clang mingw-w64-i686-vulkan-loader mingw-w64-i686-vulkan-headers mingw-w64-i686-opencl-icd mingw-w64-i686-opencl-headers

- name: print msys version
run: uname -a
Expand All @@ -568,7 +527,7 @@ jobs:
languages: c, cpp

- name: configure project
run: env PKG_CONFIG_PATH=/clang32/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
run: env PKG_CONFIG_PATH=/mingw32/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .

- name: build project
run: cmake --build . --verbose -j4
Expand All @@ -577,7 +536,7 @@ jobs:
uses: github/codeql-action/analyze@v3

- name: copy necessary dlls
run: cp /clang32/bin/{OpenCL,vulkan-1}.dll .
run: cp /mingw32/bin/{OpenCL,vulkan-1}.dll .

- name: download amd_ags
run: curl -LO https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/raw/master/ags_lib/lib/amd_ags_x86.dll
Expand Down Expand Up @@ -619,7 +578,6 @@ jobs:
- linux-armv7
- linux-riscv64
- musl-amd64
- musl-aarch64
- macos-universal
- freebsd-amd64
- openbsd-amd64
Expand Down
25 changes: 23 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
# 2.28.0

Features:
* Add new module `Mouse` and `Keyboard` which display connected mice and keyboards
* Support remaining time detection (Battery)
* Report if AC is connected (Battery, Linux)
* Report platform API used for display detection for debugging (Display)
* Report Wine version when running in Wine (Kernel, Windows)
* Add option `waitTime` in modules `CPUUsage`, `DiskIO` and `NetIO`

Bugfixes:
* Fix used memory size detection (Memory, OpenBSD)
* Don't report invalid fragmentation percentage when fails to detect it (Zpool)
* Fix unexpected errors when running fastfetch in parallel (#1346, Windows)
* Don't report obviously invalid temperature values (PhysicalDisk, Linux)

Logos:
* Add eweOS
* Add MidOS
* Update XeroArch

# 2.27.1

Bugfixes:
Expand All @@ -8,7 +29,7 @@ Bugfixes:
Changes:
* We now print `"` instead of `` when displaying diagonal length in inches, so that the character can be correctly displayed in Linux console (Display)
* All detection code of `monitor` module is merged into `display` module. Now `monitor` just prints the same information as `display` with different format. Notably:
* The resolution reported by `monitor` module is now current resolution instead of native / maximum resolution. PPI is calcuated based on current resolution too.
* The resolution reported by `monitor` module is now current resolution instead of native / maximum resolution. PPI is calculated based on current resolution too.
* The refresh rate reported by `monitor` module is the current refresh rate.

Features:
Expand All @@ -24,7 +45,7 @@ Bugfixes:
* Remove trailing newline in GPU name for Raspberry pi (#1303, GPU, Linux)
* Fix a possible buffer overflow (GPU, Linux)
* Fix CPU temp incorrectly reported as 0 celsius (#1308, CPU, Linux)
* Corrently report `TPM device is not found` error (#1314, TPM, Windows)
* Correctly report `TPM device is not found` error (#1314, TPM, Windows)
* Fix errors when triggering shell completion with python3 uninstalled (#1310)
* To package managers: as shell completion scripts of fastfetch use python3, it should be added as an optional dependency of fastfetch
* Fix possible crashes when detecting term font of kitty (#1321, TerminalFont, Linux)
Expand Down
30 changes: 25 additions & 5 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.27.1
VERSION 2.28.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -379,6 +379,7 @@ set(LIBFASTFETCH_SRC
src/modules/initsystem/initsystem.c
src/modules/gamepad/gamepad.c
src/modules/kernel/kernel.c
src/modules/keyboard/keyboard.c
src/modules/lm/lm.c
src/modules/loadavg/loadavg.c
src/modules/locale/locale.c
Expand All @@ -402,6 +403,7 @@ set(LIBFASTFETCH_SRC
src/modules/sound/sound.c
src/modules/swap/swap.c
src/modules/media/media.c
src/modules/mouse/mouse.c
src/modules/terminal/terminal.c
src/modules/terminaltheme/terminaltheme.c
src/modules/terminalfont/terminalfont.c
Expand Down Expand Up @@ -478,6 +480,7 @@ if(LINUX)
src/detection/host/host_linux.c
src/detection/icons/icons_linux.c
src/detection/initsystem/initsystem_linux.c
src/detection/keyboard/keyboard_linux.c
src/detection/libc/libc_linux.c
src/detection/lm/lm_linux.c
src/detection/loadavg/loadavg_linux.c
Expand All @@ -486,6 +489,7 @@ if(LINUX)
src/detection/gamepad/gamepad_linux.c
src/detection/media/media_linux.c
src/detection/memory/memory_linux.c
src/detection/mouse/mouse_linux.c
src/detection/netio/netio_linux.c
src/detection/opengl/opengl_linux.c
src/detection/os/os_linux.c
Expand Down Expand Up @@ -542,6 +546,7 @@ elseif(ANDROID)
src/detection/host/host_android.c
src/detection/icons/icons_nosupport.c
src/detection/initsystem/initsystem_linux.c
src/detection/keyboard/keyboard_nosupport.c
src/detection/libc/libc_android.c
src/detection/lm/lm_nosupport.c
src/detection/loadavg/loadavg_linux.c
Expand All @@ -550,6 +555,7 @@ elseif(ANDROID)
src/detection/gamepad/gamepad_nosupport.c
src/detection/media/media_nosupport.c
src/detection/memory/memory_linux.c
src/detection/mouse/mouse_nosupport.c
src/detection/netio/netio_linux.c
src/detection/opengl/opengl_linux.c
src/detection/os/os_android.c
Expand Down Expand Up @@ -622,13 +628,15 @@ elseif(FreeBSD)
src/detection/lm/lm_linux.c
src/detection/icons/icons_linux.c
src/detection/initsystem/initsystem_linux.c
src/detection/keyboard/keyboard_bsd.c
src/detection/libc/libc_bsd.c
src/detection/loadavg/loadavg_bsd.c
src/detection/locale/locale_linux.c
src/detection/localip/localip_linux.c
src/detection/gamepad/gamepad_bsd.c
src/detection/media/media_linux.c
src/detection/memory/memory_bsd.c
src/detection/mouse/mouse_bsd.c
src/detection/netio/netio_bsd.c
src/detection/opengl/opengl_linux.c
src/detection/os/os_linux.c
Expand Down Expand Up @@ -701,13 +709,15 @@ elseif(OpenBSD)
src/detection/lm/lm_nosupport.c
src/detection/icons/icons_linux.c
src/detection/initsystem/initsystem_linux.c
src/detection/keyboard/keyboard_nosupport.c
src/detection/libc/libc_nosupport.c
src/detection/loadavg/loadavg_bsd.c
src/detection/locale/locale_linux.c
src/detection/localip/localip_linux.c
src/detection/gamepad/gamepad_nosupport.c
src/detection/media/media_linux.c
src/detection/memory/memory_obsd.c
src/detection/mouse/mouse_nosupport.c
src/detection/netio/netio_nosupport.c
src/detection/opengl/opengl_linux.c
src/detection/os/os_obsd.c
Expand Down Expand Up @@ -766,6 +776,7 @@ elseif(APPLE)
src/detection/host/host_apple.c
src/detection/icons/icons_nosupport.c
src/detection/initsystem/initsystem_linux.c
src/detection/keyboard/keyboard_apple.c
src/detection/lm/lm_nosupport.c
src/detection/loadavg/loadavg_bsd.c
src/detection/libc/libc_apple.c
Expand All @@ -774,6 +785,7 @@ elseif(APPLE)
src/detection/gamepad/gamepad_apple.c
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/opengl/opengl_apple.c
src/detection/os/os_apple.m
Expand Down Expand Up @@ -832,6 +844,7 @@ elseif(WIN32)
src/detection/host/host_windows.c
src/detection/icons/icons_windows.c
src/detection/initsystem/initsystem_nosupport.c
src/detection/keyboard/keyboard_windows.c
src/detection/libc/libc_windows.cpp
src/detection/lm/lm_nosupport.c
src/detection/loadavg/loadavg_nosupport.c
Expand All @@ -840,10 +853,11 @@ elseif(WIN32)
src/detection/gamepad/gamepad_windows.c
src/detection/media/media_windows.c
src/detection/memory/memory_windows.c
src/detection/mouse/mouse_windows.c
src/detection/physicalmemory/physicalmemory_linux.c
src/detection/netio/netio_windows.c
src/detection/opengl/opengl_windows.c
src/detection/os/os_windows.cpp
src/detection/os/os_windows.c
src/detection/packages/packages_windows.c
src/detection/poweradapter/poweradapter_nosupport.c
src/detection/processes/processes_windows.c
Expand Down Expand Up @@ -916,6 +930,7 @@ elseif(SunOS)
src/detection/host/host_windows.c
src/detection/icons/icons_linux.c
src/detection/initsystem/initsystem_linux.c
src/detection/keyboard/keyboard_nosupport.c
src/detection/libc/libc_nosupport.c
src/detection/lm/lm_nosupport.c
src/detection/loadavg/loadavg_sunos.c
Expand All @@ -924,6 +939,7 @@ elseif(SunOS)
src/detection/gamepad/gamepad_nosupport.c
src/detection/media/media_linux.c
src/detection/memory/memory_sunos.c
src/detection/mouse/mouse_nosupport.c
src/detection/netio/netio_sunos.c
src/detection/opengl/opengl_linux.c
src/detection/os/os_sunos.c
Expand Down Expand Up @@ -1026,10 +1042,12 @@ if(FreeBSD AND EXISTS "/usr/local/bin/objdump")
endif()
endif()

if(LINUX OR ANDROID)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE __STDC_WANT_LIB_EXT1__=1 _FILE_OFFSET_BITS=64)
if(LINUX)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE _XOPEN_SOURCE _ATFILE_SOURCE __STDC_WANT_LIB_EXT1__ _FILE_OFFSET_BITS=64) # "$<$<CONFIG:Release>:_FORTIFY_SOURCE=3>"
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)
target_compile_definitions(libfastfetch PUBLIC _GNU_SOURCE WIN32_LEAN_AND_MEAN=1 _WIN32_WINNT=0x0A00) # "$<$<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 Down Expand Up @@ -1298,6 +1316,8 @@ elseif(WIN32)
PRIVATE "hid"
PRIVATE "wtsapi32"
PRIVATE "imagehlp"
PRIVATE "cfgmgr32"
PRIVATE "winbrand"
)
elseif(FreeBSD)
target_link_libraries(libfastfetch
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.27.1) jammy; urgency=medium

* Update to 2.27.1

-- Carter Li <[email protected]> Sun, 06 Oct 2024 12:55:18 +0800

fastfetch (2.26.1ubuntu1) jammy; urgency=medium

* Update correct code
Expand Down
2 changes: 1 addition & 1 deletion debian/files
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fastfetch_2.26.1ubuntu1_source.buildinfo universe/utils optional
fastfetch_2.27.1_source.buildinfo universe/utils optional
18 changes: 18 additions & 0 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,12 @@
"description": "Display CPU usage per CPU logical core, instead of an average result",
"default": false
},
"waitTime": {
"type": "integer",
"description": "Wait time (in ms). CPU usage = (inUseEnd - inUseStart) / waitTime",
"default": 200,
"minimum": 1
},
"key": {
"$ref": "#/$defs/key"
},
Expand Down Expand Up @@ -1472,6 +1478,12 @@
"type": "boolean",
"default": false
},
"waitTime": {
"type": "integer",
"description": "Wait time (in ms). Disk I/O = (totalBytesEnd - totalBytesStart) / waitTime",
"default": 200,
"minimum": 1
},
"key": {
"$ref": "#/$defs/key"
},
Expand Down Expand Up @@ -1841,6 +1853,12 @@
"type": "boolean",
"default": false
},
"waitTime": {
"type": "integer",
"description": "Wait time (in ms). Disk I/O = (totalBytesEnd - totalBytesStart) / waitTime",
"default": 200,
"minimum": 1
},
"key": {
"$ref": "#/$defs/key"
},
Expand Down
3 changes: 2 additions & 1 deletion presets/all.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@
"showSpeed": true,
"showMtu": true,
"showLoop": true,
"showFlags": true
"showFlags": true,
"showAllIps": true
},
"dns",
"wifi",
Expand Down
3 changes: 2 additions & 1 deletion presets/ci.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@
"showSpeed": true,
"showMtu": true,
"showLoop": true,
"showFlags": true
"showFlags": true,
"showAllIps": true
},
"dns",
"wifi",
Expand Down
Loading

0 comments on commit 18d5301

Please sign in to comment.