Skip to content

Commit

Permalink
Merge pull request #1083 from fastfetch-cli/dev
Browse files Browse the repository at this point in the history
Release: v2.18.0
  • Loading branch information
CarterLi authored Jul 10, 2024
2 parents cec38b9 + fca4b3e commit 5060c26
Show file tree
Hide file tree
Showing 67 changed files with 2,981 additions and 598 deletions.
38 changes: 0 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -438,43 +438,6 @@ jobs:
name: fastfetch-freebsd-amd64
path: ./fastfetch-*.*

freebsd-aarch64:
name: FreeBSD-aarch64
runs-on: ubuntu-latest
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4

- name: run VM
uses: cross-platform-actions/action@master
with:
operating_system: freebsd
architecture: arm64
cpu_count: 3
shell: bash
version: '13.2'
run: |
uname -a
sudo pkg update
sudo pkg install -y cmake git pkgconf binutils wayland vulkan-headers vulkan-loader libxcb libXrandr libX11 libdrm glib dconf dbus sqlite3-tcl xfce4-conf ImageMagick6 ImageMagick7 chafa egl libosmesa opencl ocl-icd v4l_compat
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch
time ./fastfetch --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-freebsd-aarch64
path: ./fastfetch-*.*

windows-amd64:
name: Windows-amd64
runs-on: windows-latest
Expand Down Expand Up @@ -623,7 +586,6 @@ jobs:
- musl-aarch64
- macos-universal
- freebsd-amd64
- freebsd-aarch64
- sunos-amd64
- windows-amd64
- windows-i686
Expand Down
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# 2.18.0

Changes:
* `yyjson 0.10.0` is required
* Fastfetch no longer prints `*` (which means it's the default route) if `defaultRouteOnly` is set (LocalIP)

Bugfixes:
* Fix some memory leaks
* Fix compatibility with old Python versions
* Don't detect frequency for AMD cards (GPU, Linux)
* Fix possible hang with discrete AMD cards (#1077)
* Don't print colors in `--pipe` mode (Separator)
* Don't print `(null)` in property `locator` (PhysicalMemory)
* Ignore disabled PCI devices (GPU)
* Fix flag `--opengl-library` doesn't work (OpenGL)

Features:
* Detect revision of USB drives (#1048, Disk)
* Support fractional scale factor detection (Display, Linux)
* Support primary display detection for KDE and GNOME (Display, Linux)
* Support percent bar in custom formatting
* Print signal quality by default (Wifi)
* Detect used OpenGL library version (OpenGL)
* Support detecting OpenGL version by `EGL` (ANGLE) on Windows (OpenGL)

Logos:
* Add Arkane Linux
* Add Opak

# 2.17.2

Changes:
Expand Down
18 changes: 16 additions & 2 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.17.2
VERSION 2.18.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -61,7 +61,7 @@ cmake_dependent_option(ENABLE_IMAGEMAGICK7 "Enable imagemagick 7" ON "LINUX OR B
cmake_dependent_option(ENABLE_IMAGEMAGICK6 "Enable imagemagick 6" ON "LINUX OR BSD OR APPLE OR SunOS" OFF)
cmake_dependent_option(ENABLE_CHAFA "Enable chafa" ON "ENABLE_IMAGEMAGICK6 OR ENABLE_IMAGEMAGICK7" OFF)
cmake_dependent_option(ENABLE_ZLIB "Enable zlib" ON "ENABLE_IMAGEMAGICK6 OR ENABLE_IMAGEMAGICK7" OFF)
cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR BSD OR SunOS" OFF)
cmake_dependent_option(ENABLE_EGL "Enable egl" ON "LINUX OR BSD OR WIN32 OR SunOS" OFF)
cmake_dependent_option(ENABLE_GLX "Enable glx" ON "LINUX OR BSD OR SunOS" OFF)
cmake_dependent_option(ENABLE_OSMESA "Enable osmesa" ON "LINUX OR BSD OR SunOS" OFF)
cmake_dependent_option(ENABLE_OPENCL "Enable opencl" ON "LINUX OR BSD OR WIN32 OR ANDROID OR SunOS" OFF)
Expand Down Expand Up @@ -307,6 +307,7 @@ set(LIBFASTFETCH_SRC
src/detection/media/media.c
src/detection/netio/netio.c
src/detection/opencl/opencl.c
src/detection/opengl/opengl_shared.c
src/detection/os/os.c
src/detection/packages/packages.c
src/detection/physicalmemory/physicalmemory.c
Expand Down Expand Up @@ -395,6 +396,7 @@ set(LIBFASTFETCH_SRC
src/options/general.c
src/options/library.c
src/util/edidHelper.c
src/util/base64.c
src/util/FFlist.c
src/util/FFstrbuf.c
src/util/platform/FFPlatform.c
Expand Down Expand Up @@ -429,7 +431,11 @@ if(LINUX)
src/detection/displayserver/linux/wayland/wayland.c
src/detection/displayserver/linux/wayland/global-output.c
src/detection/displayserver/linux/wayland/zwlr-output.c
src/detection/displayserver/linux/wayland/kde-output.c
src/detection/displayserver/linux/wayland/wlr-output-management-unstable-v1-protocol.c
src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c
src/detection/displayserver/linux/wayland/kde-output-order-v1-protocol.c
src/detection/displayserver/linux/wayland/xdg-output-unstable-v1-protocol.c
src/detection/displayserver/linux/wmde.c
src/detection/displayserver/linux/xcb.c
src/detection/displayserver/linux/xlib.c
Expand Down Expand Up @@ -562,7 +568,11 @@ elseif(BSD)
src/detection/displayserver/linux/wayland/wayland.c
src/detection/displayserver/linux/wayland/global-output.c
src/detection/displayserver/linux/wayland/zwlr-output.c
src/detection/displayserver/linux/wayland/kde-output.c
src/detection/displayserver/linux/wayland/wlr-output-management-unstable-v1-protocol.c
src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c
src/detection/displayserver/linux/wayland/kde-output-order-v1-protocol.c
src/detection/displayserver/linux/wayland/xdg-output-unstable-v1-protocol.c
src/detection/displayserver/linux/wmde.c
src/detection/displayserver/linux/xcb.c
src/detection/displayserver/linux/xlib.c
Expand Down Expand Up @@ -763,7 +773,11 @@ elseif(SunOS)
src/detection/displayserver/linux/wayland/wayland.c
src/detection/displayserver/linux/wayland/global-output.c
src/detection/displayserver/linux/wayland/zwlr-output.c
src/detection/displayserver/linux/wayland/kde-output.c
src/detection/displayserver/linux/wayland/wlr-output-management-unstable-v1-protocol.c
src/detection/displayserver/linux/wayland/kde-output-device-v2-protocol.c
src/detection/displayserver/linux/wayland/kde-output-order-v1-protocol.c
src/detection/displayserver/linux/wayland/xdg-output-unstable-v1-protocol.c
src/detection/displayserver/linux/wmde.c
src/detection/displayserver/linux/xcb.c
src/detection/displayserver/linux/xlib.c
Expand Down
1 change: 0 additions & 1 deletion completions/fastfetch.bash
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,6 @@ __fastfetch_completion()
local FF_OPTIONS_PATH=(
"-c"
"--config"
"--lib-pci"
"--lib-vulkan"
"--lib-wayland"
"--lib-xcb-randr"
Expand Down
91 changes: 44 additions & 47 deletions completions/fastfetch.fish
Original file line number Diff line number Diff line change
Expand Up @@ -54,51 +54,48 @@ function __fastfetch_complete_structure
end
end

string match -r -a -g "^###> ?(.*)" < (status -f) | string collect | python3 | source
echo '
import json, subprocess, sys
###> #!/usr/bin/env python3
###>
###> import json, subprocess, sys
###>
###> def main():
###> data: dict[str, list[dict]] = json.loads(subprocess.check_output(['fastfetch', '--help-raw']))
###>
###> for key in data:
###> for flag in data[key]:
###> if flag.get('pseudo', False):
###> continue
###>
###> command_prefix: str = f'complete -c fastfetch -d "{flag["desc"]}" -l "{flag["long"]}"';
###> if 'short' in flag:
###> command_prefix += f' -o "{flag["short"]}"'
###>
###> if 'arg' in flag:
###> type: str = flag['arg']['type'];
###> if type == 'bool':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_bool)"')
###> elif type == 'color':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_color)"')
###> elif type == 'command':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_command)"')
###> elif type == 'config':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_config)"')
###> elif type == 'enum':
###> temp: str = ' '.join(flag["arg"]["enum"])
###> print(f'{command_prefix} -x -a "{temp}"')
###> elif type == 'logo':
###> print(f'{command_prefix} -x -a "(__fastfetch_complete_logo)"')
###> elif type == 'structure':
###> print(f'{command_prefix} -x -a "(__fish_complete_list : __fastfetch_complete_structure)"')
###> elif type == 'path':
###> print(f'{command_prefix} -r -F')
###> else:
###> print(f'{command_prefix} -x')
###> else:
###> print(f'{command_prefix} -f')
###>
###> if __name__ == "__main__":
###> try:
###> main()
###> except:
###> sys.exit(1)
###>
def main():
data: dict[str, list[dict]] = json.loads(subprocess.check_output(["fastfetch", "--help-raw"]))
for key in data:
for flag in data[key]:
if flag.get("pseudo", False):
continue
command_prefix = f"""complete -c fastfetch -d "{flag["desc"]}" -l "{flag["long"]}\""""
if "short" in flag:
command_prefix += f""" -o {flag["short"]}"""
if "arg" in flag:
type: str = flag["arg"]["type"];
if type == "bool":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_bool)\"")
elif type == "color":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_color)\"")
elif type == "command":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_command)\"")
elif type == "config":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_config)\"")
elif type == "enum":
temp: str = " ".join(flag["arg"]["enum"])
print(f"{command_prefix} -x -a \"{temp}\"")
elif type == "logo":
print(f"{command_prefix} -x -a \"(__fastfetch_complete_logo)\"")
elif type == "structure":
print(f"{command_prefix} -x -a \"(__fish_complete_list : __fastfetch_complete_structure)\"")
elif type == "path":
print(f"{command_prefix} -r -F")
else:
print(f"{command_prefix} -x")
else:
print(f"{command_prefix} -f")
if __name__ == "__main__":
try:
main()
except:
sys.exit(1)
' | python3 | source
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
fastfetch (2.17.2) jammy; urgency=medium

* Update to 2.17.2

-- Carter Li <[email protected]> Thu, 04 Jul 2024 10:22:44 +0800

fastfetch (2.17.1) jammy; urgency=medium

* Update to 2.17.1
Expand Down
2 changes: 1 addition & 1 deletion debian/files
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fastfetch_2.17.1_source.buildinfo universe/utils optional
fastfetch_2.17.2_source.buildinfo universe/utils optional
Loading

0 comments on commit 5060c26

Please sign in to comment.