mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-12 18:06:11 +02:00
Compare commits
53 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5769791185 | |||
| 894c66d793 | |||
| 75290154b0 | |||
| b08eea76b1 | |||
| 61d83af9ea | |||
| 2d497038eb | |||
| f8a5d5561a | |||
| 2e7e68ef23 | |||
| b812f3ccde | |||
| 6da8181bbe | |||
| a51dd641c1 | |||
| 0d20164d40 | |||
| 3320532668 | |||
| bcc6492115 | |||
| c60bc8ee5b | |||
| 4eefab8ccf | |||
| 9cda7e20fb | |||
| 79d0197dcf | |||
| ba01b1e4ce | |||
| 58908f69ba | |||
| 114088b845 | |||
| 6e77b592cb | |||
| 73bc71e922 | |||
| 090529ffef | |||
| 3c291f1af9 | |||
| fc31fe4aa4 | |||
| 563f9598be | |||
| 03bc2dade9 | |||
| 09d683b706 | |||
| 523a9590b8 | |||
| 3c3188eb05 | |||
| 354062118f | |||
| 85d7390fa8 | |||
| 8509f97054 | |||
| 8d5d8b4c90 | |||
| 536ad9594e | |||
| a57bbbadf4 | |||
| 3def466ee0 | |||
| 59868c66a0 | |||
| e13eb05073 | |||
| cdda65e6ad | |||
| a7ac89818c | |||
| 06956d2cf4 | |||
| ac52ea1afb | |||
| b68e0ce8ae | |||
| 8d6ed2e847 | |||
| 4211d15cdb | |||
| 2ff8d8864d | |||
| 884c902d93 | |||
| 16c56254b0 | |||
| 88eaab670f | |||
| 3e7630e074 | |||
| 744455d8b7 |
+1
-1
@@ -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,ags
|
||||
ignore-words-list = iterm,compiletime,unknwn,pengwin,siduction,master,slave,sur,doas,conexant,ags,bu
|
||||
|
||||
@@ -60,7 +60,7 @@ jobs:
|
||||
|
||||
linux-amd64:
|
||||
name: Linux-amd64
|
||||
runs-on: ubuntu-20.04
|
||||
runs-on: ubuntu-22.04
|
||||
permissions:
|
||||
security-events: write
|
||||
contents: read
|
||||
@@ -80,12 +80,12 @@ jobs:
|
||||
run: cat /proc/cpuinfo
|
||||
|
||||
- name: install required packages
|
||||
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 ocl-icd-opencl-dev libpulse-dev libdrm-dev libelf-dev directx-headers-dev
|
||||
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 ocl-icd-opencl-dev libpulse-dev libdrm-dev libelf-dev libddcutil-dev directx-headers-dev
|
||||
|
||||
- name: install linuxbrew packages
|
||||
run: |
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
/home/linuxbrew/.linuxbrew/bin/brew install imagemagick chafa ddcutil --ignore-dependencies
|
||||
/home/linuxbrew/.linuxbrew/bin/brew install imagemagick chafa --ignore-dependencies
|
||||
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
@@ -151,8 +151,13 @@ jobs:
|
||||
- name: install required packages
|
||||
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 ocl-icd-opencl-dev libpulse-dev libdrm-dev libelf-dev directx-headers-dev libchafa-dev libddcutil-dev rpm
|
||||
|
||||
- name: install linuxbrew packages
|
||||
run: |
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
/home/linuxbrew/.linuxbrew/bin/brew install imagemagick chafa --ignore-dependencies
|
||||
|
||||
- name: configure project
|
||||
run: cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On -DCMAKE_INSTALL_PREFIX=/usr .
|
||||
run: PKG_CONFIG_PATH=/home/linuxbrew/.linuxbrew/lib/pkgconfig:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DENABLE_EMBEDDED_PCIIDS=On -DENABLE_EMBEDDED_AMDGPUIDS=On -DCMAKE_INSTALL_PREFIX=/usr .
|
||||
|
||||
- name: build project
|
||||
run: cmake --build . --target package --verbose -j4
|
||||
@@ -654,6 +659,68 @@ jobs:
|
||||
name: fastfetch-windows-amd64
|
||||
path: ./fastfetch-windows-amd64.*
|
||||
|
||||
windows-aarch64:
|
||||
name: Windows-aarch64
|
||||
runs-on: windows-11-arm
|
||||
permissions:
|
||||
security-events: write
|
||||
contents: read
|
||||
defaults:
|
||||
run:
|
||||
shell: msys2 {0}
|
||||
steps:
|
||||
- name: checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: setup-msys2
|
||||
uses: msys2/setup-msys2@v2
|
||||
with:
|
||||
msystem: CLANGARM64
|
||||
update: true
|
||||
install: git mingw-w64-clang-aarch64-7zip mingw-w64-clang-aarch64-cmake mingw-w64-clang-aarch64-clang mingw-w64-clang-aarch64-vulkan-loader mingw-w64-clang-aarch64-vulkan-headers mingw-w64-clang-aarch64-opencl-icd mingw-w64-clang-aarch64-opencl-headers mingw-w64-clang-aarch64-cppwinrt mingw-w64-clang-aarch64-imagemagick
|
||||
|
||||
- name: print msys version
|
||||
run: uname -a
|
||||
|
||||
- name: configure project
|
||||
run: env PKG_CONFIG_PATH=/clangarm64/lib/pkgconfig/:$PKG_CONFIG_PATH cmake -DSET_TWEAK=Off -DBUILD_TESTS=On .
|
||||
|
||||
- name: build project
|
||||
run: cmake --build . --verbose -j4
|
||||
|
||||
- name: copy necessary dlls
|
||||
run: cp /clangarm64/bin/{OpenCL,vulkan-1}.dll .
|
||||
|
||||
- name: list features
|
||||
run: ./fastfetch --list-features
|
||||
|
||||
- name: run fastfetch
|
||||
run: time ./fastfetch -c presets/ci.jsonc --stat false
|
||||
|
||||
- name: run fastfetch --format json
|
||||
run: time ./fastfetch -c presets/ci.jsonc --format json
|
||||
|
||||
- name: run flashfetch
|
||||
run: time ./flashfetch
|
||||
|
||||
- name: print dependencies
|
||||
run: ldd fastfetch
|
||||
|
||||
- name: run tests
|
||||
run: ctest --output-on-failure
|
||||
|
||||
- name: create zip archive
|
||||
run: 7z a -tzip -mx9 -bd -y fastfetch-windows-aarch64.zip LICENSE *.dll fastfetch.exe flashfetch.exe presets
|
||||
|
||||
- name: create 7z archive
|
||||
run: 7z a -t7z -mx9 -bd -y fastfetch-windows-aarch64.7z LICENSE *.dll fastfetch.exe flashfetch.exe presets
|
||||
|
||||
- name: upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: fastfetch-windows-aarch64
|
||||
path: ./fastfetch-windows-aarch64.*
|
||||
|
||||
release:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'fastfetch-cli/fastfetch'
|
||||
name: Release
|
||||
@@ -673,6 +740,7 @@ jobs:
|
||||
- netbsd-amd64
|
||||
- sunos-amd64
|
||||
- windows-amd64
|
||||
- windows-aarch64
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
|
||||
@@ -1,3 +1,60 @@
|
||||
# 2.41.0
|
||||
|
||||
Changes:
|
||||
* Due to [the deprecation](https://github.com/actions/runner-images/issues/11101), Linux x86_64 binaries are now built with Ubuntu 22.04 (Glibc 2.35, Debian 12)
|
||||
* You can always build fastfetch yourself on your own. Please don't report bugs related to this change.
|
||||
|
||||
Bugfixes:
|
||||
* Don't detect disk type for virtual disks (PhysicalDisk, Linux, #1669)
|
||||
|
||||
Features:
|
||||
* Support physical core count detection on non-x86 platforms (CPU, Linux / FreeBSD)
|
||||
* Support CPU frequency detection on PPC64 (CPU, FreeBSD)
|
||||
* Support soar packages count detection (Packages, Linux)
|
||||
* Support `~` path expanding on Windows (Logo, Windows)
|
||||
* Support retrieving full user name (Title)
|
||||
* Exposed with `--title-format '{full-user-name}'`
|
||||
* Improve CPU (thermal zone) temperature detection on Windows (CPU, Windows)
|
||||
* Administrator privileges are no longer needed
|
||||
* Support base Wifi info detection on OpenBSD (Wifi, OpenBSD)
|
||||
* To be tested
|
||||
* Support GPU temperature detection for Intel dGPU on Linux (GPU, Linux)
|
||||
* To be tested
|
||||
* Add new ARM CPU part numbers (CPU, Linux)
|
||||
* Add base implementation of Bluetooth device detection (Bluetooth, NetBSD, #1690)
|
||||
* Some small improvements
|
||||
|
||||
Logo:
|
||||
* Add anduinos
|
||||
* Add 2 more Alpine logos
|
||||
|
||||
# 2.40.4
|
||||
|
||||
Bugfixes:
|
||||
* Fix loading presets config on Windows (Windows, #1682)
|
||||
* Regression of v2.40.0
|
||||
* Remove the prefix `v` of Hyprland version on Arch Linux (WM, Linux)
|
||||
|
||||
# 2.40.3
|
||||
|
||||
Bugfixes:
|
||||
* Fix loading example configs from presets directory (#1672)
|
||||
* Regression of v2.40.2
|
||||
* Mark kitty image protocol support for warp terminal on macOS too (Logo)
|
||||
|
||||
# 2.40.2
|
||||
|
||||
Changes:
|
||||
* Since v2.40.0, we've been loading config files from the directory where the fastfetch binary is located. However, this approach may lead to loading unexpected files. For example, `fastfetch -c groups` would attempt to load `/usr/bin/groups`. Therefore, we now enforce the `.jsonc` extension when loading config files. Examples:
|
||||
1. `-c filename`: loads `filename.jsonc`
|
||||
2. `-c filename.jsonc`: loads `filename.jsonc`
|
||||
3. `-c filename.json`: loads `filename.json` and enforces strict JSON syntax (no comments or trailing commas)
|
||||
4. `-c filename.ext`: loads `filename.ext.jsonc` (`.jsonc` extension is enforced)
|
||||
|
||||
Features:
|
||||
* Mark kitty image protocol support for warp terminal (Logo)
|
||||
* Documentation improvements
|
||||
|
||||
# 2.40.1
|
||||
|
||||
Bugfixes:
|
||||
|
||||
+14
-9
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
|
||||
|
||||
project(fastfetch
|
||||
VERSION 2.40.1
|
||||
VERSION 2.41.0
|
||||
LANGUAGES C
|
||||
DESCRIPTION "Fast neofetch-like system information tool"
|
||||
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
|
||||
@@ -102,7 +102,7 @@ if(NOT BINARY_LINK_TYPE IN_LIST BINARY_LINK_TYPE_OPTIONS)
|
||||
message(FATAL_ERROR "BINARY_LINK_TYPE must be one of ${BINARY_LINK_TYPE_OPTIONS}")
|
||||
endif()
|
||||
|
||||
set(PACKAGE_MANAGERS AM APK BREW CHOCO DPKG EMERGE EOPKG FLATPAK GUIX LINGLONG LPKG LPKGBUILD MACPORTS NIX OPKG PACMAN PACSTALL PALUDIS PISI PKG PKGTOOL RPM SCOOP SNAP SORCERY WINGET XBPS)
|
||||
set(PACKAGE_MANAGERS AM APK BREW CHOCO DPKG EMERGE EOPKG FLATPAK GUIX LINGLONG LPKG LPKGBUILD MACPORTS NIX OPKG PACMAN PACSTALL PALUDIS PISI PKG PKGTOOL RPM SCOOP SNAP SOAR SORCERY WINGET XBPS)
|
||||
foreach(package_manager ${PACKAGE_MANAGERS})
|
||||
if(package_manager STREQUAL "WINGET")
|
||||
option(PACKAGES_DISABLE_${package_manager} "Disable ${package_manager} package manager detection by default" ON)
|
||||
@@ -325,9 +325,6 @@ endif()
|
||||
|
||||
fastfetch_encode_c_string("${DATATEXT_JSON_HELP}" DATATEXT_JSON_HELP)
|
||||
fastfetch_load_text(src/data/structure.txt DATATEXT_STRUCTURE)
|
||||
fastfetch_load_text(src/data/help_footer.txt DATATEXT_HELP_FOOTER)
|
||||
fastfetch_load_text(src/data/help_color.txt DATATEXT_HELP_COLOR)
|
||||
fastfetch_load_text(src/data/help_format.txt DATATEXT_HELP_FORMAT)
|
||||
|
||||
configure_file(src/fastfetch_config.h.in fastfetch_config.h @ONLY)
|
||||
configure_file(src/fastfetch_datatext.h.in fastfetch_datatext.h @ONLY)
|
||||
@@ -708,7 +705,7 @@ elseif(FreeBSD)
|
||||
src/detection/uptime/uptime_bsd.c
|
||||
src/detection/users/users_linux.c
|
||||
src/detection/wallpaper/wallpaper_linux.c
|
||||
src/detection/wm/wm_nosupport.c
|
||||
src/detection/wm/wm_linux.c
|
||||
src/detection/de/de_linux.c
|
||||
src/detection/wmtheme/wmtheme_linux.c
|
||||
src/detection/camera/camera_linux.c
|
||||
@@ -737,7 +734,7 @@ elseif(NetBSD)
|
||||
src/common/sysctl.c
|
||||
src/detection/battery/battery_nbsd.c
|
||||
src/detection/bios/bios_nbsd.c
|
||||
src/detection/bluetooth/bluetooth_nosupport.c
|
||||
src/detection/bluetooth/bluetooth_bsd.c
|
||||
src/detection/bluetoothradio/bluetoothradio_nosupport.c
|
||||
src/detection/board/board_nbsd.c
|
||||
src/detection/bootmgr/bootmgr_bsd.c
|
||||
@@ -882,7 +879,7 @@ elseif(OpenBSD)
|
||||
src/detection/uptime/uptime_bsd.c
|
||||
src/detection/users/users_obsd.c
|
||||
src/detection/wallpaper/wallpaper_linux.c
|
||||
src/detection/wifi/wifi_nosupport.c
|
||||
src/detection/wifi/wifi_nbsd.c
|
||||
src/detection/wm/wm_nosupport.c
|
||||
src/detection/de/de_linux.c
|
||||
src/detection/wmtheme/wmtheme_linux.c
|
||||
@@ -980,7 +977,6 @@ elseif(WIN32)
|
||||
src/detection/btrfs/btrfs_nosupport.c
|
||||
src/detection/chassis/chassis_windows.c
|
||||
src/detection/cpu/cpu_windows.c
|
||||
src/detection/cpu/cpu_windows.cpp
|
||||
src/detection/cpucache/cpucache_windows.c
|
||||
src/detection/cpuusage/cpuusage_windows.c
|
||||
src/detection/cursor/cursor_windows.c
|
||||
@@ -1592,7 +1588,15 @@ elseif(WIN32)
|
||||
PRIVATE "cfgmgr32"
|
||||
PRIVATE "winbrand"
|
||||
PRIVATE "propsys"
|
||||
PRIVATE "secur32"
|
||||
PRIVATE "pdh"
|
||||
)
|
||||
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "ARM64")
|
||||
# WoA only works on Windows 10 or higher
|
||||
target_link_libraries(libfastfetch
|
||||
PRIVATE "mincore"
|
||||
)
|
||||
endif()
|
||||
elseif(FreeBSD)
|
||||
target_link_libraries(libfastfetch
|
||||
PRIVATE "m"
|
||||
@@ -1616,6 +1620,7 @@ elseif(OpenBSD)
|
||||
)
|
||||
elseif(NetBSD)
|
||||
target_link_libraries(libfastfetch
|
||||
PRIVATE "bluetooth"
|
||||
PRIVATE "m"
|
||||
PRIVATE "prop"
|
||||
)
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
[](https://repology.org/project/fastfetch/versions)
|
||||
[](https://repology.org/project/fastfetch/versions)
|
||||
|
||||
Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for fetching system information and displaying it prettily. It is written mainly in C, with performance and customizability in mind. Currently, Linux, macOS, Windows 7+, Android, FreeBSD, OpenBSD, NetBSD, DragonFly, Haiku and SunOS are supported.
|
||||
Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for fetching system information and displaying it in a visually appealing way. It is written mainly in C, with a focus on performance and customizability. Currently, it supports Linux, macOS, Windows 7+, Android, FreeBSD, OpenBSD, NetBSD, DragonFly, Haiku, and SunOS.
|
||||
|
||||
<img src="screenshots/example1.png" width="49%" align="left" />
|
||||
<img src="https://upload.wikimedia.org/wikipedia/commons/2/24/Transparent_Square_Tiles_Texture.png" width="49%" height="16px" align="left" />
|
||||
@@ -27,7 +27,7 @@ There are [screenshots on different platforms](https://github.com/fastfetch-cli/
|
||||
|
||||
### Linux
|
||||
|
||||
Some distros package an outdated fastfetch version. Older versions receive no support, so please try always to use the latest version.
|
||||
Some distributions package outdated versions of fastfetch. Older versions receive no support, so please always try to use the latest version.
|
||||
|
||||
<a href="https://repology.org/project/fastfetch/versions">
|
||||
<img src="https://repology.org/badge/vertical-allrepos/fastfetch.svg?columns=2" alt="Packaging status" align="right">
|
||||
@@ -49,9 +49,9 @@ Some distros package an outdated fastfetch version. Older versions receive no su
|
||||
* Void Linux: `xbps-install fastfetch`
|
||||
* Venom Linux: `scratch install fastfetch`
|
||||
|
||||
You may need `sudo`, `doas` or `sup` to run these commands.
|
||||
You may need `sudo`, `doas`, or `sup` to run these commands.
|
||||
|
||||
If fastfetch is not packaged for your distro or an outdated version is packaged, [linuxbrew](https://brew.sh/) is a good alternative: `brew install fastfetch`
|
||||
If fastfetch is not packaged for your distribution or an outdated version is packaged, [linuxbrew](https://brew.sh/) is a good alternative: `brew install fastfetch`
|
||||
|
||||
### macOS
|
||||
|
||||
@@ -71,6 +71,10 @@ You may also download the program directly from [the GitHub releases page](https
|
||||
|
||||
* `pkg install fastfetch`
|
||||
|
||||
### NetBSD
|
||||
|
||||
* `pkgin in fastfetch`
|
||||
|
||||
### Android (Termux)
|
||||
|
||||
* `pkg install fastfetch`
|
||||
@@ -81,19 +85,19 @@ You may also download the program directly from [the GitHub releases page](https
|
||||
|
||||
## Build from source
|
||||
|
||||
See Wiki: https://github.com/fastfetch-cli/fastfetch/wiki/Building
|
||||
See the Wiki: https://github.com/fastfetch-cli/fastfetch/wiki/Building
|
||||
|
||||
## Usage
|
||||
|
||||
* Run it with default configuration: `fastfetch`
|
||||
* Run it with [all supported modules](https://github.com/fastfetch-cli/fastfetch/wiki/Support+Status#available-modules) and find what interests you: `fastfetch -c all.jsonc`
|
||||
* Find all data that fastfetch detects: `fastfetch -s <module> --format json`
|
||||
* Run with default configuration: `fastfetch`
|
||||
* Run with [all supported modules](https://github.com/fastfetch-cli/fastfetch/wiki/Support+Status#available-modules) to find what interests you: `fastfetch -c all.jsonc`
|
||||
* View all data that fastfetch detects: `fastfetch -s <module> --format json`
|
||||
* Display help messages: `fastfetch --help`
|
||||
* Generate config file based on command line arguments: `fastfetch --arg1 --arg2 --gen-config`
|
||||
* Generate a config file based on command line arguments: `fastfetch --arg1 --arg2 --gen-config`
|
||||
|
||||
## Customization
|
||||
|
||||
Fastfetch uses the JSONC (or JSON with comments) for configuration. [See Wiki for detail](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration). There are some premade config files in [`presets`](presets), including the ones used for the screenshots above. You can load them using `-c <filename>`. Those files can serve as examples of the configuration syntax.
|
||||
Fastfetch uses JSONC (JSON with comments) for configuration. [See the Wiki for details](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration). There are some premade config files in the [`presets`](presets) directory, including those used for the screenshots above. You can load them using `-c <filename>`. These files can serve as examples of the configuration syntax.
|
||||
|
||||
Logos can also be heavily customized; see the [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for more information.
|
||||
|
||||
@@ -102,29 +106,29 @@ Logos can also be heavily customized; see the [logo documentation](https://githu
|
||||
### Q: Neofetch is good enough. Why do I need fastfetch?
|
||||
|
||||
1. Fastfetch is actively maintained.
|
||||
2. Fastfetch is faster. As the name suggests.
|
||||
3. Fastfetch has a greater number of features, though by default fastfetch only has a few modules enabled; use `fastfetch -c all` to find what you want.
|
||||
2. Fastfetch is faster, as the name suggests.
|
||||
3. Fastfetch has a greater number of features, though by default it only has a few modules enabled; use `fastfetch -c all` to discover what you want.
|
||||
4. Fastfetch is more configurable. You can find more information in the Wiki: <https://github.com/fastfetch-cli/fastfetch/wiki/Configuration>.
|
||||
5. Fastfetch is more polished. For example, neofetch prints `555 MiB` in the Memory module and `23 G` in the Disk module, whereas fastfetch prints `555.00 MiB` and `22.97 GiB` respectively.
|
||||
6. Fastfetch is more accurate. For example, [neofetch never actually supports the Wayland protocol](https://github.com/dylanaraps/neofetch/pull/2395).
|
||||
|
||||
### Q: Fastfetch shows my local IP address. It leaks my privacy!
|
||||
### Q: Fastfetch shows my local IP address. Does it leak my privacy?
|
||||
|
||||
A local IP (10.x.x.x, 172.x.x.x, 192.168.x.x) has nothing to do with privacy. It only makes sense if you are on the same network, for example, if you connect to the same Wi-Fi network.
|
||||
A local IP address (10.x.x.x, 172.x.x.x, 192.168.x.x) has nothing to do with privacy. It only has meaning if you are on the same network, for example, if you connect to the same Wi-Fi network.
|
||||
|
||||
Actually the `Local IP` module is the most useful module for me personally. I (@CarterLi) have several VMs installed to test fastfetch and often need to SSH into them. I have fastfetch running on shell startup and I never need to type `ip addr` manually.
|
||||
Actually, the `Local IP` module is the most useful module for me personally. I (@CarterLi) have several VMs installed to test fastfetch and often need to SSH into them. With fastfetch running on shell startup, I never need to type `ip addr` manually.
|
||||
|
||||
If you really don't like it, you can disable the `Local IP` module in `config.jsonc`.
|
||||
|
||||
### Q: Where is the config file? I can't find it.
|
||||
|
||||
`Fastfetch` does not generate config file automatically. You can use `fastfetch --gen-config` to generate one. The config file will be saved in `~/.config/fastfetch/config.jsonc` by default. See [Wiki for detail](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration).
|
||||
Fastfetch does not generate a config file automatically. You can use `fastfetch --gen-config` to generate one. The config file will be saved in `~/.config/fastfetch/config.jsonc` by default. See the [Wiki for details](https://github.com/fastfetch-cli/fastfetch/wiki/Configuration).
|
||||
|
||||
### Q: The configuration is so complex. Where is the documentation?
|
||||
|
||||
Fastfetch uses JSON (with comments) for configuration. I suggest you use an IDE with JSON schema support (like VSCode) to edit it.
|
||||
Fastfetch uses JSON (with comments) for configuration. I suggest using an IDE with JSON schema support (like VSCode) to edit it.
|
||||
|
||||
Alternatively, you can refer to the presets in [`presets` directory](https://github.com/fastfetch-cli/fastfetch/tree/dev/presets).
|
||||
Alternatively, you can refer to the presets in the [`presets` directory](https://github.com/fastfetch-cli/fastfetch/tree/dev/presets).
|
||||
|
||||
The **correct** way to edit the configuration:
|
||||
|
||||
@@ -134,32 +138,32 @@ This is an example that [changes size prefix from MiB / GiB to MB / GB](https://
|
||||
|
||||
### Q: I WANT THE DOCUMENTATION!
|
||||
|
||||
[Here is the documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Json-Schema). It is generated from [JSON schema](https://github.com/fastfetch-cli/fastfetch/blob/dev/doc/json_schema.json) but you won't like it.
|
||||
[Here is the documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Json-Schema). It is generated from the [JSON schema](https://github.com/fastfetch-cli/fastfetch/blob/dev/doc/json_schema.json), but you might not find it very user-friendly.
|
||||
|
||||
### Q: How can I customize the module output?
|
||||
|
||||
Fastfetch uses `format` to generate output. For example, to make the `GPU` module show only the GPU name (leaving other information undisplayed), you can use
|
||||
Fastfetch uses `format` to generate output. For example, to make the `GPU` module show only the GPU name (leaving other information undisplayed), you can use:
|
||||
|
||||
```jsonc
|
||||
{
|
||||
"modules": [
|
||||
{
|
||||
"type": "gpu",
|
||||
"format": "{name}" // See `fastfetch -h gpu-format` for detail
|
||||
"format": "{name}" // See `fastfetch -h gpu-format` for details
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
. . which is equivalent to `fastfetch -s gpu --gpu-format '{name}'`
|
||||
...which is equivalent to `fastfetch -s gpu --gpu-format '{name}'`
|
||||
|
||||
See `fastfetch -h format` for information on basic usage. For module specific formattion, see `fastfetch -h <module>-format`
|
||||
See `fastfetch -h format` for information on basic usage. For module-specific formatting, see `fastfetch -h <module>-format`
|
||||
|
||||
### Q: I have my own ascii-art / image file. How can I show it with fastfetch?
|
||||
### Q: I have my own ASCII art / image file. How can I show it with fastfetch?
|
||||
|
||||
Try `fastfetch -l /path/to/logo`. See [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for detail.
|
||||
Try `fastfetch -l /path/to/logo`. See the [logo documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options) for details.
|
||||
|
||||
If you just want to display distro name in [FIGlet text](https://github.com/pwaller/pyfiglet):
|
||||
If you just want to display the distro name in [FIGlet text](https://github.com/pwaller/pyfiglet):
|
||||
|
||||
```bash
|
||||
# install pyfiglet and jq first
|
||||
@@ -168,32 +172,32 @@ pyfiglet -s -f small_slant $(fastfetch -s os --format json | jq -r '.[0].result.
|
||||
|
||||

|
||||
|
||||
### Q: My image logo behaves weird. How can I fix it?
|
||||
### Q: My image logo behaves strangely. How can I fix it?
|
||||
|
||||
See troubleshooting section: <https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options#troubleshooting>
|
||||
See the troubleshooting section: <https://github.com/fastfetch-cli/fastfetch/wiki/Logo-options#troubleshooting>
|
||||
|
||||
### Q: Fastfetch runs in white and black on shell startup. Why?
|
||||
### Q: Fastfetch runs in black and white on shell startup. Why?
|
||||
|
||||
This issue usually happens when using fastfetch with `p10k`. There are known incompatibility between fastfetch and p10k instant prompt.
|
||||
The p10k doc clearly states that you should NOT print anything to stdout after `p10k-instant-prompt` is initialized. You should either put `fastfetch` before initialization of `p10k-instant-prompt` (recommended)
|
||||
This issue usually occurs when using fastfetch with `p10k`. There are known incompatibilities between fastfetch and p10k instant prompt.
|
||||
The p10k documentation clearly states that you should NOT print anything to stdout after `p10k-instant-prompt` is initialized. You should put `fastfetch` before the initialization of `p10k-instant-prompt` (recommended).
|
||||
|
||||
You can always use `fastfetch --pipe false` to force fastfetch running in colorful mode.
|
||||
You can always use `fastfetch --pipe false` to force fastfetch to run in colorful mode.
|
||||
|
||||
### Q: Why do fastfetch and neofetch show different memory usage result?
|
||||
### Q: Why do fastfetch and neofetch show different memory usage results?
|
||||
|
||||
See [#1096](https://github.com/fastfetch-cli/fastfetch/issues/1096).
|
||||
|
||||
### Q: Fastfetch shows less dpkg packages than neofetch, is it a bug?
|
||||
### Q: Fastfetch shows fewer dpkg packages than neofetch. Is it a bug?
|
||||
|
||||
Neofetch incorrectly counts `rc` packages ( the package has been removed, but that the configuration files remain ). Bug https://github.com/dylanaraps/neofetch/issues/2278
|
||||
Neofetch incorrectly counts `rc` packages (packages that have been removed but still have configuration files remaining). See bug: https://github.com/dylanaraps/neofetch/issues/2278
|
||||
|
||||
### Q: I use Debian / Ubuntu / Debian derived distro. My GPU is detected as `XXXX Device XXXX (VGA compatible)`. Is it a bug?
|
||||
### Q: I use Debian / Ubuntu / Debian-derived distro. My GPU is detected as `XXXX Device XXXX (VGA compatible)`. Is this a bug?
|
||||
|
||||
Try upgrading `pci.ids`: Download <https://pci-ids.ucw.cz/v2.2/pci.ids> and overwrite file `/usr/share/hwdata/pci.ids`. For AMD GPUs, you should also upgrade `amdgpu.ids`: Download <https://gitlab.freedesktop.org/mesa/drm/-/raw/main/data/amdgpu.ids> and overwrite file `/usr/share/libdrm/amdgpu.ids`
|
||||
Try upgrading `pci.ids`: Download <https://pci-ids.ucw.cz/v2.2/pci.ids> and overwrite the file `/usr/share/hwdata/pci.ids`. For AMD GPUs, you should also upgrade `amdgpu.ids`: Download <https://gitlab.freedesktop.org/mesa/drm/-/raw/main/data/amdgpu.ids> and overwrite the file `/usr/share/libdrm/amdgpu.ids`
|
||||
|
||||
Alternatively, you may try to use `fastfetch --gpu-driver-specific`, so that `fastfetch` will try to ask the driver for GPU name if supported.
|
||||
Alternatively, you may try using `fastfetch --gpu-driver-specific`, which will make fastfetch attempt to ask the driver for the GPU name if supported.
|
||||
|
||||
### Q: I get error `Authorization required, but no authorization protocol specified` when running fastfetch in root
|
||||
### Q: I get the error `Authorization required, but no authorization protocol specified` when running fastfetch as root
|
||||
|
||||
Try `export XAUTHORITY=$HOME/.Xauthority`
|
||||
|
||||
@@ -203,7 +207,7 @@ Try `fastfetch --wm-detect-plugin`. See also [#984](https://github.com/fastfetch
|
||||
|
||||
### Q: How can I change the colors of my ASCII logo?
|
||||
|
||||
Try `fastfetch --logo-color-[1-9] <color>`. `[1-9]` is the index of color placeholders.
|
||||
Try `fastfetch --logo-color-[1-9] <color>`, where `[1-9]` is the index of color placeholders.
|
||||
|
||||
For example: `fastfetch --logo-color-1 red --logo-color-2 green`.
|
||||
|
||||
@@ -220,7 +224,7 @@ In JSONC, you can use:
|
||||
}
|
||||
```
|
||||
|
||||
### Q: How to hide a key?
|
||||
### Q: How do I hide a key?
|
||||
|
||||
Set the key to a white space.
|
||||
|
||||
@@ -230,9 +234,59 @@ Set the key to a white space.
|
||||
}
|
||||
```
|
||||
|
||||
### Q: How can I display images on Windows?
|
||||
|
||||
As of April 2025:
|
||||
|
||||
#### mintty and Wezterm
|
||||
|
||||
mintty (used by Bash on Windows and MSYS2) and Wezterm (nightly build only) support the iTerm image protocol on Windows.
|
||||
|
||||
In `config.jsonc`:
|
||||
```json
|
||||
{
|
||||
"logo": {
|
||||
"type": "iterm",
|
||||
"source": "C:/path/to/image.png",
|
||||
"width": <num-in-chars>
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### Windows Terminal
|
||||
|
||||
Windows Terminal supports the sixel image protocol only.
|
||||
|
||||
* If you installed fastfetch through MSYS2:
|
||||
1. Install imagemagick: `pacman -S mingw-w64-<subsystem>-x86_64-imagemagick`
|
||||
2. In `config.jsonc`:
|
||||
```jsonc
|
||||
{
|
||||
"logo": {
|
||||
"type": "sixel", // DO NOT USE "auto"
|
||||
"source": "C:/path/to/image.png", // Do NOT use `~` as fastfetch is a native Windows program and doesn't apply cygwin path conversion
|
||||
"width": <image-width-in-chars>, // Optional
|
||||
"height": <image-height-in-chars> // Optional
|
||||
}
|
||||
}
|
||||
```
|
||||
* If you installed fastfetch via scoop or downloaded the binary directly from the GitHub Releases page:
|
||||
1. Convert your image manually to sixel format using [any online image conversion service](https://www.google.com/search?q=convert+image+to+sixel)
|
||||
2. In `config.jsonc`:
|
||||
```jsonc
|
||||
{
|
||||
"logo": {
|
||||
"type": "raw", // DO NOT USE "auto"
|
||||
"source": "C:/path/to/image.sixel",
|
||||
"width": <image-width-in-chars>, // Required
|
||||
"height": <image-height-in-chars> // Required
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Q: I want feature A / B / C. Will fastfetch support it?
|
||||
|
||||
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:
|
||||
Fastfetch is a system information tool. We only accept hardware or system-level software feature requests. For most personal uses, I recommend using the `Command` module to implement custom functionality, which can be used to grab output from a custom shell script:
|
||||
|
||||
```jsonc
|
||||
// This module shows the default editor
|
||||
@@ -247,23 +301,23 @@ Fastfetch is a system information tool. We only accept hardware or system level
|
||||
}
|
||||
```
|
||||
|
||||
Otherwise, open a feature request in [GitHub Issues](https://github.com/fastfetch-cli/fastfetch/issues).
|
||||
Otherwise, please open a feature request in [GitHub Issues](https://github.com/fastfetch-cli/fastfetch/issues).
|
||||
|
||||
### Q: I have questions. Where can I get help?
|
||||
|
||||
* For usage questions, please start a discussion in [GitHub Discussions](https://github.com/fastfetch-cli/fastfetch/discussions).
|
||||
* For possible bugs, please open an issue in [GitHub Issues](https://github.com/fastfetch-cli/fastfetch/issues). Be sure to fill the bug-report template carefully for developers to investigate.
|
||||
* For possible bugs, please open an issue in [GitHub Issues](https://github.com/fastfetch-cli/fastfetch/issues). Be sure to fill out the bug report template carefully to help developers investigate.
|
||||
|
||||
## Donate
|
||||
|
||||
If you find Fastfetch to be useful, please consider donating.
|
||||
If you find Fastfetch useful, please consider donating.
|
||||
|
||||
* Current maintainer: [@CarterLi](https://paypal.me/zhangsongcui)
|
||||
* Original author: [@LinusDierheimer](https://github.com/sponsors/LinusDierheimer)
|
||||
|
||||
## Star History
|
||||
|
||||
Give it a star to support us!
|
||||
Give us a star to show your support!
|
||||
|
||||
<a href="https://star-history.com/#fastfetch-cli/fastfetch&Date">
|
||||
<picture>
|
||||
|
||||
+140
-59
@@ -1,8 +1,7 @@
|
||||
.TH FASTFETCH 1 "@FASTFETCH_BUILD_DATE@" "@CMAKE_PROJECT_NAME@ @CMAKE_PROJECT_VERSION@"
|
||||
|
||||
.SH NAME
|
||||
fastfetch \- a neofetch\-like tool for fetching system information and
|
||||
displaying them in a pretty way
|
||||
fastfetch \- a fast and customizable system information tool similar to neofetch
|
||||
|
||||
.SH SYNOPSIS
|
||||
|
||||
@@ -11,15 +10,12 @@ displaying them in a pretty way
|
||||
|
||||
.SH DESCRIPTION
|
||||
|
||||
Fastfetch is a neofetch\-like tool for fetching system information and
|
||||
displaying them in a pretty way. It is written mainly in C, with performance
|
||||
and customizability in mind.
|
||||
Currently, Linux, Android, FreeBSD, MacOS and Windows 7+ are supported.
|
||||
Fastfetch is a tool for displaying system information in a visually appealing way. Written primarily in C, it focuses on performance and customizability while providing functionality similar to neofetch.
|
||||
It supports Linux, Android, *BSD, macOS, Haiku, and Windows 7 or newer.
|
||||
|
||||
.SH "EXIT STATUS"
|
||||
|
||||
On successful execution, fastfetch returns zero. If any error happened,
|
||||
the exit code will be non\-zero.
|
||||
Fastfetch returns zero on successful execution. Any errors result in a non-zero exit code.
|
||||
|
||||
.SH OPTIONS
|
||||
|
||||
@@ -27,115 +23,200 @@ the exit code will be non\-zero.
|
||||
.TP
|
||||
|
||||
.B \-h, \-\-help \fI[command]
|
||||
Show help output, displaying all available options or help for given command
|
||||
Display help information for all available options or for a specific command
|
||||
.TP
|
||||
|
||||
.B \-v, \-\-version
|
||||
Show version of fastfetch
|
||||
Display the version of fastfetch
|
||||
.TP
|
||||
|
||||
.B \-\-version\-raw
|
||||
Display the raw version string (major.minor.patch)
|
||||
.TP
|
||||
|
||||
.B \-\-list\-config\-paths
|
||||
List search paths of config files
|
||||
List search paths for configuration files
|
||||
.TP
|
||||
|
||||
.B \-\-list\-data\-paths
|
||||
List search paths of presets and logos
|
||||
List search paths for presets and logos
|
||||
.TP
|
||||
|
||||
.B \-\-list\-logos
|
||||
List available logos, they can be loaded with \fI\-\-logo
|
||||
List available logos that can be loaded with \fI\-\-logo
|
||||
.TP
|
||||
|
||||
.B \-\-list\-modules
|
||||
List available modules
|
||||
List all available modules
|
||||
.TP
|
||||
|
||||
.B \-\-list\-presets
|
||||
List available presets, they can be loaded with \fI\-\-config
|
||||
List available presets that can be loaded with \fI\-\-config
|
||||
.TP
|
||||
|
||||
.B \-\-list\-features
|
||||
List the supported features fastfetch was compiled with
|
||||
List the features that fastfetch was compiled with (mainly for development)
|
||||
.TP
|
||||
|
||||
.B \-\-print\-logos
|
||||
Print available logos
|
||||
Display all available logos
|
||||
.TP
|
||||
|
||||
.B \-\-print\-structure
|
||||
Print the default structure
|
||||
Display the default structure
|
||||
.TP
|
||||
|
||||
.B \-\-format \fI<type>
|
||||
Set the output format. Besides the
|
||||
.I default
|
||||
format, only
|
||||
.I json
|
||||
is supported currently.
|
||||
|
||||
|
||||
.SS "Display Options"
|
||||
.TP
|
||||
|
||||
.B \-l, \-\-logo \fI<logo>
|
||||
Set the logo to display
|
||||
.TP
|
||||
|
||||
.B \-s, \-\-structure \fI<structure>
|
||||
Set the structure of the fetch. For details about the structure,
|
||||
see the CONFIGURATION section.
|
||||
|
||||
Set the output format. Available options are:
|
||||
.RS
|
||||
.IP \(bu 2
|
||||
\fIdefault\fR: Default human-readable format
|
||||
.IP \(bu 2
|
||||
\fIjson\fR: JSON format for machine processing
|
||||
.RE
|
||||
|
||||
.SS "Config Options"
|
||||
.TP
|
||||
|
||||
.B \-c, \-\-config \fI<config>
|
||||
Use the specified config file or preset. If
|
||||
.I none
|
||||
is specified, disable further config loading. For details about
|
||||
config files, see the CONFIGURATION section
|
||||
Use the specified config file or preset. Specify \fInone\fR to disable further config loading. See the CONFIGURATION section for details on config files.
|
||||
.TP
|
||||
|
||||
.B \-\-gen\-config \fI[file]
|
||||
Generate a config file with options specified on the command line.
|
||||
If \fIfile\fR is specified, the configuration will be written to the
|
||||
file, otherwise it will be written to stdout.
|
||||
.B \-\-gen\-config \fI[path]
|
||||
Generate a config file with options specified on the command line. If \fIpath\fR is not specified, it defaults to \fB~/.config/fastfetch/config.jsonc\fR. If \fIpath\fR is "\-", the configuration will be written to stdout.
|
||||
.TP
|
||||
|
||||
.B \-\-gen\-config\-force \fI[file]
|
||||
Same as \fB\-\-gen\-config\fR, but overwrites existing config
|
||||
.B \-\-gen\-config\-force \fI[path]
|
||||
Same as \fB\-\-gen\-config\fR, but overwrites any existing file at the destination path.
|
||||
.TP
|
||||
|
||||
.SS "Logo Options"
|
||||
.TP
|
||||
|
||||
To list all options, use \fB\-\-help\fR. It will also print all available module options.
|
||||
.B \-l, \-\-logo \fI<logo>
|
||||
Set the logo to display. Can be the name of a built-in logo or a path to an image file. Use \fInone\fR to disable the logo.
|
||||
.TP
|
||||
|
||||
.B \-\-logo\-type \fI<type>
|
||||
Set the type of the logo specified with \fI\-\-logo\fR. Available types include \fIauto\fR, \fIbuiltin\fR, \fIfile\fR, \fIsixel\fR, \fIkitty\fR, and others. See \fB\-\-help logo\-type\fR for details.
|
||||
.TP
|
||||
|
||||
.B \-\-logo\-width \fI<width>
|
||||
Set the width of the logo in characters (for image logos)
|
||||
.TP
|
||||
|
||||
.B \-\-logo\-height \fI<height>
|
||||
Set the height of the logo in characters (for image logos)
|
||||
.TP
|
||||
|
||||
.B \-\-logo\-color\-[1\-9] \fI<color>
|
||||
Override specific colors in the logo
|
||||
|
||||
.SS "Display Options"
|
||||
.TP
|
||||
|
||||
.B \-s, \-\-structure \fI<structure>
|
||||
Set the structure of the fetch (a colon-separated list of module names)
|
||||
.TP
|
||||
|
||||
.B \-\-color \fI<color>
|
||||
Set the color of keys and title. See \fB\-\-help color\fR for available colors.
|
||||
.TP
|
||||
|
||||
.B \-\-color\-keys \fI<color>
|
||||
Set the color of keys only
|
||||
.TP
|
||||
|
||||
.B \-\-color\-title \fI<color>
|
||||
Set the color of the title only
|
||||
.TP
|
||||
|
||||
.B \-\-separator \fI<string>
|
||||
Set the separator between key and value (default: ": ")
|
||||
.TP
|
||||
|
||||
.B \-\-key\-width \fI<num>
|
||||
Align the width of keys to \fI<num>\fR characters
|
||||
.TP
|
||||
|
||||
.B \-\-show\-errors
|
||||
Display errors when they occur (default: false)
|
||||
.TP
|
||||
|
||||
.B \-\-pipe
|
||||
Disable colors (automatically detected based on whether stdout is a terminal)
|
||||
|
||||
To list all available options including module-specific options, use \fB\-\-help\fR.
|
||||
|
||||
.SH CONFIGURATION
|
||||
.SS "Fetch Structure"
|
||||
The structure of a fetch describes the modules that should be included in
|
||||
the output. It consists of a string of modules, separated by a colon (:).
|
||||
The structure defines which modules to display and in what order. It consists of module names separated by colons (:).
|
||||
For example: \fBtitle:separator:os:kernel:uptime\fR
|
||||
|
||||
To list all available modules, use \fB\-\-list\-modules\fR
|
||||
|
||||
.SS "Config Files"
|
||||
|
||||
Fastfetch uses JSONC based format for configuration. Fastfetch doesn't generate
|
||||
config file automatically; it should be generated manually by \fB\-\-gen\-config\fR.
|
||||
The config file will be saved in \fB~/.config/fastfetch/config.jsonc\fR by default.
|
||||
Fastfetch uses JSONC for configuration files. JSONC is JSON with support for comments (// and /* */). Configuration files must have the .jsonc extension.
|
||||
|
||||
A JSONC config file is a JSON file that also supports comments with (// and /* */).
|
||||
Those files must have the extension '.jsonc'.
|
||||
You can generate a default config file using \fB\-\-gen\-config\fR. By default, the config file is saved at \fB~/.config/fastfetch/config.jsonc\fR.
|
||||
|
||||
The specified configuration/preset files are searched in the following order:
|
||||
The configuration/preset files are searched in the following locations (in order):
|
||||
|
||||
1. relative to the current working directory
|
||||
.RS
|
||||
.IP 1. 4
|
||||
Relative to the current working directory
|
||||
.IP 2. 4
|
||||
Relative to ~/.local/share/fastfetch/presets/
|
||||
.IP 3. 4
|
||||
Relative to /usr/share/fastfetch/presets/
|
||||
.RE
|
||||
|
||||
2. relative to ~/.local/share/fastfetch/presets/
|
||||
For detailed information on logo options, module configuration, and formatting, visit:
|
||||
.RS
|
||||
\fIhttps://github.com/fastfetch-cli/fastfetch/wiki/Configuration\fR
|
||||
.RE
|
||||
|
||||
3. relative to /usr/share/fastfetch/presets/
|
||||
Fastfetch provides several built-in presets. List them with \fB\-\-list\-presets\fR.
|
||||
|
||||
Fastfetch provides some default presets. List them with \fB\-\-list\-presets\fR.
|
||||
.SS "JSON Schema"
|
||||
A JSON schema is available for editor intelligence when editing the configuration file. Add the following line at the beginning of your config file:
|
||||
.PP
|
||||
\fB"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"\fR
|
||||
|
||||
.SH EXAMPLES
|
||||
.TP
|
||||
Basic usage:
|
||||
.RS
|
||||
\fBfastfetch\fR
|
||||
.RE
|
||||
.TP
|
||||
Use a specific logo:
|
||||
.RS
|
||||
\fBfastfetch \-\-logo arch\fR
|
||||
.RE
|
||||
.TP
|
||||
Custom structure:
|
||||
.RS
|
||||
\fBfastfetch \-\-structure title:os:kernel:uptime:memory\fR
|
||||
.RE
|
||||
.TP
|
||||
Generate a config file:
|
||||
.RS
|
||||
\fBfastfetch \-\-gen\-config\fR
|
||||
.RE
|
||||
.TP
|
||||
Use a preset:
|
||||
.RS
|
||||
\fBfastfetch \-\-config neofetch\fR
|
||||
.RE
|
||||
|
||||
.SH "SEE ALSO"
|
||||
.BR neofetch (1)
|
||||
|
||||
.SH BUGS
|
||||
Please report bugs to: \fIhttps://github.com/fastfetch\-cli/fastfetch/issues\fR
|
||||
|
||||
.SH AUTHORS
|
||||
Fastfetch is developed by a team of contributors on GitHub.
|
||||
Visit \fIhttps://github.com/fastfetch-cli/fastfetch\fR for more information.
|
||||
|
||||
+118
-116
@@ -35,14 +35,14 @@
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "number",
|
||||
"description": "1 for percentage number, 2 for multi-color bar, 3 for both, 6 for bar only, 9 for colored number, 10 for monochrome bar",
|
||||
"description": "0 to use global setting, 1 for percentage number, 2 for multi-color bar, 3 for both, 6 for bar only, 9 for colored number, 10 for monochrome bar",
|
||||
"minimum": 0,
|
||||
"maximum": 255,
|
||||
"default": 9
|
||||
},
|
||||
{
|
||||
"type": "array",
|
||||
"description": "array of string flags",
|
||||
"description": "Array of string flags",
|
||||
"items": {
|
||||
"enum": [
|
||||
"num",
|
||||
@@ -60,7 +60,7 @@
|
||||
]
|
||||
},
|
||||
"percent": {
|
||||
"description": "Threshold of percentage colors",
|
||||
"description": "Thresholds for percentage colors",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -68,13 +68,13 @@
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"description": "Value less then green will be shown in green"
|
||||
"description": "Values less than green will be shown in green"
|
||||
},
|
||||
"yellow": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"description": "Value greater than green and less then yellow will be shown in yellow.\nValue greater than yellow will be shown in red"
|
||||
"description": "Values greater than green and less than yellow will be shown in yellow.\nValues greater than yellow will be shown in red"
|
||||
},
|
||||
"type": {
|
||||
"$ref": "#/$defs/percentType"
|
||||
@@ -96,13 +96,13 @@
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"description": "Value (in celsius) less then green will be shown in green"
|
||||
"description": "Values (in celsius) less than green will be shown in green"
|
||||
},
|
||||
"yellow": {
|
||||
"type": "integer",
|
||||
"minimum": 0,
|
||||
"maximum": 100,
|
||||
"description": "Value (in celsius) greater than green and less then yellow will be shown in yellow.\nValue greater than yellow will be shown in red"
|
||||
"description": "Values (in celsius) greater than green and less than yellow will be shown in yellow.\nValues greater than yellow will be shown in red"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,290 +111,290 @@
|
||||
|
||||
|
||||
"batteryFormat": {
|
||||
"description": "Output format of the module `Battery`. See `-h format` for formatting syntax\n 1. {manufacturer}: Battery manufacturer\n 2. {model-name}: Battery model name\n 3. {technology}: Battery technology\n 4. {capacity}: Battery capacity (percentage num)\n 5. {status}: Battery status\n 6. {temperature}: Battery temperature (formatted)\n 7. {cycle-count}: Battery cycle count\n 8. {serial}: Battery serial number\n 9. {manufacture-date}: Battery manufactor date\n 10. {capacity-bar}: Battery capacity (percentage bar)\n 11. {time-days}: Battery time remaining days\n 12. {time-hours}: Battery time remaining hours\n 13. {time-minutes}: Battery time remaining minutes\n 14. {time-seconds}: Battery time remaining seconds",
|
||||
"description": "Output format of the module `Battery`. See Wiki for formatting syntax\n 1. {manufacturer}: Battery manufacturer\n 2. {model-name}: Battery model name\n 3. {technology}: Battery technology\n 4. {capacity}: Battery capacity (percentage num)\n 5. {status}: Battery status\n 6. {temperature}: Battery temperature (formatted)\n 7. {cycle-count}: Battery cycle count\n 8. {serial}: Battery serial number\n 9. {manufacture-date}: Battery manufactor date\n 10. {capacity-bar}: Battery capacity (percentage bar)\n 11. {time-days}: Battery time remaining days\n 12. {time-hours}: Battery time remaining hours\n 13. {time-minutes}: Battery time remaining minutes\n 14. {time-seconds}: Battery time remaining seconds",
|
||||
"type": "string"
|
||||
},
|
||||
"biosFormat": {
|
||||
"description": "Output format of the module `Bios`. See `-h format` 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",
|
||||
"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",
|
||||
"type": "string"
|
||||
},
|
||||
"bluetoothFormat": {
|
||||
"description": "Output format of the module `Bluetooth`. See `-h format` for formatting syntax\n 1. {name}: Name\n 2. {address}: Address\n 3. {type}: Type\n 4. {battery-percentage}: Battery percentage number\n 5. {connected}: Is connected\n 6. {battery-percentage-bar}: Battery percentage bar",
|
||||
"description": "Output format of the module `Bluetooth`. See Wiki for formatting syntax\n 1. {name}: Name\n 2. {address}: Address\n 3. {type}: Type\n 4. {battery-percentage}: Battery percentage number\n 5. {connected}: Is connected\n 6. {battery-percentage-bar}: Battery percentage bar",
|
||||
"type": "string"
|
||||
},
|
||||
"bluetoothradioFormat": {
|
||||
"description": "Output format of the module `BluetoothRadio`. See `-h format` for formatting syntax\n 1. {name}: Radio name for discovering\n 2. {address}: Address\n 3. {lmp-version}: LMP version\n 4. {lmp-subversion}: LMP subversion\n 5. {version}: Bluetooth version\n 6. {vendor}: Vendor\n 7. {discoverable}: Discoverable\n 8. {connectable}: Connectable / Pairable",
|
||||
"description": "Output format of the module `BluetoothRadio`. See Wiki for formatting syntax\n 1. {name}: Radio name for discovering\n 2. {address}: Address\n 3. {lmp-version}: LMP version\n 4. {lmp-subversion}: LMP subversion\n 5. {version}: Bluetooth version\n 6. {vendor}: Vendor\n 7. {discoverable}: Discoverable\n 8. {connectable}: Connectable / Pairable",
|
||||
"type": "string"
|
||||
},
|
||||
"boardFormat": {
|
||||
"description": "Output format of the module `Board`. See `-h format` for formatting syntax\n 1. {name}: Board name\n 2. {vendor}: Board vendor\n 3. {version}: Board version\n 4. {serial}: Board serial number",
|
||||
"description": "Output format of the module `Board`. See Wiki for formatting syntax\n 1. {name}: Board name\n 2. {vendor}: Board vendor\n 3. {version}: Board version\n 4. {serial}: Board serial number",
|
||||
"type": "string"
|
||||
},
|
||||
"bootmgrFormat": {
|
||||
"description": "Output format of the module `Bootmgr`. See `-h format` for formatting syntax\n 1. {name}: Name / description\n 2. {firmware-path}: Firmware file path\n 3. {firmware-name}: Firmware file name\n 4. {secure-boot}: Is secure boot enabled",
|
||||
"description": "Output format of the module `Bootmgr`. See Wiki for formatting syntax\n 1. {name}: Name / description\n 2. {firmware-path}: Firmware file path\n 3. {firmware-name}: Firmware file name\n 4. {secure-boot}: Is secure boot enabled\n 5. {order}: Boot order",
|
||||
"type": "string"
|
||||
},
|
||||
"brightnessFormat": {
|
||||
"description": "Output format of the module `Brightness`. See `-h format` for formatting syntax\n 1. {percentage}: Screen brightness (percentage num)\n 2. {name}: Screen name\n 3. {max}: Maximum brightness value\n 4. {min}: Minimum brightness value\n 5. {current}: Current brightness value\n 6. {percentage-bar}: Screen brightness (percentage bar)",
|
||||
"description": "Output format of the module `Brightness`. See Wiki for formatting syntax\n 1. {percentage}: Screen brightness (percentage num)\n 2. {name}: Screen name\n 3. {max}: Maximum brightness value\n 4. {min}: Minimum brightness value\n 5. {current}: Current brightness value\n 6. {percentage-bar}: Screen brightness (percentage bar)\n 7. {is-builtin}: Is built-in screen",
|
||||
"type": "string"
|
||||
},
|
||||
"btrfsFormat": {
|
||||
"description": "Output format of the module `Btrfs`. See `-h format` for formatting syntax\n 1. {name}: Name / Label\n 2. {uuid}: UUID\n 3. {devices}: Associated devices\n 4. {features}: Enabled features\n 5. {used}: Size used\n 6. {allocated}: Size allocated\n 7. {total}: Size total\n 8. {used-percentage}: Used percentage num\n 9. {allocated-percentage}: Allocated percentage num\n 10. {used-percentage-bar}: Used percentage bar\n 11. {allocated-percentage-bar}: Allocated percentage bar\n 12. {node-size}: Node size\n 13. {sector-size}: Sector size",
|
||||
"description": "Output format of the module `Btrfs`. See Wiki for formatting syntax\n 1. {name}: Name / Label\n 2. {uuid}: UUID\n 3. {devices}: Associated devices\n 4. {features}: Enabled features\n 5. {used}: Size used\n 6. {allocated}: Size allocated\n 7. {total}: Size total\n 8. {used-percentage}: Used percentage num\n 9. {allocated-percentage}: Allocated percentage num\n 10. {used-percentage-bar}: Used percentage bar\n 11. {allocated-percentage-bar}: Allocated percentage bar\n 12. {node-size}: Node size\n 13. {sector-size}: Sector size",
|
||||
"type": "string"
|
||||
},
|
||||
"cameraFormat": {
|
||||
"description": "Output format of the module `Camera`. See `-h format` for formatting syntax\n 1. {name}: Device name\n 2. {vendor}: Vendor\n 3. {colorspace}: Color space\n 4. {id}: Identifier\n 5. {width}: Width (in px)\n 6. {height}: Height (in px)",
|
||||
"description": "Output format of the module `Camera`. See Wiki for formatting syntax\n 1. {name}: Device name\n 2. {vendor}: Vendor\n 3. {colorspace}: Color space\n 4. {id}: Identifier\n 5. {width}: Width (in px)\n 6. {height}: Height (in px)",
|
||||
"type": "string"
|
||||
},
|
||||
"chassisFormat": {
|
||||
"description": "Output format of the module `Chassis`. See `-h format` for formatting syntax\n 1. {type}: Chassis type\n 2. {vendor}: Chassis vendor\n 3. {version}: Chassis version\n 4. {serial}: Chassis serial number",
|
||||
"description": "Output format of the module `Chassis`. See Wiki for formatting syntax\n 1. {type}: Chassis type\n 2. {vendor}: Chassis vendor\n 3. {version}: Chassis version\n 4. {serial}: Chassis serial number",
|
||||
"type": "string"
|
||||
},
|
||||
"commandFormat": {
|
||||
"description": "Output format of the module `Command`. See `-h format` for formatting syntax\n 1. {result}: Command result",
|
||||
"description": "Output format of the module `Command`. See Wiki for formatting syntax\n 1. {result}: Command result",
|
||||
"type": "string"
|
||||
},
|
||||
"cpuFormat": {
|
||||
"description": "Output format of the module `CPU`. See `-h format` for formatting syntax\n 1. {name}: Name\n 2. {vendor}: Vendor\n 3. {cores-physical}: Physical core count\n 4. {cores-logical}: Logical core count\n 5. {cores-online}: Online core count\n 6. {freq-base}: Base frequency (formatted)\n 7. {freq-max}: Max frequency (formatted)\n 8. {temperature}: Temperature (formatted)\n 9. {core-types}: Logical core count grouped by frequency\n 10. {packages}: Processor package count",
|
||||
"description": "Output format of the module `CPU`. See Wiki for formatting syntax\n 1. {name}: Name\n 2. {vendor}: Vendor\n 3. {cores-physical}: Physical core count\n 4. {cores-logical}: Logical core count\n 5. {cores-online}: Online core count\n 6. {freq-base}: Base frequency (formatted)\n 7. {freq-max}: Max frequency (formatted)\n 8. {temperature}: Temperature (formatted)\n 9. {core-types}: Logical core count grouped by frequency\n 10. {packages}: Processor package count",
|
||||
"type": "string"
|
||||
},
|
||||
"cpucacheFormat": {
|
||||
"description": "Output format of the module `CPUCache`. See `-h format` for formatting syntax\n 1. {result}: Separate result\n 2. {sum}: Sum result",
|
||||
"description": "Output format of the module `CPUCache`. See Wiki for formatting syntax\n 1. {result}: Separate result\n 2. {sum}: Sum result",
|
||||
"type": "string"
|
||||
},
|
||||
"cpuusageFormat": {
|
||||
"description": "Output format of the module `CPUUsage`. See `-h format` for formatting syntax\n 1. {avg}: CPU usage (percentage num, average)\n 2. {max}: CPU usage (percentage num, maximum)\n 3. {max-index}: CPU core index of maximum usage\n 4. {min}: CPU usage (percentage num, minimum)\n 5. {min-index}: CPU core index of minimum usage\n 6. {avg-bar}: CPU usage (percentage bar, average)\n 7. {max-bar}: CPU usage (percentage bar, maximum)\n 8. {min-bar}: CPU usage (percentage bar, minimum)",
|
||||
"description": "Output format of the module `CPUUsage`. See Wiki for formatting syntax\n 1. {avg}: CPU usage (percentage num, average)\n 2. {max}: CPU usage (percentage num, maximum)\n 3. {max-index}: CPU core index of maximum usage\n 4. {min}: CPU usage (percentage num, minimum)\n 5. {min-index}: CPU core index of minimum usage\n 6. {avg-bar}: CPU usage (percentage bar, average)\n 7. {max-bar}: CPU usage (percentage bar, maximum)\n 8. {min-bar}: CPU usage (percentage bar, minimum)",
|
||||
"type": "string"
|
||||
},
|
||||
"cursorFormat": {
|
||||
"description": "Output format of the module `Cursor`. See `-h format` for formatting syntax\n 1. {theme}: Cursor theme\n 2. {size}: Cursor size",
|
||||
"description": "Output format of the module `Cursor`. See Wiki for formatting syntax\n 1. {theme}: Cursor theme\n 2. {size}: Cursor size",
|
||||
"type": "string"
|
||||
},
|
||||
"datetimeFormat": {
|
||||
"description": "Output format of the module `DateTime`. See `-h format` for formatting syntax\n 1. {year}: Year\n 2. {year-short}: Last two digits of year\n 3. {month}: Month\n 4. {month-pretty}: Month with leading zero\n 5. {month-name}: Month name\n 6. {month-name-short}: Month name short\n 7. {week}: Week number on year\n 8. {weekday}: Weekday\n 9. {weekday-short}: Weekday short\n 10. {day-in-year}: Day in year\n 11. {day-in-month}: Day in month\n 12. {day-in-week}: Day in week\n 13. {hour}: Hour\n 14. {hour-pretty}: Hour with leading zero\n 15. {hour-12}: Hour 12h format\n 16. {hour-12-pretty}: Hour 12h format with leading zero\n 17. {minute}: Minute\n 18. {minute-pretty}: Minute with leading zero\n 19. {second}: Second\n 20. {second-pretty}: Second with leading zero\n 21. {offset-from-utc}: Offset from UTC in the ISO 8601 format\n 22. {timezone-name}: Locale-dependent timezone name or abbreviation\n 23. {day-pretty}: Day in month with leading zero",
|
||||
"description": "Output format of the module `DateTime`. See Wiki for formatting syntax\n 1. {year}: Year\n 2. {year-short}: Last two digits of year\n 3. {month}: Month\n 4. {month-pretty}: Month with leading zero\n 5. {month-name}: Month name\n 6. {month-name-short}: Month name short\n 7. {week}: Week number on year\n 8. {weekday}: Weekday\n 9. {weekday-short}: Weekday short\n 10. {day-in-year}: Day in year\n 11. {day-in-month}: Day in month\n 12. {day-in-week}: Day in week\n 13. {hour}: Hour\n 14. {hour-pretty}: Hour with leading zero\n 15. {hour-12}: Hour 12h format\n 16. {hour-12-pretty}: Hour 12h format with leading zero\n 17. {minute}: Minute\n 18. {minute-pretty}: Minute with leading zero\n 19. {second}: Second\n 20. {second-pretty}: Second with leading zero\n 21. {offset-from-utc}: Offset from UTC in the ISO 8601 format\n 22. {timezone-name}: Locale-dependent timezone name or abbreviation\n 23. {day-pretty}: Day in month with leading zero",
|
||||
"type": "string"
|
||||
},
|
||||
"deFormat": {
|
||||
"description": "Output format of the module `DE`. See `-h format` for formatting syntax\n 1. {process-name}: DE process name\n 2. {pretty-name}: DE pretty name\n 3. {version}: DE version",
|
||||
"description": "Output format of the module `DE`. See Wiki for formatting syntax\n 1. {process-name}: DE process name\n 2. {pretty-name}: DE pretty name\n 3. {version}: DE version",
|
||||
"type": "string"
|
||||
},
|
||||
"displayFormat": {
|
||||
"description": "Output format of the module `Display`. See `-h format` for formatting syntax\n 1. {width}: Screen configured width (in pixels)\n 2. {height}: Screen configured height (in pixels)\n 3. {refresh-rate}: Screen configured refresh rate (in Hz)\n 4. {scaled-width}: Screen scaled width (in pixels)\n 5. {scaled-height}: Screen scaled height (in pixels)\n 6. {name}: Screen name\n 7. {type}: Screen type (Built-in or External)\n 8. {rotation}: Screen rotation (in degrees)\n 9. {is-primary}: True if being the primary screen\n 10. {physical-width}: Screen physical width (in millimeters)\n 11. {physical-height}: Screen physical height (in millimeters)\n 12. {inch}: Physical diagonal length in inches\n 13. {ppi}: Pixels per inch (PPI)\n 14. {bit-depth}: Bits per color channel\n 15. {hdr-enabled}: True if high dynamic range (HDR) mode is enabled\n 16. {manufacture-year}: Year of manufacturing\n 17. {manufacture-week}: Nth week of manufacturing in the year\n 18. {serial}: Serial number\n 19. {platform-api}: The platform API used when detecting the display\n 20. {hdr-compatible}: True if the display is HDR compatible\n 21. {scale-factor}: HiDPI scale factor\n 22. {preferred-width}: Screen preferred width (in pixels)\n 23. {preferred-height}: Screen preferred height (in pixels)\n 24. {preferred-refresh-rate}: Screen preferred refresh rate (in Hz)",
|
||||
"description": "Output format of the module `Display`. See Wiki for formatting syntax\n 1. {width}: Screen configured width (in pixels)\n 2. {height}: Screen configured height (in pixels)\n 3. {refresh-rate}: Screen configured refresh rate (in Hz)\n 4. {scaled-width}: Screen scaled width (in pixels)\n 5. {scaled-height}: Screen scaled height (in pixels)\n 6. {name}: Screen name\n 7. {type}: Screen type (Built-in or External)\n 8. {rotation}: Screen rotation (in degrees)\n 9. {is-primary}: True if being the primary screen\n 10. {physical-width}: Screen physical width (in millimeters)\n 11. {physical-height}: Screen physical height (in millimeters)\n 12. {inch}: Physical diagonal length in inches\n 13. {ppi}: Pixels per inch (PPI)\n 14. {bit-depth}: Bits per color channel\n 15. {hdr-enabled}: True if high dynamic range (HDR) mode is enabled\n 16. {manufacture-year}: Year of manufacturing\n 17. {manufacture-week}: Nth week of manufacturing in the year\n 18. {serial}: Serial number\n 19. {platform-api}: The platform API used when detecting the display\n 20. {hdr-compatible}: True if the display is HDR compatible\n 21. {scale-factor}: HiDPI scale factor\n 22. {preferred-width}: Screen preferred width (in pixels)\n 23. {preferred-height}: Screen preferred height (in pixels)\n 24. {preferred-refresh-rate}: Screen preferred refresh rate (in Hz)",
|
||||
"type": "string"
|
||||
},
|
||||
"diskFormat": {
|
||||
"description": "Output format of the module `Disk`. See `-h format` for formatting syntax\n 1. {size-used}: Size used\n 2. {size-total}: Size total\n 3. {size-percentage}: Size percentage num\n 4. {files-used}: Files used\n 5. {files-total}: Files total\n 6. {files-percentage}: Files percentage num\n 7. {is-external}: True if external volume\n 8. {is-hidden}: True if hidden volume\n 9. {filesystem}: Filesystem\n 10. {name}: Label / name\n 11. {is-readonly}: True if read-only\n 12. {create-time}: Create time in local timezone\n 13. {size-percentage-bar}: Size percentage bar\n 14. {files-percentage-bar}: Files percentage bar\n 15. {days}: Days after creation\n 16. {hours}: Hours after creation\n 17. {minutes}: Minutes after creation\n 18. {seconds}: Seconds after creation\n 19. {milliseconds}: Milliseconds after creation\n 20. {mountpoint}: Mount point / drive letter\n 21. {mount-from}: Mount from (device path)",
|
||||
"description": "Output format of the module `Disk`. See Wiki for formatting syntax\n 1. {size-used}: Size used\n 2. {size-total}: Size total\n 3. {size-percentage}: Size percentage num\n 4. {files-used}: Files used\n 5. {files-total}: Files total\n 6. {files-percentage}: Files percentage num\n 7. {is-external}: True if external volume\n 8. {is-hidden}: True if hidden volume\n 9. {filesystem}: Filesystem\n 10. {name}: Label / name\n 11. {is-readonly}: True if read-only\n 12. {create-time}: Create time in local timezone\n 13. {size-percentage-bar}: Size percentage bar\n 14. {files-percentage-bar}: Files percentage bar\n 15. {days}: Days after creation\n 16. {hours}: Hours after creation\n 17. {minutes}: Minutes after creation\n 18. {seconds}: Seconds after creation\n 19. {milliseconds}: Milliseconds after creation\n 20. {mountpoint}: Mount point / drive letter\n 21. {mount-from}: Mount from (device path)",
|
||||
"type": "string"
|
||||
},
|
||||
"diskioFormat": {
|
||||
"description": "Output format of the module `DiskIO`. See `-h format` for formatting syntax\n 1. {size-read}: Size of data read [per second] (formatted)\n 2. {size-written}: Size of data written [per second] (formatted)\n 3. {name}: Device name\n 4. {dev-path}: Device raw file path\n 5. {bytes-read}: Size of data read [per second] (in bytes)\n 6. {bytes-written}: Size of data written [per second] (in bytes)\n 7. {read-count}: Number of reads\n 8. {write-count}: Number of writes",
|
||||
"description": "Output format of the module `DiskIO`. See Wiki for formatting syntax\n 1. {size-read}: Size of data read [per second] (formatted)\n 2. {size-written}: Size of data written [per second] (formatted)\n 3. {name}: Device name\n 4. {dev-path}: Device raw file path\n 5. {bytes-read}: Size of data read [per second] (in bytes)\n 6. {bytes-written}: Size of data written [per second] (in bytes)\n 7. {read-count}: Number of reads\n 8. {write-count}: Number of writes",
|
||||
"type": "string"
|
||||
},
|
||||
"dnsFormat": {
|
||||
"description": "Output format of the module `DNS`. See `-h format` for formatting syntax\n 1. {result}: DNS result",
|
||||
"description": "Output format of the module `DNS`. See Wiki for formatting syntax\n 1. {result}: DNS result",
|
||||
"type": "string"
|
||||
},
|
||||
"editorFormat": {
|
||||
"description": "Output format of the module `Editor`. See `-h format` for formatting syntax\n 1. {type}: Type (Visual / Editor)\n 2. {name}: Name\n 3. {exe-name}: Exe name of real path\n 4. {full-path}: Full path of real path\n 5. {version}: Version",
|
||||
"description": "Output format of the module `Editor`. See Wiki for formatting syntax\n 1. {type}: Type (Visual / Editor)\n 2. {name}: Name\n 3. {exe-name}: Exe name of real path\n 4. {full-path}: Full path of real path\n 5. {version}: Version",
|
||||
"type": "string"
|
||||
},
|
||||
"fontFormat": {
|
||||
"description": "Output format of the module `Font`. See `-h format` for formatting syntax\n 1. {font1}: Font 1\n 2. {font2}: Font 2\n 3. {font3}: Font 3\n 4. {font4}: Font 4\n 5. {combined}: Combined fonts for display",
|
||||
"description": "Output format of the module `Font`. See Wiki for formatting syntax\n 1. {font1}: Font 1\n 2. {font2}: Font 2\n 3. {font3}: Font 3\n 4. {font4}: Font 4\n 5. {combined}: Combined fonts for display",
|
||||
"type": "string"
|
||||
},
|
||||
"gamepadFormat": {
|
||||
"description": "Output format of the module `Gamepad`. See `-h format` for formatting syntax\n 1. {name}: Name\n 2. {serial}: Serial number\n 3. {battery-percentage}: Battery percentage num\n 4. {battery-percentage-bar}: Battery percentage bar",
|
||||
"description": "Output format of the module `Gamepad`. See Wiki for formatting syntax\n 1. {name}: Name\n 2. {serial}: Serial number\n 3. {battery-percentage}: Battery percentage num\n 4. {battery-percentage-bar}: Battery percentage bar",
|
||||
"type": "string"
|
||||
},
|
||||
"gpuFormat": {
|
||||
"description": "Output format of the module `GPU`. See `-h format` for formatting syntax\n 1. {vendor}: GPU vendor\n 2. {name}: GPU name\n 3. {driver}: GPU driver\n 4. {temperature}: GPU temperature\n 5. {core-count}: GPU core count\n 6. {type}: GPU type\n 7. {dedicated-total}: GPU total dedicated memory\n 8. {dedicated-used}: GPU used dedicated memory\n 9. {shared-total}: GPU total shared memory\n 10. {shared-used}: GPU used shared memory\n 11. {platform-api}: The platform API used when detecting the GPU\n 12. {frequency}: Current frequency in GHz\n 13. {index}: GPU vendor specific index\n 14. {dedicated-percentage-num}: Dedicated memory usage percentage num\n 15. {dedicated-percentage-bar}: Dedicated memory usage percentage bar\n 16. {shared-percentage-num}: Shared memory usage percentage num\n 17. {shared-percentage-bar}: Shared memory usage percentage bar\n 18. {core-usage-num}: Core usage percentage num (supports Nvidia & Apple GPU only)\n 19. {core-usage-bar}: Core usage percentage bar (supports Nvidia & Apple GPU only)",
|
||||
"description": "Output format of the module `GPU`. See Wiki for formatting syntax\n 1. {vendor}: GPU vendor\n 2. {name}: GPU name\n 3. {driver}: GPU driver\n 4. {temperature}: GPU temperature\n 5. {core-count}: GPU core count\n 6. {type}: GPU type\n 7. {dedicated-total}: GPU total dedicated memory\n 8. {dedicated-used}: GPU used dedicated memory\n 9. {shared-total}: GPU total shared memory\n 10. {shared-used}: GPU used shared memory\n 11. {platform-api}: The platform API used when detecting the GPU\n 12. {frequency}: Current frequency in GHz\n 13. {index}: GPU vendor specific index\n 14. {dedicated-percentage-num}: Dedicated memory usage percentage num\n 15. {dedicated-percentage-bar}: Dedicated memory usage percentage bar\n 16. {shared-percentage-num}: Shared memory usage percentage num\n 17. {shared-percentage-bar}: Shared memory usage percentage bar\n 18. {core-usage-num}: Core usage percentage num\n 19. {core-usage-bar}: Core usage percentage bar\n 20. {memory-type}: Memory type (Windows only)",
|
||||
"type": "string"
|
||||
},
|
||||
"hostFormat": {
|
||||
"description": "Output format of the module `Host`. See `-h format` for formatting syntax\n 1. {family}: Product family\n 2. {name}: Product name\n 3. {version}: Product version\n 4. {sku}: Product sku\n 5. {vendor}: Product vendor\n 6. {serial}: Product serial number\n 7. {uuid}: Product uuid",
|
||||
"description": "Output format of the module `Host`. See Wiki for formatting syntax\n 1. {family}: Product family\n 2. {name}: Product name\n 3. {version}: Product version\n 4. {sku}: Product sku\n 5. {vendor}: Product vendor\n 6. {serial}: Product serial number\n 7. {uuid}: Product uuid",
|
||||
"type": "string"
|
||||
},
|
||||
"iconsFormat": {
|
||||
"description": "Output format of the module `Icons`. See `-h format` for formatting syntax\n 1. {icons1}: Icons part 1\n 2. {icons2}: Icons part 2",
|
||||
"description": "Output format of the module `Icons`. See Wiki for formatting syntax\n 1. {icons1}: Icons part 1\n 2. {icons2}: Icons part 2",
|
||||
"type": "string"
|
||||
},
|
||||
"initsystemFormat": {
|
||||
"description": "Output format of the module `InitSystem`. See `-h format` for formatting syntax\n 1. {name}: Init system name\n 2. {exe}: Init system exe path\n 3. {version}: Init system version path\n 4. {pid}: Init system pid",
|
||||
"description": "Output format of the module `InitSystem`. See Wiki for formatting syntax\n 1. {name}: Init system name\n 2. {exe}: Init system exe path\n 3. {version}: Init system version path\n 4. {pid}: Init system pid",
|
||||
"type": "string"
|
||||
},
|
||||
"kernelFormat": {
|
||||
"description": "Output format of the module `Kernel`. See `-h format` for formatting syntax\n 1. {sysname}: Sysname\n 2. {release}: Release\n 3. {version}: Version\n 4. {arch}: Architecture\n 5. {display-version}: Display version\n 6. {page-size}: Page size",
|
||||
"description": "Output format of the module `Kernel`. See Wiki for formatting syntax\n 1. {sysname}: Sysname\n 2. {release}: Release\n 3. {version}: Version\n 4. {arch}: Architecture\n 5. {display-version}: Display version\n 6. {page-size}: Page size",
|
||||
"type": "string"
|
||||
},
|
||||
"keyboardFormat": {
|
||||
"description": "Output format of the module `Keyboard`. See `-h format` for formatting syntax\n 1. {name}: Name\n 2. {serial}: Serial number",
|
||||
"description": "Output format of the module `Keyboard`. See Wiki for formatting syntax\n 1. {name}: Name\n 2. {serial}: Serial number",
|
||||
"type": "string"
|
||||
},
|
||||
"lmFormat": {
|
||||
"description": "Output format of the module `LM`. See `-h format` for formatting syntax\n 1. {service}: LM service\n 2. {type}: LM type\n 3. {version}: LM version",
|
||||
"description": "Output format of the module `LM`. See Wiki for formatting syntax\n 1. {service}: LM service\n 2. {type}: LM type\n 3. {version}: LM version",
|
||||
"type": "string"
|
||||
},
|
||||
"loadavgFormat": {
|
||||
"description": "Output format of the module `Loadavg`. See `-h format` for formatting syntax\n 1. {loadavg1}: Load average over 1min\n 2. {loadavg2}: Load average over 5min\n 3. {loadavg3}: Load average over 15min",
|
||||
"description": "Output format of the module `Loadavg`. See Wiki for formatting syntax\n 1. {loadavg1}: Load average over 1min\n 2. {loadavg2}: Load average over 5min\n 3. {loadavg3}: Load average over 15min",
|
||||
"type": "string"
|
||||
},
|
||||
"localeFormat": {
|
||||
"description": "Output format of the module `Locale`. See `-h format` for formatting syntax\n 1. {result}: Locale code",
|
||||
"description": "Output format of the module `Locale`. See Wiki for formatting syntax\n 1. {result}: Locale code",
|
||||
"type": "string"
|
||||
},
|
||||
"localipFormat": {
|
||||
"description": "Output format of the module `LocalIp`. See `-h format` for formatting syntax\n 1. {ipv4}: IPv4 address\n 2. {ipv6}: IPv6 address\n 3. {mac}: MAC address\n 4. {ifname}: Interface name\n 5. {is-default-route}: Is default route\n 6. {mtu}: MTU size in bytes\n 7. {speed}: Link speed (formatted)\n 8. {flags}: Interface flags",
|
||||
"description": "Output format of the module `LocalIp`. See Wiki for formatting syntax\n 1. {ipv4}: IPv4 address\n 2. {ipv6}: IPv6 address\n 3. {mac}: MAC address\n 4. {ifname}: Interface name\n 5. {is-default-route}: Is default route\n 6. {mtu}: MTU size in bytes\n 7. {speed}: Link speed (formatted)\n 8. {flags}: Interface flags",
|
||||
"type": "string"
|
||||
},
|
||||
"mediaFormat": {
|
||||
"description": "Output format of the module `Media`. See `-h format` for formatting syntax\n 1. {combined}: Pretty media name\n 2. {title}: Media name\n 3. {artist}: Artist name\n 4. {album}: Album name\n 5. {status}: Status",
|
||||
"description": "Output format of the module `Media`. See Wiki for formatting syntax\n 1. {combined}: Pretty media name\n 2. {title}: Media name\n 3. {artist}: Artist name\n 4. {album}: Album name\n 5. {status}: Status",
|
||||
"type": "string"
|
||||
},
|
||||
"memoryFormat": {
|
||||
"description": "Output format of the module `Memory`. See `-h format` for formatting syntax\n 1. {used}: Used size\n 2. {total}: Total size\n 3. {percentage}: Percentage used (num)\n 4. {percentage-bar}: Percentage used (bar)",
|
||||
"description": "Output format of the module `Memory`. See Wiki for formatting syntax\n 1. {used}: Used size\n 2. {total}: Total size\n 3. {percentage}: Percentage used (num)\n 4. {percentage-bar}: Percentage used (bar)",
|
||||
"type": "string"
|
||||
},
|
||||
"monitorFormat": {
|
||||
"description": "Output format of the module `Monitor`. See `-h format` for formatting syntax\n 1. {name}: Display name\n 2. {width}: Native resolution width in pixels\n 3. {height}: Native resolution height in pixels\n 4. {physical-width}: Physical width in millimeters\n 5. {physical-height}: Physical height in millimeters\n 6. {inch}: Physical diagonal length in inches\n 7. {ppi}: Pixels per inch (PPI)\n 8. {manufacture-year}: Year of manufacturing\n 9. {manufacture-week}: Nth week of manufacturing in the year\n 10. {serial}: Serial number\n 11. {refresh-rate}: Maximum refresh rate in Hz\n 12. {hdr-compatible}: True if the display is HDR compatible",
|
||||
"description": "Output format of the module `Monitor`. See Wiki for formatting syntax\n 1. {name}: Display name\n 2. {width}: Native resolution width in pixels\n 3. {height}: Native resolution height in pixels\n 4. {physical-width}: Physical width in millimeters\n 5. {physical-height}: Physical height in millimeters\n 6. {inch}: Physical diagonal length in inches\n 7. {ppi}: Pixels per inch (PPI)\n 8. {manufacture-year}: Year of manufacturing\n 9. {manufacture-week}: Nth week of manufacturing in the year\n 10. {serial}: Serial number\n 11. {refresh-rate}: Maximum refresh rate in Hz\n 12. {hdr-compatible}: True if the display is HDR compatible",
|
||||
"type": "string"
|
||||
},
|
||||
"mouseFormat": {
|
||||
"description": "Output format of the module `Mouse`. See `-h format` for formatting syntax\n 1. {name}: Mouse name\n 2. {serial}: Mouse serial number",
|
||||
"description": "Output format of the module `Mouse`. See Wiki for formatting syntax\n 1. {name}: Mouse name\n 2. {serial}: Mouse serial number",
|
||||
"type": "string"
|
||||
},
|
||||
"netioFormat": {
|
||||
"description": "Output format of the module `NetIO`. See `-h format` for formatting syntax\n 1. {rx-size}: Size of data received [per second] (formatted)\n 2. {tx-size}: Size of data sent [per second] (formatted)\n 3. {ifname}: Interface name\n 4. {is-default-route}: Is default route\n 5. {rx-bytes}: Size of data received [per second] (in bytes)\n 6. {tx-bytes}: Size of data sent [per second] (in bytes)\n 7. {rx-packets}: Number of packets received [per second]\n 8. {tx-packets}: Number of packets sent [per second]\n 9. {rx-errors}: Number of errors received [per second]\n 10. {tx-errors}: Number of errors sent [per second]\n 11. {rx-drops}: Number of packets dropped when receiving [per second]\n 12. {tx-drops}: Number of packets dropped when sending [per second]",
|
||||
"description": "Output format of the module `NetIO`. See Wiki for formatting syntax\n 1. {rx-size}: Size of data received [per second] (formatted)\n 2. {tx-size}: Size of data sent [per second] (formatted)\n 3. {ifname}: Interface name\n 4. {is-default-route}: Is default route\n 5. {rx-bytes}: Size of data received [per second] (in bytes)\n 6. {tx-bytes}: Size of data sent [per second] (in bytes)\n 7. {rx-packets}: Number of packets received [per second]\n 8. {tx-packets}: Number of packets sent [per second]\n 9. {rx-errors}: Number of errors received [per second]\n 10. {tx-errors}: Number of errors sent [per second]\n 11. {rx-drops}: Number of packets dropped when receiving [per second]\n 12. {tx-drops}: Number of packets dropped when sending [per second]",
|
||||
"type": "string"
|
||||
},
|
||||
"openclFormat": {
|
||||
"description": "Output format of the module `OpenCL`. See `-h format` for formatting syntax\n 1. {version}: Platform version\n 2. {name}: Platform name\n 3. {vendor}: Platform vendor",
|
||||
"description": "Output format of the module `OpenCL`. See Wiki for formatting syntax\n 1. {version}: Platform version\n 2. {name}: Platform name\n 3. {vendor}: Platform vendor",
|
||||
"type": "string"
|
||||
},
|
||||
"openglFormat": {
|
||||
"description": "Output format of the module `OpenGL`. See `-h format` for formatting syntax\n 1. {version}: OpenGL version\n 2. {renderer}: OpenGL renderer\n 3. {vendor}: OpenGL vendor\n 4. {slv}: OpenGL shading language version\n 5. {library}: OpenGL library used",
|
||||
"description": "Output format of the module `OpenGL`. See Wiki for formatting syntax\n 1. {version}: OpenGL version\n 2. {renderer}: OpenGL renderer\n 3. {vendor}: OpenGL vendor\n 4. {slv}: OpenGL shading language version\n 5. {library}: OpenGL library used",
|
||||
"type": "string"
|
||||
},
|
||||
"osFormat": {
|
||||
"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",
|
||||
"description": "Output format of the module `OS`. See Wiki 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",
|
||||
"type": "string"
|
||||
},
|
||||
"packagesFormat": {
|
||||
"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. {pkgsrc}: Number of pkgsrc packages\n 39. {hpkg-system}: Number of hpkg-system packages\n 40. {hpkg-user}: Number of hpkg-user packages\n 41. {pisi}: Number of pisi packages\n 42. {nix-all}: Total number of all nix packages\n 43. {flatpak-all}: Total number of all flatpak app packages\n 44. {brew-all}: Total number of all brew packages\n 45. {guix-all}: Total number of all guix packages\n 46. {hpkg-all}: Total number of all hpkg packages",
|
||||
"description": "Output format of the module `Packages`. See Wiki 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. {pkgsrc}: Number of pkgsrc packages\n 39. {hpkg-system}: Number of hpkg-system packages\n 40. {hpkg-user}: Number of hpkg-user packages\n 41. {pisi}: Number of pisi packages\n 42. {soar}: Number of soar packages\n 43. {nix-all}: Total number of all nix packages\n 44. {flatpak-all}: Total number of all flatpak app packages\n 45. {brew-all}: Total number of all brew packages\n 46. {guix-all}: Total number of all guix packages\n 47. {hpkg-all}: Total number of all hpkg packages",
|
||||
"type": "string"
|
||||
},
|
||||
"physicaldiskFormat": {
|
||||
"description": "Output format of the module `PhysicalDisk`. See `-h format` for formatting syntax\n 1. {size}: Device size (formatted)\n 2. {name}: Device name\n 3. {interconnect}: Device interconnect type\n 4. {dev-path}: Device raw file path\n 5. {serial}: Serial number\n 6. {physical-type}: Device kind (SSD or HDD)\n 7. {removable-type}: Device kind (Removable or Fixed)\n 8. {readonly-type}: Device kind (Read-only or Read-write)\n 9. {revision}: Product revision\n 10. {temperature}: Device temperature (formatted)",
|
||||
"description": "Output format of the module `PhysicalDisk`. See Wiki for formatting syntax\n 1. {size}: Device size (formatted)\n 2. {name}: Device name\n 3. {interconnect}: Device interconnect type\n 4. {dev-path}: Device raw file path\n 5. {serial}: Serial number\n 6. {physical-type}: Device kind (SSD or HDD)\n 7. {removable-type}: Device kind (Removable or Fixed)\n 8. {readonly-type}: Device kind (Read-only or Read-write)\n 9. {revision}: Product revision\n 10. {temperature}: Device temperature (formatted)",
|
||||
"type": "string"
|
||||
},
|
||||
"physicalmemoryFormat": {
|
||||
"description": "Output format of the module `PhysicalMemory`. See `-h format` for formatting syntax\n 1. {bytes}: Size (in bytes)\n 2. {size}: Size formatted\n 3. {max-speed}: Max speed (in MT/s)\n 4. {running-speed}: Running speed (in MT/s)\n 5. {type}: Type (DDR4, DDR5, etc.)\n 6. {form-factor}: Form factor (SODIMM, DIMM, etc.)\n 7. {locator}: Bank/Device Locator (BANK0/SIMM0, BANK0/SIMM1, etc.)\n 8. {vendor}: Vendor\n 9. {serial}: Serial number\n 10. {part-number}: Part number\n 11. {is-ecc-enabled}: True if ECC enabled",
|
||||
"description": "Output format of the module `PhysicalMemory`. See Wiki for formatting syntax\n 1. {bytes}: Size (in bytes)\n 2. {size}: Size formatted\n 3. {max-speed}: Max speed (in MT/s)\n 4. {running-speed}: Running speed (in MT/s)\n 5. {type}: Type (DDR4, DDR5, etc.)\n 6. {form-factor}: Form factor (SODIMM, DIMM, etc.)\n 7. {locator}: Bank/Device Locator (BANK0/SIMM0, BANK0/SIMM1, etc.)\n 8. {vendor}: Vendor\n 9. {serial}: Serial number\n 10. {part-number}: Part number\n 11. {is-ecc-enabled}: True if ECC enabled",
|
||||
"type": "string"
|
||||
},
|
||||
"playerFormat": {
|
||||
"description": "Output format of the module `Player`. See `-h format` for formatting syntax\n 1. {player}: Pretty player name\n 2. {name}: Player name\n 3. {id}: Player Identifier\n 4. {url}: URL name",
|
||||
"description": "Output format of the module `Player`. See Wiki for formatting syntax\n 1. {player}: Pretty player name\n 2. {name}: Player name\n 3. {id}: Player Identifier\n 4. {url}: URL name",
|
||||
"type": "string"
|
||||
},
|
||||
"poweradapterFormat": {
|
||||
"description": "Output format of the module `PowerAdapter`. See `-h format` for formatting syntax\n 1. {watts}: Power adapter watts\n 2. {name}: Power adapter name\n 3. {manufacturer}: Power adapter manufacturer\n 4. {model}: Power adapter model\n 5. {description}: Power adapter description\n 6. {serial}: Power adapter serial number",
|
||||
"description": "Output format of the module `PowerAdapter`. See Wiki for formatting syntax\n 1. {watts}: Power adapter watts\n 2. {name}: Power adapter name\n 3. {manufacturer}: Power adapter manufacturer\n 4. {model}: Power adapter model\n 5. {description}: Power adapter description\n 6. {serial}: Power adapter serial number",
|
||||
"type": "string"
|
||||
},
|
||||
"processesFormat": {
|
||||
"description": "Output format of the module `Processes`. See `-h format` for formatting syntax\n 1. {result}: Process count",
|
||||
"description": "Output format of the module `Processes`. See Wiki for formatting syntax\n 1. {result}: Process count",
|
||||
"type": "string"
|
||||
},
|
||||
"publicipFormat": {
|
||||
"description": "Output format of the module `PublicIp`. See `-h format` for formatting syntax\n 1. {ip}: Public IP address\n 2. {location}: Location",
|
||||
"description": "Output format of the module `PublicIp`. See Wiki for formatting syntax\n 1. {ip}: Public IP address\n 2. {location}: Location",
|
||||
"type": "string"
|
||||
},
|
||||
"separatorFormat": {
|
||||
"description": "Output format of the module `Separator`. See `-h format` for formatting syntax\n 1. {string}: Separator string\n 2. {outputColor}: Output color\n 3. {length}: Length",
|
||||
"description": "Output format of the module `Separator`. See Wiki for formatting syntax\n 1. {string}: Separator string\n 2. {outputColor}: Output color\n 3. {length}: Length",
|
||||
"type": "string"
|
||||
},
|
||||
"shellFormat": {
|
||||
"description": "Output format of the module `Shell`. See `-h format` for formatting syntax\n 1. {process-name}: Shell process name\n 2. {exe}: The first argument of the command line when running the shell\n 3. {exe-name}: Shell base name of arg0\n 4. {version}: Shell version\n 5. {pid}: Shell pid\n 6. {pretty-name}: Shell pretty name\n 7. {exe-path}: Shell full exe path\n 8. {tty}: Shell tty used",
|
||||
"description": "Output format of the module `Shell`. See Wiki for formatting syntax\n 1. {process-name}: Shell process name\n 2. {exe}: The first argument of the command line when running the shell\n 3. {exe-name}: Shell base name of arg0\n 4. {version}: Shell version\n 5. {pid}: Shell pid\n 6. {pretty-name}: Shell pretty name\n 7. {exe-path}: Shell full exe path\n 8. {tty}: Shell tty used",
|
||||
"type": "string"
|
||||
},
|
||||
"soundFormat": {
|
||||
"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",
|
||||
"description": "Output format of the module `Sound`. See Wiki 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",
|
||||
"type": "string"
|
||||
},
|
||||
"swapFormat": {
|
||||
"description": "Output format of the module `Swap`. See `-h format` for formatting syntax\n 1. {used}: Used size\n 2. {total}: Total size\n 3. {percentage}: Percentage used (num)\n 4. {percentage-bar}: Percentage used (bar)",
|
||||
"description": "Output format of the module `Swap`. See Wiki for formatting syntax\n 1. {used}: Used size\n 2. {total}: Total size\n 3. {percentage}: Percentage used (num)\n 4. {percentage-bar}: Percentage used (bar)",
|
||||
"type": "string"
|
||||
},
|
||||
"terminalFormat": {
|
||||
"description": "Output format of the module `Terminal`. See `-h format` for formatting syntax\n 1. {process-name}: Terminal process name\n 2. {exe}: The first argument of the command line when running the terminal\n 3. {exe-name}: Terminal base name of arg0\n 4. {pid}: Terminal pid\n 5. {pretty-name}: Terminal pretty name\n 6. {version}: Terminal version\n 7. {exe-path}: Terminal full exe path\n 8. {tty}: Terminal tty / pts used",
|
||||
"description": "Output format of the module `Terminal`. See Wiki for formatting syntax\n 1. {process-name}: Terminal process name\n 2. {exe}: The first argument of the command line when running the terminal\n 3. {exe-name}: Terminal base name of arg0\n 4. {pid}: Terminal pid\n 5. {pretty-name}: Terminal pretty name\n 6. {version}: Terminal version\n 7. {exe-path}: Terminal full exe path\n 8. {tty}: Terminal tty / pts used",
|
||||
"type": "string"
|
||||
},
|
||||
"terminalfontFormat": {
|
||||
"description": "Output format of the module `TerminalFont`. See `-h format` for formatting syntax\n 1. {combined}: Terminal font combined\n 2. {name}: Terminal font name\n 3. {size}: Terminal font size\n 4. {styles}: Terminal font styles",
|
||||
"description": "Output format of the module `TerminalFont`. See Wiki for formatting syntax\n 1. {combined}: Terminal font combined\n 2. {name}: Terminal font name\n 3. {size}: Terminal font size\n 4. {styles}: Terminal font styles",
|
||||
"type": "string"
|
||||
},
|
||||
"terminalsizeFormat": {
|
||||
"description": "Output format of the module `TerminalSize`. See `-h format` for formatting syntax\n 1. {rows}: Terminal rows\n 2. {columns}: Terminal columns\n 3. {width}: Terminal width (in pixels)\n 4. {height}: Terminal height (in pixels)",
|
||||
"description": "Output format of the module `TerminalSize`. See Wiki for formatting syntax\n 1. {rows}: Terminal rows\n 2. {columns}: Terminal columns\n 3. {width}: Terminal width (in pixels)\n 4. {height}: Terminal height (in pixels)",
|
||||
"type": "string"
|
||||
},
|
||||
"terminalthemeFormat": {
|
||||
"description": "Output format of the module `TerminalTheme`. See `-h format` for formatting syntax\n 1. {fg-color}: Terminal foreground color\n 2. {fg-type}: Terminal foreground type (Dark / Light)\n 3. {bg-color}: Terminal background color\n 4. {bg-type}: Terminal background type (Dark / Light)",
|
||||
"description": "Output format of the module `TerminalTheme`. See Wiki for formatting syntax\n 1. {fg-color}: Terminal foreground color\n 2. {fg-type}: Terminal foreground type (Dark / Light)\n 3. {bg-color}: Terminal background color\n 4. {bg-type}: Terminal background type (Dark / Light)",
|
||||
"type": "string"
|
||||
},
|
||||
"titleFormat": {
|
||||
"description": "Output format of the module `Title`. See `-h format` 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)",
|
||||
"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)",
|
||||
"type": "string"
|
||||
},
|
||||
"themeFormat": {
|
||||
"description": "Output format of the module `Theme`. See `-h format` for formatting syntax\n 1. {theme1}: Theme part 1\n 2. {theme2}: Theme part 2",
|
||||
"description": "Output format of the module `Theme`. See Wiki for formatting syntax\n 1. {theme1}: Theme part 1\n 2. {theme2}: Theme part 2",
|
||||
"type": "string"
|
||||
},
|
||||
"tpmFormat": {
|
||||
"description": "Output format of the module `TPM`. See `-h format` for formatting syntax\n 1. {version}: TPM device version\n 2. {description}: TPM general description",
|
||||
"description": "Output format of the module `TPM`. See Wiki for formatting syntax\n 1. {version}: TPM device version\n 2. {description}: TPM general description",
|
||||
"type": "string"
|
||||
},
|
||||
"uptimeFormat": {
|
||||
"description": "Output format of the module `Uptime`. See `-h format` for formatting syntax\n 1. {days}: Days\n 2. {hours}: Hours\n 3. {minutes}: Minutes\n 4. {seconds}: Seconds\n 5. {milliseconds}: Milliseconds\n 6. {boot-time}: Boot time in local timezone",
|
||||
"description": "Output format of the module `Uptime`. See Wiki for formatting syntax\n 1. {days}: Days\n 2. {hours}: Hours\n 3. {minutes}: Minutes\n 4. {seconds}: Seconds\n 5. {milliseconds}: Milliseconds\n 6. {boot-time}: Boot time in local timezone",
|
||||
"type": "string"
|
||||
},
|
||||
"usersFormat": {
|
||||
"description": "Output format of the module `Users`. See `-h format` for formatting syntax\n 1. {name}: User name\n 2. {host-name}: Host name\n 3. {session}: Session name\n 4. {client-ip}: Client IP\n 5. {login-time}: Login Time in local timezone\n 6. {days}: Days after login\n 7. {hours}: Hours after login\n 8. {minutes}: Minutes after login\n 9. {seconds}: Seconds after login\n 10. {milliseconds}: Milliseconds after login",
|
||||
"description": "Output format of the module `Users`. See Wiki for formatting syntax\n 1. {name}: User name\n 2. {host-name}: Host name\n 3. {session}: Session name\n 4. {client-ip}: Client IP\n 5. {login-time}: Login Time in local timezone\n 6. {days}: Days after login\n 7. {hours}: Hours after login\n 8. {minutes}: Minutes after login\n 9. {seconds}: Seconds after login\n 10. {milliseconds}: Milliseconds after login",
|
||||
"type": "string"
|
||||
},
|
||||
"versionFormat": {
|
||||
"description": "Output format of the module `Version`. See `-h format` for formatting syntax\n 1. {name}: Project name\n 2. {version}: Version\n 3. {version-tweak}: Version tweak\n 4. {build-type}: Build type (debug or release)\n 5. {sysname}: System name\n 6. {arch}: Architecture\n 7. {cmake-built-type}: CMake build type when compiling (Debug, Release, RelWithDebInfo, MinSizeRel)\n 8. {compile-time}: Date time when compiling\n 9. {compiler}: Compiler used when compiling\n 10. {libc}: Libc used when compiling",
|
||||
"description": "Output format of the module `Version`. See Wiki for formatting syntax\n 1. {name}: Project name\n 2. {version}: Version\n 3. {version-tweak}: Version tweak\n 4. {build-type}: Build type (debug or release)\n 5. {sysname}: System name\n 6. {arch}: Architecture\n 7. {cmake-built-type}: CMake build type when compiling (Debug, Release, RelWithDebInfo, MinSizeRel)\n 8. {compile-time}: Date time when compiling\n 9. {compiler}: Compiler used when compiling\n 10. {libc}: Libc used when compiling",
|
||||
"type": "string"
|
||||
},
|
||||
"vulkanFormat": {
|
||||
"description": "Output format of the module `Vulkan`. See `-h format` for formatting syntax\n 1. {driver}: Driver name\n 2. {api-version}: API version\n 3. {conformance-version}: Conformance version\n 4. {instance-version}: Instance version",
|
||||
"description": "Output format of the module `Vulkan`. See Wiki for formatting syntax\n 1. {driver}: Driver name\n 2. {api-version}: API version\n 3. {conformance-version}: Conformance version\n 4. {instance-version}: Instance version",
|
||||
"type": "string"
|
||||
},
|
||||
"wallpaperFormat": {
|
||||
"description": "Output format of the module `Wallpaper`. See `-h format` for formatting syntax\n 1. {file-name}: File name\n 2. {full-path}: Full path",
|
||||
"description": "Output format of the module `Wallpaper`. See Wiki for formatting syntax\n 1. {file-name}: File name\n 2. {full-path}: Full path",
|
||||
"type": "string"
|
||||
},
|
||||
"weatherFormat": {
|
||||
"description": "Output format of the module `Weather`. See `-h format` for formatting syntax\n 1. {result}: Weather result",
|
||||
"description": "Output format of the module `Weather`. See Wiki for formatting syntax\n 1. {result}: Weather result",
|
||||
"type": "string"
|
||||
},
|
||||
"wmFormat": {
|
||||
"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",
|
||||
"description": "Output format of the module `WM`. See Wiki 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",
|
||||
"type": "string"
|
||||
},
|
||||
"wifiFormat": {
|
||||
"description": "Output format of the module `Wifi`. See `-h format` for formatting syntax\n 1. {inf-desc}: Interface description\n 2. {inf-status}: Interface status\n 3. {status}: Connection status\n 4. {ssid}: Connection SSID\n 5. {bssid}: Connection BSSID\n 6. {protocol}: Connection protocol\n 7. {signal-quality}: Connection signal quality (percentage num)\n 8. {rx-rate}: Connection RX rate\n 9. {tx-rate}: Connection TX rate\n 10. {security}: Connection Security algorithm\n 11. {signal-quality-bar}: Connection signal quality (percentage bar)\n 12. {channel}: Connection channel number\n 13. {band}: Connection channel band in GHz",
|
||||
"description": "Output format of the module `Wifi`. See Wiki for formatting syntax\n 1. {inf-desc}: Interface description\n 2. {inf-status}: Interface status\n 3. {status}: Connection status\n 4. {ssid}: Connection SSID\n 5. {bssid}: Connection BSSID\n 6. {protocol}: Connection protocol\n 7. {signal-quality}: Connection signal quality (percentage num)\n 8. {rx-rate}: Connection RX rate\n 9. {tx-rate}: Connection TX rate\n 10. {security}: Connection Security algorithm\n 11. {signal-quality-bar}: Connection signal quality (percentage bar)\n 12. {channel}: Connection channel number\n 13. {band}: Connection channel band in GHz",
|
||||
"type": "string"
|
||||
},
|
||||
"wmthemeFormat": {
|
||||
"description": "Output format of the module `WMTheme`. See `-h format` for formatting syntax\n 1. {result}: WM theme",
|
||||
"description": "Output format of the module `WMTheme`. See Wiki for formatting syntax\n 1. {result}: WM theme",
|
||||
"type": "string"
|
||||
},
|
||||
"zpoolFormat": {
|
||||
"description": "Output format of the module `Zpool`. See `-h format` for formatting syntax\n 1. {name}: Zpool name\n 2. {state}: Zpool state\n 3. {used}: Size used\n 4. {total}: Size total\n 5. {used-percentage}: Size percentage num\n 6. {fragmentation-percentage}: Fragmentation percentage num\n 7. {used-percentage-bar}: Size percentage bar\n 8. {fragmentation-percentage-bar}: Fragmentation percentage bar",
|
||||
"description": "Output format of the module `Zpool`. See Wiki for formatting syntax\n 1. {name}: Zpool name\n 2. {state}: Zpool state\n 3. {used}: Size used\n 4. {total}: Size total\n 5. {used-percentage}: Size percentage num\n 6. {fragmentation-percentage}: Fragmentation percentage num\n 7. {used-percentage-bar}: Size percentage bar\n 8. {fragmentation-percentage-bar}: Fragmentation percentage bar",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"title": "JSON config",
|
||||
"description": "JSON config file for fastfetch. Usually be `~/.config/fastfetch.jsonc`",
|
||||
"description": "JSON config file for fastfetch. Usually located at `~/.config/fastfetch/config.jsonc`",
|
||||
"properties": {
|
||||
"$schema": {
|
||||
"type": "string",
|
||||
@@ -420,7 +420,7 @@
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"type": {
|
||||
"description": "Set the type of the logo given",
|
||||
"description": "Set the type of the logo",
|
||||
"enum": [
|
||||
"auto",
|
||||
"builtin",
|
||||
@@ -447,7 +447,7 @@
|
||||
"color": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Overwrite a color in the logo",
|
||||
"description": "Override colors in the logo",
|
||||
"properties": {
|
||||
"1": {
|
||||
"description": "Color 1",
|
||||
@@ -521,12 +521,12 @@
|
||||
},
|
||||
"printRemaining": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to print the remaining logo, if it has more lines than modules to display",
|
||||
"default": false
|
||||
"description": "Whether to print the remaining logo if it has more lines than modules to display",
|
||||
"default": true
|
||||
},
|
||||
"preserveAspectRatio": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to preserve the aspect ratio of the logo. Supported by iTerm image protocol",
|
||||
"description": "Whether to preserve the aspect ratio of the logo. Supported by iTerm image protocol only",
|
||||
"default": false
|
||||
},
|
||||
"recache": {
|
||||
@@ -536,7 +536,7 @@
|
||||
},
|
||||
"position": {
|
||||
"type": "string",
|
||||
"description": "Set the position of the logo should be displayed",
|
||||
"description": "Set the position where the logo should be displayed",
|
||||
"enum": [
|
||||
"left",
|
||||
"top",
|
||||
@@ -547,7 +547,7 @@
|
||||
"chafa": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Chafa configuration. See chafa document for details",
|
||||
"description": "Chafa configuration. See chafa documentation for details",
|
||||
"properties": {
|
||||
"fgOnly": {
|
||||
"type": "boolean",
|
||||
@@ -560,7 +560,7 @@
|
||||
},
|
||||
"canvasMode": {
|
||||
"type": "string",
|
||||
"description": "Determine how colors are used in the output. This value maps the value of enum ChafaCanvasMode.",
|
||||
"description": "Determine how colors are used in the output. This value maps to enum ChafaCanvasMode.",
|
||||
"enum": [
|
||||
"TRUECOLOR",
|
||||
"INDEXED_256",
|
||||
@@ -574,7 +574,7 @@
|
||||
},
|
||||
"colorSpace": {
|
||||
"type": "string",
|
||||
"description": "Set color space used for quantization. This value maps the value of enum ChafaColorSpace.",
|
||||
"description": "Set color space used for quantization. This value maps to enum ChafaColorSpace.",
|
||||
"enum": [
|
||||
"RGB",
|
||||
"DIN99D"
|
||||
@@ -582,7 +582,7 @@
|
||||
},
|
||||
"ditherMode": {
|
||||
"type": "string",
|
||||
"description": "Set output dither mode (No effect with 24-bit color). This value maps the value of enum ChafaDitherMode.",
|
||||
"description": "Set output dither mode (No effect with 24-bit color). This value maps to enum ChafaDitherMode.",
|
||||
"enum": [
|
||||
"NONE",
|
||||
"ORDERED",
|
||||
@@ -600,14 +600,9 @@
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"multithreading": {
|
||||
"type": "boolean",
|
||||
"description": "Use multiple threads to detect values",
|
||||
"default": true
|
||||
},
|
||||
"thread": {
|
||||
"type": "boolean",
|
||||
"description": "Alias of multithreading",
|
||||
"description": "Use separate threads for HTTP requests",
|
||||
"default": true
|
||||
},
|
||||
"escapeBedrock": {
|
||||
@@ -617,7 +612,7 @@
|
||||
},
|
||||
"playerName": {
|
||||
"type": "string",
|
||||
"description": "The name of the player to use for module Media and Player. Linux only"
|
||||
"description": "The name of the player to use for Media and Player modules. Linux only"
|
||||
},
|
||||
"dsForceDrm": {
|
||||
"description": "Force display detection to use DRM. Linux only",
|
||||
@@ -629,13 +624,13 @@
|
||||
},
|
||||
{
|
||||
"type": "string",
|
||||
"description": "Use `/sys/class/drm` only.",
|
||||
"description": "Use `/sys/class/drm` only",
|
||||
"const": "sysfs-only"
|
||||
},
|
||||
{
|
||||
"type": "boolean",
|
||||
"const": true,
|
||||
"description": "Try `libdrm` first, then `sysfs` if libdrm failed"
|
||||
"description": "Try `libdrm` first, then `sysfs` if libdrm fails"
|
||||
}
|
||||
],
|
||||
"default": false
|
||||
@@ -663,7 +658,7 @@
|
||||
}
|
||||
},
|
||||
"display": {
|
||||
"description": "Configure how things to be displayed",
|
||||
"description": "Configure how things should be displayed",
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -682,7 +677,7 @@
|
||||
},
|
||||
"pipe": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to enable pipe mode (disable logo and all escape sequences)",
|
||||
"description": "Whether to disable colors (auto-detected based on isatty(1) by default)",
|
||||
"default": false
|
||||
},
|
||||
"showErrors": {
|
||||
@@ -692,12 +687,12 @@
|
||||
},
|
||||
"disableLinewrap": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to disable line wrap during the run",
|
||||
"description": "Whether to disable line wrap during execution",
|
||||
"default": true
|
||||
},
|
||||
"hideCursor": {
|
||||
"type": "boolean",
|
||||
"description": "Whether to hide the cursor during the run",
|
||||
"description": "Whether to hide the cursor during execution",
|
||||
"default": true
|
||||
},
|
||||
"separator": {
|
||||
@@ -709,7 +704,7 @@
|
||||
"description": "Set the color of the keys and title",
|
||||
"oneOf": [
|
||||
{
|
||||
"description": "Set the both color of the keys and title",
|
||||
"description": "Set both the colors of keys and title",
|
||||
"$ref": "#/$defs/colors"
|
||||
},
|
||||
{
|
||||
@@ -774,11 +769,11 @@
|
||||
"size": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Set how a size value should be displayed",
|
||||
"description": "Set how size values should be displayed",
|
||||
"properties": {
|
||||
"binaryPrefix": {
|
||||
"type": "string",
|
||||
"description": "Set the binary prefix to used when formatting sizes",
|
||||
"description": "Set the binary prefix to use when formatting sizes",
|
||||
"oneOf": [
|
||||
{
|
||||
"const": "iec",
|
||||
@@ -792,7 +787,8 @@
|
||||
"const": "jedec",
|
||||
"description": "1024 Bytes = 1 KB, 1024 KB = 1 MB, ..."
|
||||
}
|
||||
]
|
||||
],
|
||||
"default": "iec"
|
||||
},
|
||||
"maxPrefix": {
|
||||
"type": "string",
|
||||
@@ -816,7 +812,7 @@
|
||||
"properties": {
|
||||
"unit": {
|
||||
"type": "string",
|
||||
"description": "Set the unit of the temperature",
|
||||
"description": "Set the unit of temperature",
|
||||
"enum": ["D", "Default", "Celsius", "C", "Fahrenheit", "F", "Kelvin", "K"],
|
||||
"default": "D"
|
||||
},
|
||||
@@ -830,19 +826,22 @@
|
||||
"color": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Set color used in different states of temperature values",
|
||||
"description": "Set colors used in different states of temperature values",
|
||||
"properties": {
|
||||
"green": {
|
||||
"description": "Color used in green state",
|
||||
"$ref": "#/$defs/colors"
|
||||
"$ref": "#/$defs/colors",
|
||||
"default": "green"
|
||||
},
|
||||
"yellow": {
|
||||
"description": "Color used in yellow state",
|
||||
"$ref": "#/$defs/colors"
|
||||
"$ref": "#/$defs/colors",
|
||||
"default": "light_yellow"
|
||||
},
|
||||
"red": {
|
||||
"description": "Color used in red state",
|
||||
"$ref": "#/$defs/colors"
|
||||
"$ref": "#/$defs/colors",
|
||||
"default": "light_red"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -884,7 +883,7 @@
|
||||
"percent": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Set how a percentage value should be displayed",
|
||||
"description": "Set how percentage values should be displayed",
|
||||
"properties": {
|
||||
"type": {
|
||||
"$ref": "#/$defs/percentType"
|
||||
@@ -899,19 +898,22 @@
|
||||
"color": {
|
||||
"type": "object",
|
||||
"additionalProperties": false,
|
||||
"description": "Set color used in different states of percentage bars and numbers",
|
||||
"description": "Set colors used in different states of percentage bars and numbers",
|
||||
"properties": {
|
||||
"green": {
|
||||
"description": "Color used in green state",
|
||||
"$ref": "#/$defs/colors"
|
||||
"$ref": "#/$defs/colors",
|
||||
"default": "green"
|
||||
},
|
||||
"yellow": {
|
||||
"description": "Color used in yellow state",
|
||||
"$ref": "#/$defs/colors"
|
||||
"$ref": "#/$defs/colors",
|
||||
"default": "light_yellow"
|
||||
},
|
||||
"red": {
|
||||
"description": "Color used in red state",
|
||||
"$ref": "#/$defs/colors"
|
||||
"$ref": "#/$defs/colors",
|
||||
"default": "light_red"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -924,7 +926,7 @@
|
||||
"properties": {
|
||||
"ndigits": {
|
||||
"type": "integer",
|
||||
"description": "Set the number of digits to keep after the decimal point when formatting frequency values\nA positive value will show the frequency in GHz of decimal\n-1 will show the frequency in MHz",
|
||||
"description": "Set the number of digits to keep after the decimal point when formatting frequency values\nA positive value will show the frequency in GHz with decimal\n-1 will show the frequency in MHz",
|
||||
"minimum": -1,
|
||||
"maximum": 9,
|
||||
"default": 2
|
||||
|
||||
+121
-52
@@ -1,11 +1,15 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
Python script to generate a man page for the command `fastfetch`.
|
||||
The man content will be printed to stdout so you will need to
|
||||
pipe it to a file if you want to save it.
|
||||
The command options will be generated using a JSON file.
|
||||
For the format of the JSON file, see https://github.com/fastfetch-cli/fastfetch/blob/dev/src/data/help.json
|
||||
Python script to generate a comprehensive man page for the command `fastfetch`.
|
||||
|
||||
The generated man page content will be printed to stdout,
|
||||
so you will need to pipe it to a file if you want to save it.
|
||||
Example: python3 gen-man.py > fastfetch.1
|
||||
|
||||
The command options are generated using a JSON file.
|
||||
For the JSON file format, see:
|
||||
https://github.com/fastfetch-cli/fastfetch/blob/dev/src/data/help.json
|
||||
"""
|
||||
|
||||
from json import load
|
||||
@@ -33,7 +37,7 @@ pathToHelpFile = path.join(pathToCurrentDir, "../src/data/help.json")
|
||||
# man page section
|
||||
manSection = 1
|
||||
# title (center header)
|
||||
titlePage = "Fastfetch man page"
|
||||
titlePage = "FASTFETCH"
|
||||
# date (center footer)
|
||||
# format : "Month (abbreviation) Day Year"
|
||||
todayDate = datetime.fromtimestamp(
|
||||
@@ -47,81 +51,118 @@ pathToVersionFile = path.join(pathToCurrentDir, "../CMakeLists.txt")
|
||||
###### Sections Text ######
|
||||
|
||||
# text displayed in the "NAME" section
|
||||
nameSection = r"fastfetch \- A maintained, feature\-rich and performance oriented, neofetch like system information tool"
|
||||
nameSection = r"fastfetch \- A fast and feature-rich system information tool similar to neofetch"
|
||||
|
||||
# text displayed in the "DESCRIPTION" section
|
||||
descriptionSection = r"""
|
||||
Fastfetch is a tool for displaying system information in a visually appealing way. Written primarily in C, it focuses on performance and customizability while providing functionality similar to neofetch.
|
||||
It supports Linux, Android, FreeBSD, macOS, and Windows 7 or newer.
|
||||
"""
|
||||
|
||||
# text displayed at the beginning of the "OPTIONS" section
|
||||
optionSection = r"""
|
||||
Parsing is not case sensitive. E.g. \fB--logo-type\fR is
|
||||
equal to \fB--LOGO-TYPE\fR.
|
||||
Options are parsed in a case-insensitive manner. For example, \fB--logo-type\fR and \fB--LOGO-TYPE\fR are treated identically.
|
||||
|
||||
If a value is between square brackets, it is optional.
|
||||
An optional boolean value defaults to true if not specified.
|
||||
Arguments in square brackets are optional. Optional boolean arguments default to 'true' when specified without a value.
|
||||
|
||||
More detailed help messages for each options can be printed
|
||||
with \fB-h <option_without_dash_prefix>\fR.
|
||||
For more detailed information about a specific option, use:
|
||||
\fBfastfetch -h <option_name_without_dashes>\fR
|
||||
|
||||
All options can be made permanent with command
|
||||
\fBfastfetch <options> --gen-config\fR.
|
||||
Any combination of options can be made permanent by generating a configuration file:
|
||||
\fBfastfetch <options> --gen-config\fR
|
||||
"""
|
||||
|
||||
# text displayed in the "CONFIGURATION"
|
||||
configurationSection = f"""
|
||||
.SS Fetch Structure
|
||||
|
||||
The structure of a fetch describes the modules that should
|
||||
be included in the output. It consists of a string of modules,
|
||||
separated by a colon (:). To list all available modules,
|
||||
use --list-modules.
|
||||
The structure defines which modules to display and in what order. It consists of module names separated by colons (:).
|
||||
For example: {startBold}title:separator:os:kernel:uptime{endBold}
|
||||
|
||||
To list all available modules, use {startBold}--list-modules{endBold}
|
||||
|
||||
|
||||
.SS Config Files
|
||||
|
||||
Fastfetch uses JSONC based format for configuration.
|
||||
Fastfetch doesn't generate config file automatically;
|
||||
it should be generated manually by {startBold}--gen-config{endBold}.
|
||||
The config file will be saved in
|
||||
{startBold}~/.config/fastfetch/config.jsonc{endBold} by default.
|
||||
Fastfetch uses JSONC (JSON with Comments) for configuration files. These files must have the .jsonc extension.
|
||||
|
||||
A JSONC config file is a JSON file that also supports comments
|
||||
with (// and /* */). Those files must have the extension '.jsonc'.
|
||||
You can generate a default config file using {startBold}--gen-config{endBold}. By default, the config file is saved at {startBold}~/.config/fastfetch/config.jsonc{endBold}.
|
||||
|
||||
The specified configuration/preset files are searched in the following order:
|
||||
The configuration/preset files are searched in the following locations (in order):
|
||||
|
||||
{startBold}1.{endBold} relative to the current working directory
|
||||
{startBold}1.{endBold} Relative to the current working directory
|
||||
|
||||
{startBold}2.{endBold} relative to ~/.local/share/fastfetch/presets/
|
||||
{startBold}2.{endBold} Relative to ~/.local/share/fastfetch/presets/
|
||||
|
||||
{startBold}3.{endBold} relative to /usr/share/fastfetch/presets/
|
||||
{startBold}3.{endBold} Relative to /usr/share/fastfetch/presets/
|
||||
|
||||
Fastfetch provides some default presets. List them with --list-presets.
|
||||
For detailed information on logo options, module configuration, and formatting, visit:
|
||||
{startBold}https://github.com/fastfetch-cli/fastfetch/wiki/Configuration{endBold}
|
||||
|
||||
Fastfetch provides several built-in presets. List them with {startBold}--list-presets{endBold}.
|
||||
|
||||
.SS JSON Schema
|
||||
A JSON schema is available for editor intelligence when editing the configuration file. Add the following line at the beginning of your config file:
|
||||
|
||||
{startBold}"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json"{endBold}
|
||||
"""
|
||||
|
||||
# text displayed in the "EXAMPLE" section
|
||||
exampleSection = """
|
||||
.SS Config files:
|
||||
exampleSection = f"""
|
||||
.SS Basic Usage
|
||||
{startBold}fastfetch{endBold}
|
||||
|
||||
.SS Use a specific logo
|
||||
{startBold}fastfetch --logo arch{endBold}
|
||||
|
||||
.SS Custom structure
|
||||
{startBold}fastfetch --structure title:os:kernel:uptime:memory{endBold}
|
||||
|
||||
.SS Generate a config file
|
||||
{startBold}fastfetch --gen-config{endBold}
|
||||
|
||||
.SS Use a preset
|
||||
{startBold}fastfetch --config neofetch{endBold}
|
||||
|
||||
.SS Config File Example
|
||||
.nf
|
||||
// ~/.config/fastfetch/config.jsonc
|
||||
{
|
||||
{{
|
||||
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
|
||||
"logo": {{
|
||||
"type": "auto",
|
||||
"source": "arch"
|
||||
}},
|
||||
"display": {{
|
||||
"separator": ": ",
|
||||
"color": {{
|
||||
"keys": "blue",
|
||||
"title": "red"
|
||||
}},
|
||||
"key": {{
|
||||
"width": 12
|
||||
}}
|
||||
}},
|
||||
"modules": [
|
||||
"title",
|
||||
"separator",
|
||||
"module1",
|
||||
{
|
||||
"type": "module2",
|
||||
"module2-option": "value"
|
||||
}
|
||||
"os",
|
||||
"kernel",
|
||||
"uptime",
|
||||
{{
|
||||
"type": "memory",
|
||||
"format": "{{used}}/{{total}} ({{used_percent}}%)"
|
||||
}}
|
||||
]
|
||||
}
|
||||
}}
|
||||
.fi
|
||||
"""
|
||||
|
||||
# text displayed in the "BUGS" section
|
||||
bugSection = "Please report bugs to : \
|
||||
https://github.com/fastfetch-cli/fastfetch/issues"
|
||||
bugSection = "Please report bugs to: https://github.com/fastfetch-cli/fastfetch/issues"
|
||||
|
||||
# text displayed in the "WIKI" section
|
||||
wikiSection = "Fastfetch github wiki : https://github.com/fastfetch-cli/fastfetch/wiki/Configuration"
|
||||
# text displayed in the "AUTHORS" section
|
||||
authorsSection = "Fastfetch is developed by a team of contributors on GitHub.\nVisit https://github.com/fastfetch-cli/fastfetch for more information."
|
||||
|
||||
|
||||
###### Argument decoration ######
|
||||
@@ -130,7 +171,7 @@ wikiSection = "Fastfetch github wiki : https://github.com/fastfetch-cli/fastfetc
|
||||
|
||||
# if an optional argument is displayed as [?optArg] (with "optArg" underlined)
|
||||
# this value should be f"[?{startUnderline}"
|
||||
startOptionalArgument = f"[{startUnderline}?"
|
||||
startOptionalArgument = f"[{startUnderline}"
|
||||
# if an optional argument is displayed as [?optArg] (with "optArg underlined")
|
||||
# this value should be f"{endUnderline}]"
|
||||
endOptionalArgument = f"{endUnderline}]"
|
||||
@@ -161,7 +202,7 @@ def main():
|
||||
for line in versionFile:
|
||||
researchVersion = search(r"^\s*VERSION (\d+\.\d+\.\d+)$", line)
|
||||
if (researchVersion):
|
||||
print(f"\"{researchVersion.group(1)}\"", end=" ")
|
||||
print(f"\"Fastfetch {researchVersion.group(1)}\"", end=" ")
|
||||
break
|
||||
|
||||
print(f"\"{titlePage}\"")
|
||||
@@ -177,13 +218,13 @@ def main():
|
||||
|
||||
print(".SH SYNOPSIS")
|
||||
print(".B fastfetch")
|
||||
print(f"[{startUnderline}OPTIONS{endUnderline}]")\
|
||||
print(f"[{startUnderline}OPTIONS{endUnderline}...]")
|
||||
|
||||
|
||||
###### Wiki ######
|
||||
###### Description ######
|
||||
|
||||
print(".SH WIKI")
|
||||
print(wikiSection)
|
||||
print(".SH DESCRIPTION")
|
||||
print(descriptionSection)
|
||||
|
||||
|
||||
###### Configuration ######
|
||||
@@ -202,7 +243,7 @@ def main():
|
||||
for key, value in helpFileData.items():
|
||||
|
||||
# print new subsection
|
||||
print(f".SS {key}:")
|
||||
print(f".SS {key}")
|
||||
|
||||
# loop through every option in a section
|
||||
for option in value:
|
||||
@@ -237,7 +278,25 @@ def main():
|
||||
print(startMandatoryArgument + option['arg']['type'] + endMandatoryArgument, end="")
|
||||
|
||||
# description
|
||||
print(f"\n {option['desc']} \n")
|
||||
print()
|
||||
|
||||
# If desc is a list, join with newlines and proper spacing
|
||||
if isinstance(option['desc'], list):
|
||||
desc_text = "\n ".join(option['desc'])
|
||||
print(f" {desc_text}")
|
||||
else:
|
||||
print(f" {option['desc']}")
|
||||
|
||||
# Add remarks if available
|
||||
if "remark" in keyList:
|
||||
print()
|
||||
if isinstance(option['remark'], list):
|
||||
for remark in option['remark']:
|
||||
print(f" {remark}")
|
||||
else:
|
||||
print(f" {option['remark']}")
|
||||
|
||||
print()
|
||||
|
||||
|
||||
###### Examples ######
|
||||
@@ -246,12 +305,22 @@ def main():
|
||||
print(exampleSection)
|
||||
|
||||
|
||||
###### See Also ######
|
||||
|
||||
print(".SH \"SEE ALSO\"")
|
||||
print(".BR neofetch (1)")
|
||||
|
||||
|
||||
###### Bugs ######
|
||||
|
||||
print(".SH BUGS")
|
||||
print(bugSection)
|
||||
|
||||
|
||||
###### Authors ######
|
||||
|
||||
print(".SH AUTHORS")
|
||||
print(authorsSection)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/init.h"
|
||||
#include "common/parsing.h"
|
||||
#include "common/thread.h"
|
||||
#include "detection/displayserver/displayserver.h"
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
void ffInitInstance(void);
|
||||
void ffStart(void);
|
||||
void ffFinish(void);
|
||||
void ffDestroyInstance(void);
|
||||
void ffListFeatures(void);
|
||||
@@ -147,6 +147,14 @@ ssize_t ffReadFileDataRelative(HANDLE dfd, const char* fileName, size_t dataSize
|
||||
|
||||
bool ffPathExpandEnv(const char* in, FFstrbuf* out)
|
||||
{
|
||||
if (in[0] == '~') {
|
||||
if ((in[1] == '/' || in[1] == '\\' || in[1] == '\0') && !ffStrContainsC(in, '%')) {
|
||||
ffStrbufSet(out, &instance.state.platform.homeDir);
|
||||
ffStrbufAppendS(out, in + 1);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
DWORD length = ExpandEnvironmentStringsA(in, NULL, 0);
|
||||
if (length <= 1) return false;
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/printing.h"
|
||||
#include "logo/logo.h"
|
||||
#include "util/textModifier.h"
|
||||
|
||||
void ffPrintLogoAndKey(const char* moduleName, uint8_t moduleIndex, const FFModuleArgs* moduleArgs, FFPrintType printType)
|
||||
|
||||
@@ -130,7 +130,11 @@ const char* ffProcessAppendOutput(FFstrbuf* buffer, char* const argv[], bool use
|
||||
switch (GetLastError())
|
||||
{
|
||||
case ERROR_IO_PENDING:
|
||||
if (!timeout || WaitForSingleObject(hChildPipeRead, (DWORD) timeout) != WAIT_OBJECT_0)
|
||||
#if __aarch64__
|
||||
if (!GetOverlappedResultEx(hChildPipeRead, &overlapped, &nRead, timeout < 0 ? INFINITE : (DWORD) timeout, FALSE))
|
||||
#else
|
||||
// To support Windows 7
|
||||
if (timeout >= 0 && WaitForSingleObject(hChildPipeRead, (DWORD) timeout) != WAIT_OBJECT_0)
|
||||
{
|
||||
CancelIo(hChildPipeRead);
|
||||
TerminateProcess(hProcess, 1);
|
||||
@@ -138,13 +142,18 @@ const char* ffProcessAppendOutput(FFstrbuf* buffer, char* const argv[], bool use
|
||||
}
|
||||
|
||||
if (!GetOverlappedResult(hChildPipeRead, &overlapped, &nRead, FALSE))
|
||||
#endif
|
||||
{
|
||||
if (GetLastError() == ERROR_BROKEN_PIPE)
|
||||
return NULL;
|
||||
|
||||
CancelIo(hChildPipeRead);
|
||||
TerminateProcess(hProcess, 1);
|
||||
return "GetOverlappedResult(hChildPipeRead) failed";
|
||||
return "GetOverlappedResult"
|
||||
#if __aarch64__
|
||||
"Ex"
|
||||
#endif
|
||||
"(hChildPipeRead) failed";
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
+164
-164
File diff suppressed because it is too large
Load Diff
@@ -1,24 +0,0 @@
|
||||
Usage: fastfetch --color <color>
|
||||
|
||||
Shortcut of `fastfetch --color-keys <color> --color-title <color>`.
|
||||
If no color is set, the main color of the logo will be used.
|
||||
|
||||
Following information applies to all settings
|
||||
|
||||
<color> must be a color encoding as ANSI escape sequences. It is inserted between "ESC[" and "m".
|
||||
Infos about them can be found here: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters.
|
||||
Examples:
|
||||
35: sets the color to magenta
|
||||
38;5;38: sets the color to 38th color of ANSI 256 colors
|
||||
4;92: sets the color to bright green with underline
|
||||
5;104: blinking text on a blue background
|
||||
|
||||
ANSI named colors are also supported:
|
||||
magenta: equivalent to `35`
|
||||
underline_bright_green: equivalent to `4;92`
|
||||
|
||||
After v2.15.0, some special keys can be used:
|
||||
keys: use the color set by `--color-keys`
|
||||
title: use the color set by `--color-title`
|
||||
output: use the color set by `--color-output`
|
||||
separator: use the color set by `--color-separator`
|
||||
@@ -1,4 +0,0 @@
|
||||
Parsing is not case sensitive. E.g. "--lib-PCI" is equal to "--Lib-Pci"
|
||||
If a value starts with a ?, it is optional. An optional boolean value defaults to true if not specified.
|
||||
More detailed help messages for each options can be printed with "-h <option_without_dash_prefix>"
|
||||
All options can be made permanent with command "fastfetch <options> --gen-config"
|
||||
@@ -1,55 +0,0 @@
|
||||
A format string is a string that contains placeholders for values.
|
||||
These placeholders begin with a '{', containing the index of the value, and end with a '}'.
|
||||
For example the format string "Values: {1} ({2})", with the values "First" and "My second val", will produce "Values: First (My second val)".
|
||||
The format string can contain placeholders in any order and have multiple occurrences.
|
||||
To include spaces when setting from the command line, surround the whole string with double quotes (").
|
||||
|
||||
In 2.14.0 or newer, the value indices can be meaningful named tags.
|
||||
For example: "--title-format '{user-name-colored}{at-symbol-colored}{host-name-colored}'" is equivalent to "--title-format '{6}{7}{8}'"
|
||||
See "fastfetch -h title-format" for all supported tags.
|
||||
|
||||
In 2.17.0 or newer, a truncation length can be specified using syntax '<arg>:<trunc-length>`
|
||||
For example: "--title-format '{user-name:5}'" will truncate user name into 5-length string.
|
||||
If '<trunc-length>' is negative, an ellipsis … will be appended at the end when the original string is truncated.
|
||||
Note: The string length is counted in raw bytes. Multi-byte unicode characters and ANSI escape codes are not taken into account.
|
||||
|
||||
In 2.23.0 or newer, `<` or `>` can be specified instead of `:` to set a left or right padding.
|
||||
For example: "--title-format '{user-name<20}'" will generate `<user-name> `;
|
||||
"--title-format '{user-name>20}'" will generate ` <user-name>`
|
||||
|
||||
In 2.24.0 or newer, `{~startIndex,endIndex}` can be specified to slice a string. Negative index counts back from the end of the string.
|
||||
If an index is omitted, 0 is used. For example, both `{~,0}` `{~0,}` and `{~,}` are same as `{~0,0}` and will always generate a empty string.
|
||||
If `,endIndex` is omitted or greater than the length of the string, the length of string is used.
|
||||
|
||||
In 2.36.0 or newer, `{$NUM}` can be specified to reference a constant defined in `display.constants`. `{$ENV_VAR}` can be specified to reference an environment variable.
|
||||
|
||||
If the value index is missing, meaning the placeholder is "{}", an internal counter sets the value index.
|
||||
This means that the format string "Values: {1} ({2})" is equivalent to "Values: {} ({})".
|
||||
Note that this counter only counts empty placeholders, so the format string "{2} {} {}" will contain the second value, then the first, and then the second again.
|
||||
|
||||
To make formatting easier, a double open curly brace ("{{") will be printed as a single open curly brace and not counted as the beginning of a placeholder.
|
||||
If a value index is misformatted or wants a non-existing value, it will be printed as is, with the curly braces around it.
|
||||
If the last placeholder isn't closed, it will be treated like it was at the end of the format string.
|
||||
|
||||
To only print something if a variable is set, use "{?<index>} ... {?}".
|
||||
For example, to only print a second value if it is set, use "{?2} Second value: {2}{?}".
|
||||
If a "{?}" is found without an opener, it is printed as is.
|
||||
|
||||
To only print something if a variable is not set, do the same as with if, just replace every '?' with a '/'.
|
||||
For example to print a fallback for a second value if it is not set, use "{?2}{2}{?}{/2}Second value fallback{/}".
|
||||
|
||||
To stop formatting at any point in the format string, use "{-}".
|
||||
|
||||
To print something with color, start a placeholder with a '#' and then the linux terminal color encoding.
|
||||
"\033[" at the start, and an 'm' at the end is automatically added, so don't do that.
|
||||
A "{#}" is equivalent to a "{#0}" and resets everything to normal.
|
||||
For example to print something pink and underline, use "{#4;35}...{#}". "{#underline_magenta}" is also supported. See `fastfetch -h color` for detail.
|
||||
Information about what the numbers mean can be found here: https://en.wikipedia.org/wiki/ANSI_escape_code#SGR_(Select_Graphic_Rendition)_parameters.
|
||||
Which escape codes are supported and how they look is defined by your terminal.
|
||||
|
||||
If a format string evaluates to an empty value, the whole line in the output will be discarded.
|
||||
You can therefore use --host-format " " to disable host output.
|
||||
Note that --host-format "" would evaluate as not set, and therefore use the built-in host format
|
||||
|
||||
Format string is also the way to go to set a fixed value - just use one without placeholders.
|
||||
For example when running in headless mode, you could use "--display-format Preferred".
|
||||
@@ -6,7 +6,13 @@
|
||||
static int enumDev(FF_MAYBE_UNUSED int sockfd, struct bt_devinfo const* dev, FFlist* devices)
|
||||
{
|
||||
FFBluetoothResult* device = ffListAdd(devices);
|
||||
ffStrbufInitS(&device->name, bt_devremote_name_gen(dev->devname, &dev->bdaddr));
|
||||
ffStrbufInitS(&device->name,
|
||||
#if __FreeBSD__
|
||||
bt_devremote_name_gen(dev->devname, &dev->bdaddr)
|
||||
#else
|
||||
dev->devname
|
||||
#endif
|
||||
);
|
||||
ffStrbufInitS(&device->address, bt_ntoa(&dev->bdaddr, NULL));
|
||||
ffStrbufUpperCase(&device->address);
|
||||
ffStrbufInit(&device->type);
|
||||
|
||||
@@ -106,9 +106,14 @@ static const char* armPartId2name(uint32_t partId)
|
||||
case 0xd80: return "Cortex-A520";
|
||||
case 0xd81: return "Cortex-A720";
|
||||
case 0xd82: return "Cortex-X4";
|
||||
case 0xd83: return "Neoverse-V3AE";
|
||||
case 0xd84: return "Neoverse-V3";
|
||||
case 0xd85: return "Cortex-X925";
|
||||
case 0xd87: return "Cortex-A725";
|
||||
case 0xd88: return "Cortex-A520AE";
|
||||
case 0xd89: return "Cortex-A720AE";
|
||||
case 0xd8e: return "Neoverse-N3";
|
||||
case 0xd8f: return "Cortex-A320";
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
@@ -314,6 +319,7 @@ static const char* fujitsuPartId2name(uint32_t partId)
|
||||
switch (partId)
|
||||
{
|
||||
case 0x001: return "A64FX";
|
||||
case 0x003: return "MONAKA";
|
||||
default: return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
+65
-21
@@ -1,5 +1,6 @@
|
||||
#include "cpu.h"
|
||||
#include "common/sysctl.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
#include <sys/param.h>
|
||||
#if __has_include(<sys/cpuset.h>)
|
||||
@@ -34,35 +35,60 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
|
||||
if (ffSysctlGetString("hw.model", &cpu->name) != NULL)
|
||||
return "sysctlbyname(hw.model) failed";
|
||||
|
||||
cpu->coresPhysical = (uint16_t) ffSysctlGetInt("hw.ncpu", 1);
|
||||
cpu->coresLogical = cpu->coresPhysical;
|
||||
cpu->coresLogical = (uint16_t) ffSysctlGetInt("hw.ncpu", 1);
|
||||
cpu->coresPhysical = 0;
|
||||
cpu->coresOnline = (uint16_t) ffSysctlGetInt("kern.smp.cpus", cpu->coresLogical);
|
||||
|
||||
FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
|
||||
if (ffSysctlGetString("kern.sched.topology_spec", &buffer) == NULL && buffer.length > 0)
|
||||
{
|
||||
// <groups>
|
||||
// <group level="1" cache-level="3">
|
||||
// <cpu count="4" mask="f,0,0,0">0, 1, 2, 3</cpu>
|
||||
// <children>
|
||||
// <group level="2" cache-level="2">
|
||||
// <cpu count="2" mask="3,0,0,0">0, 1</cpu>
|
||||
// <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
|
||||
// </group>
|
||||
// <group level="2" cache-level="2">
|
||||
// <cpu count="2" mask="c,0,0,0">2, 3</cpu>
|
||||
// <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
|
||||
// </group>
|
||||
// </children>
|
||||
// </group>
|
||||
// <group level="1" cache-level="3">
|
||||
// <cpu count="4" mask="f,0,0,0">0, 1, 2, 3</cpu>
|
||||
// <children>
|
||||
// <group level="2" cache-level="2">
|
||||
// <cpu count="2" mask="3,0,0,0">0, 1</cpu>
|
||||
// <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
|
||||
// </group>
|
||||
// <group level="2" cache-level="2">
|
||||
// <cpu count="2" mask="c,0,0,0">2, 3</cpu>
|
||||
// <flags><flag name="THREAD">THREAD group</flag><flag name="SMT">SMT group</flag></flags>
|
||||
// </group>
|
||||
// </children>
|
||||
// </group>
|
||||
// </groups>
|
||||
uint32_t i = 0;
|
||||
while (true)
|
||||
char* line = NULL;
|
||||
size_t len = 0;
|
||||
bool inLvl2 = false, threadGroup = false;
|
||||
uint32_t cpuCount = 0;
|
||||
while (ffStrbufGetline(&line, &len, &buffer))
|
||||
{
|
||||
i = ffStrbufNextIndexS(&buffer, i, "<flag name=\"THREAD\">THREAD group</flag>"); // Find physical core with hyper-threading enabled
|
||||
if (i >= buffer.length) break;
|
||||
cpu->coresPhysical--;
|
||||
i += (uint32_t) strlen("<flag name=\"THREAD\">THREAD group</flag>");
|
||||
if (!inLvl2)
|
||||
{
|
||||
if (ffStrStartsWith(line, " <group level=\"2\""))
|
||||
{
|
||||
inLvl2 = true;
|
||||
cpuCount = 0;
|
||||
threadGroup = false;
|
||||
}
|
||||
else if (ffStrStartsWith(line, " <group level=\"1\""))
|
||||
cpu->packages++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ffStrEquals(line, " </group>"))
|
||||
{
|
||||
cpu->coresPhysical += threadGroup ? 1 : cpuCount;
|
||||
inLvl2 = false;
|
||||
}
|
||||
else if (cpuCount == 0 && ffStrStartsWith(line, " <cpu count=\""))
|
||||
cpuCount = (uint32_t) strtoul(line + strlen(" <cpu count=\""), NULL, 10);
|
||||
else if (cpuCount > 0 && ffStrStartsWith(line, " <flags>"))
|
||||
{
|
||||
if (ffStrContains(line, "<flag name=\"THREAD\">THREAD group</flag>"))
|
||||
threadGroup = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,6 +105,24 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
|
||||
|
||||
uint32_t clockrate = (uint32_t) ffSysctlGetInt("hw.clockrate", 0);
|
||||
if (clockrate > cpu->frequencyBase) cpu->frequencyBase = clockrate;
|
||||
|
||||
for (uint16_t i = 0; i < cpu->coresLogical; ++i)
|
||||
{
|
||||
ffStrbufClear(&buffer);
|
||||
char key[32];
|
||||
snprintf(key, sizeof(key), "dev.cpu.%u.freq_levels", i);
|
||||
if (ffSysctlGetString(key, &buffer) == NULL)
|
||||
{
|
||||
if (buffer.length == 0) continue;
|
||||
|
||||
// MHz/Watts pairs like: 2501/32000 2187/27125 2000/24000
|
||||
uint32_t fmax = (uint32_t) strtoul(buffer.chars, NULL, 10);
|
||||
if (cpu->frequencyMax < fmax) cpu->frequencyMax = fmax;
|
||||
}
|
||||
else
|
||||
break;
|
||||
}
|
||||
|
||||
cpu->temperature = FF_CPU_TEMP_UNSET;
|
||||
|
||||
if (options->temp)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <dirent.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#define FF_CPUINFO_PATH "/proc/cpuinfo"
|
||||
|
||||
@@ -432,11 +433,11 @@ FF_MAYBE_UNUSED static uint16_t getPackageCount(FFstrbuf* cpuinfo)
|
||||
{
|
||||
p += strlen("\nphysical id\t:");
|
||||
char* pend;
|
||||
unsigned long id = strtoul(p, &pend, 10);
|
||||
unsigned long long id = strtoul(p, &pend, 10);
|
||||
if (__builtin_expect(id > 64, false)) // Do 129-socket boards exist?
|
||||
high |= 1 << (id - 64);
|
||||
high |= 1ULL << (id - 64);
|
||||
else
|
||||
low |= 1 << id;
|
||||
low |= 1ULL << id;
|
||||
p = pend;
|
||||
}
|
||||
|
||||
@@ -458,9 +459,7 @@ FF_MAYBE_UNUSED static const char* detectCPUX86(const FFCPUOptions* options, FFC
|
||||
cpu->coresOnline = (uint16_t) get_nprocs();
|
||||
cpu->packages = getPackageCount(&cpuinfo);
|
||||
cpu->coresPhysical = (uint16_t) ffStrbufToUInt(&physicalCoresBuffer, 0); // physical cores in single package
|
||||
if (cpu->coresPhysical == 0)
|
||||
cpu->coresPhysical = cpu->coresLogical;
|
||||
else if (cpu->packages > 1)
|
||||
if (cpu->coresPhysical > 0 && cpu->packages > 1)
|
||||
cpu->coresPhysical *= cpu->packages;
|
||||
|
||||
// Ref https://github.com/fastfetch-cli/fastfetch/issues/1194#issuecomment-2295058252
|
||||
@@ -473,6 +472,82 @@ FF_MAYBE_UNUSED static const char* detectCPUX86(const FFCPUOptions* options, FFC
|
||||
|
||||
#else
|
||||
|
||||
static const char* detectPhysicalCores(FFCPUResult* cpu)
|
||||
{
|
||||
int dfd = open("/sys/devices/system/cpu/", O_RDONLY | O_DIRECTORY);
|
||||
if (dfd < 0) return "open(\"/sys/devices/system/cpu/\") failed";
|
||||
|
||||
FF_AUTO_CLOSE_DIR DIR* dir = fdopendir(dfd);
|
||||
if (!dir) return "fdopendir(dfd) failed";
|
||||
|
||||
uint64_t pkgLow = 0, pkgHigh = 0;
|
||||
|
||||
struct dirent* entry;
|
||||
FF_LIST_AUTO_DESTROY cpuList = ffListCreate(sizeof(uint32_t));
|
||||
while ((entry = readdir(dir)) != NULL)
|
||||
{
|
||||
if (entry->d_type != DT_DIR || !ffStrStartsWith(entry->d_name, "cpu") || !ffCharIsDigit(entry->d_name[strlen("cpu")]))
|
||||
continue;
|
||||
|
||||
FF_AUTO_CLOSE_FD int cpuxfd = openat(dirfd(dir), entry->d_name, O_RDONLY | O_DIRECTORY);
|
||||
if (cpuxfd < 0)
|
||||
continue;
|
||||
|
||||
char buf[128];
|
||||
|
||||
// Check if the directory contains a file named "topology/physical_package_id"
|
||||
// that lists the physical package id of the CPU.
|
||||
|
||||
ssize_t len = ffReadFileDataRelative(cpuxfd, "topology/physical_package_id", sizeof(buf) - 1, buf);
|
||||
if (len > 0)
|
||||
{
|
||||
buf[len] = '\0';
|
||||
unsigned long long id = strtoul(buf, NULL, 10);
|
||||
if (__builtin_expect(id > 64, false)) // Do 129-socket boards exist?
|
||||
pkgHigh |= 1ULL << (id - 64);
|
||||
else
|
||||
pkgLow |= 1ULL << id;
|
||||
}
|
||||
|
||||
// Check if the directory contains a file named "topology/core_cpus_list"
|
||||
// that lists the physical cores in the package.
|
||||
|
||||
len = ffReadFileDataRelative(cpuxfd, "topology/core_cpus_list", sizeof(buf) - 1, buf);
|
||||
if (len > 0)
|
||||
{
|
||||
buf[len] = '\0'; // low-high or low
|
||||
|
||||
for (const char* p = buf; *p;)
|
||||
{
|
||||
char* pend;
|
||||
uint32_t coreId = (uint32_t) strtoul(p, &pend, 10);
|
||||
if (pend == p) break;
|
||||
|
||||
bool found = false;
|
||||
FF_LIST_FOR_EACH(uint32_t, id, cpuList)
|
||||
{
|
||||
if (*id == coreId)
|
||||
{
|
||||
// This core is already counted
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!found)
|
||||
*(uint32_t*) ffListAdd(&cpuList) = coreId;
|
||||
|
||||
p = strchr(pend, ',');
|
||||
if (!p) break;
|
||||
++p;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cpu->coresPhysical = (uint16_t) cpuList.length;
|
||||
cpu->packages = (uint16_t) (__builtin_popcountll(pkgLow) + __builtin_popcountll(pkgHigh));
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FF_MAYBE_UNUSED static void parseIsa(FFstrbuf* cpuIsa)
|
||||
{
|
||||
// Always use the last part of the ISA string. Ref: #590 #1204
|
||||
@@ -601,7 +676,7 @@ FF_MAYBE_UNUSED static uint16_t getLoongarchPropCount(FFstrbuf* cpuinfo, const c
|
||||
|
||||
FF_MAYBE_UNUSED static const char* detectCPUOthers(const FFCPUOptions* options, FFCPUResult* cpu)
|
||||
{
|
||||
cpu->coresPhysical = cpu->coresLogical = (uint16_t) get_nprocs_conf();
|
||||
cpu->coresLogical = (uint16_t) get_nprocs_conf();
|
||||
cpu->coresOnline = (uint16_t) get_nprocs();
|
||||
|
||||
#if __ANDROID__
|
||||
@@ -663,6 +738,9 @@ FF_MAYBE_UNUSED static const char* detectCPUOthers(const FFCPUOptions* options,
|
||||
#endif
|
||||
}
|
||||
|
||||
if (cpu->coresPhysical == 0)
|
||||
detectPhysicalCores(cpu);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -4,6 +4,46 @@
|
||||
#include "util/mallocHelper.h"
|
||||
#include "util/smbiosHelper.h"
|
||||
|
||||
#include <pdh.h>
|
||||
|
||||
static void ffPdhOpenCloseQuery(HQUERY* query)
|
||||
{
|
||||
assert(query);
|
||||
if (*query)
|
||||
{
|
||||
PdhCloseQuery(*query);
|
||||
*query = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
static const char* detectThermalTemp(double* result)
|
||||
{
|
||||
// typeperf.exe -sc 1 "\Thermal Zone Information(*)\Temperature"
|
||||
|
||||
__attribute__((__cleanup__(ffPdhOpenCloseQuery))) HQUERY query = NULL;
|
||||
|
||||
if (PdhOpenQuery(NULL, 0, &query) != ERROR_SUCCESS)
|
||||
return "Failed to open PDH query";
|
||||
|
||||
HCOUNTER counter = NULL;
|
||||
if (PdhAddEnglishCounter(query,
|
||||
L"\\Thermal Zone Information(*)\\Temperature",
|
||||
0,
|
||||
&counter) != ERROR_SUCCESS)
|
||||
return "Failed to add TZI temperature counter";
|
||||
|
||||
if (PdhCollectQueryData(query) != ERROR_SUCCESS)
|
||||
return "Failed to collect query data";
|
||||
|
||||
PDH_FMT_COUNTERVALUE value;
|
||||
if (PdhGetFormattedCounterValue(counter, PDH_FMT_DOUBLE, NULL, &value) != ERROR_SUCCESS)
|
||||
return "Failed to format counter value";
|
||||
|
||||
*result = value.doubleValue - 273;
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// 7.5
|
||||
typedef struct FFSmbiosProcessorInfo
|
||||
{
|
||||
@@ -165,8 +205,6 @@ static const char* detectCoreTypes(FFCPUResult* cpu)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const char* detectThermalTemp(double* current, double* critical);
|
||||
|
||||
const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
|
||||
{
|
||||
detectNCores(cpu);
|
||||
@@ -182,7 +220,7 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
|
||||
detectMaxSpeedBySmbios(cpu);
|
||||
|
||||
if(options->temp)
|
||||
detectThermalTemp(&cpu->temperature, NULL);
|
||||
detectThermalTemp(&cpu->temperature);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
#include "util/windows/wmi.hpp"
|
||||
|
||||
extern "C"
|
||||
const char* detectThermalTemp(double* current, double* critical)
|
||||
{
|
||||
// Requires Administrator privileges
|
||||
// https://wutils.com/wmi/root/wmi/msacpi_thermalzonetemperature/#properties
|
||||
FFWmiQuery query(L"SELECT CurrentTemperature, CriticalTripPoint FROM MSAcpi_ThermalZoneTemperature WHERE Active = TRUE", nullptr, FFWmiNamespace::WMI);
|
||||
if(!query)
|
||||
return "Query WMI service failed";
|
||||
|
||||
if(FFWmiRecord record = query.next())
|
||||
{
|
||||
if (current)
|
||||
{
|
||||
if(auto vtCurrent = record.get(L"CurrentTemperature"))
|
||||
*current = vtCurrent.get<int32_t>() / 10 - 273.15; // In tenth of degrees Kelvin
|
||||
else
|
||||
*current = 0.0/0.0;
|
||||
}
|
||||
|
||||
if (critical)
|
||||
{
|
||||
if(auto vtCritical = record.get(L"CriticalTripPoint"))
|
||||
*critical = vtCritical.get<int32_t>() / 10 - 273.15; // In tenth of degrees Kelvin
|
||||
else
|
||||
*critical = 0.0/0.0;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return "No WMI result returned";
|
||||
}
|
||||
@@ -228,7 +228,7 @@ static void pciDetectAmdSpecific(const FFGPUOptions* options, FFGPUResult* gpu,
|
||||
}
|
||||
}
|
||||
|
||||
static void pciDetectIntelSpecific(FFGPUResult* gpu, FFstrbuf* pciDir, FFstrbuf* buffer, const char* drmKey)
|
||||
static void pciDetectIntelSpecific(const FFGPUOptions* options, FFGPUResult* gpu, FFstrbuf* pciDir, FFstrbuf* buffer, const char* drmKey)
|
||||
{
|
||||
// Works for Intel GPUs
|
||||
// https://patchwork.kernel.org/project/intel-gfx/patch/1422039866-11572-3-git-send-email-ville.syrjala@linux.intel.com/
|
||||
@@ -238,12 +238,46 @@ static void pciDetectIntelSpecific(FFGPUResult* gpu, FFstrbuf* pciDir, FFstrbuf*
|
||||
|
||||
if (!drmKey) return;
|
||||
|
||||
if (ffStrbufEqualS(&gpu->driver, "xe"))
|
||||
const uint32_t pciDirLen = pciDir->length;
|
||||
|
||||
bool isXE = ffStrbufEqualS(&gpu->driver, "xe");
|
||||
if (isXE)
|
||||
ffStrbufAppendS(pciDir, "/tile0/gt0/freq0/max_freq");
|
||||
else
|
||||
ffStrbufAppendF(pciDir, "/drm/%s/gt_max_freq_mhz", drmKey);
|
||||
if (ffReadFileBuffer(pciDir->chars, buffer))
|
||||
gpu->frequency = (uint32_t) ffStrbufToUInt(buffer, 0);
|
||||
ffStrbufSubstrBefore(pciDir, pciDirLen);
|
||||
|
||||
if (options->temp)
|
||||
{
|
||||
ffStrbufAppendS(pciDir, "/hwmon/");
|
||||
FF_AUTO_CLOSE_DIR DIR* dirp = opendir(pciDir->chars);
|
||||
if (dirp)
|
||||
{
|
||||
struct dirent* entry;
|
||||
while ((entry = readdir(dirp)) != NULL)
|
||||
{
|
||||
if (entry->d_name[0] == '.') continue;
|
||||
|
||||
ffStrbufSubstrBefore(pciDir, pciDirLen + strlen("/hwmon/"));
|
||||
ffStrbufAppendS(pciDir, entry->d_name);
|
||||
// https://github.com/Syllo/nvtop/blob/73291884d926445e499d6b9b71cb7a9bdbc7c393/src/extract_gpuinfo_intel.c#L279-L281
|
||||
ffStrbufAppendS(pciDir, isXE ? "/temp2_input" : "/temp1_input");
|
||||
|
||||
if (ffReadFileBuffer(pciDir->chars, buffer))
|
||||
{
|
||||
uint64_t value = ffStrbufToUInt(buffer, 0);
|
||||
if (value > 0)
|
||||
{
|
||||
gpu->temperature = (double) value / 1000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
ffStrbufSubstrBefore(pciDir, pciDirLen);
|
||||
}
|
||||
}
|
||||
|
||||
static inline int popcountBytes(uint8_t* bytes, uint32_t length)
|
||||
@@ -500,7 +534,7 @@ static const char* detectPci(const FFGPUOptions* options, FFlist* gpus, FFstrbuf
|
||||
}
|
||||
else if (gpu->vendor.chars == FF_GPU_VENDOR_NAME_INTEL)
|
||||
{
|
||||
pciDetectIntelSpecific(gpu, deviceDir, buffer, drmKey);
|
||||
pciDetectIntelSpecific(options, gpu, deviceDir, buffer, drmKey);
|
||||
ffStrbufSubstrBefore(deviceDir, drmDirPathLength);
|
||||
if (options->driverSpecific && drmKey)
|
||||
drmDetectIntelSpecific(gpu, drmKey, buffer);
|
||||
|
||||
@@ -4,60 +4,46 @@
|
||||
#include "common/netif/netif.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
#include <net/if.h>
|
||||
|
||||
static void getData(FFstrbuf* buffer, const char* ifName, bool isDefaultRoute, FFstrbuf* path, FFlist* result)
|
||||
static void getData(FFstrbuf* buffer, const char* ifName, bool isDefaultRoute, int basefd, FFlist* result)
|
||||
{
|
||||
ffStrbufSetF(path, "/sys/class/net/%s/operstate", ifName);
|
||||
if(!ffReadFileBuffer(path->chars, buffer) || !ffStrbufEqualS(buffer, "up\n"))
|
||||
FF_AUTO_CLOSE_FD int dfd = openat(basefd, ifName, O_RDONLY | O_DIRECTORY);
|
||||
if (dfd < 0)
|
||||
return;
|
||||
|
||||
char operstate;
|
||||
if(!ffReadFileDataRelative(dfd, "operstate", 1, &operstate) || operstate != 'u' /* up or unknown */)
|
||||
return;
|
||||
|
||||
FFNetIOResult* counters = (FFNetIOResult*) ffListAdd(result);
|
||||
ffStrbufInitS(&counters->name, ifName);
|
||||
counters->defaultRoute = isDefaultRoute;
|
||||
|
||||
ffStrbufSetF(path, "/sys/class/net/%s/statistics/", ifName);
|
||||
uint32_t statLen = path->length;
|
||||
|
||||
ffStrbufAppendS(path, "rx_bytes");
|
||||
if (ffReadFileBuffer(path->chars, buffer))
|
||||
if (ffReadFileBufferRelative(dfd, "statistics/rx_bytes", buffer))
|
||||
counters->rxBytes = ffStrbufToUInt(buffer, 0);
|
||||
ffStrbufSubstrBefore(path, statLen);
|
||||
|
||||
ffStrbufAppendS(path, "tx_bytes");
|
||||
if (ffReadFileBuffer(path->chars, buffer))
|
||||
if (ffReadFileBufferRelative(dfd, "statistics/tx_bytes", buffer))
|
||||
counters->txBytes = ffStrbufToUInt(buffer, 0);
|
||||
ffStrbufSubstrBefore(path, statLen);
|
||||
|
||||
ffStrbufAppendS(path, "rx_packets");
|
||||
if (ffReadFileBuffer(path->chars, buffer))
|
||||
if (ffReadFileBufferRelative(dfd, "statistics/rx_packets", buffer))
|
||||
counters->rxPackets = ffStrbufToUInt(buffer, 0);
|
||||
ffStrbufSubstrBefore(path, statLen);
|
||||
|
||||
ffStrbufAppendS(path, "tx_packets");
|
||||
if (ffReadFileBuffer(path->chars, buffer))
|
||||
if (ffReadFileBufferRelative(dfd, "statistics/tx_packets", buffer))
|
||||
counters->txPackets = ffStrbufToUInt(buffer, 0);
|
||||
ffStrbufSubstrBefore(path, statLen);
|
||||
|
||||
ffStrbufAppendS(path, "rx_errors");
|
||||
if (ffReadFileBuffer(path->chars, buffer))
|
||||
if (ffReadFileBufferRelative(dfd, "statistics/rx_errors", buffer))
|
||||
counters->rxErrors = ffStrbufToUInt(buffer, 0);
|
||||
ffStrbufSubstrBefore(path, statLen);
|
||||
|
||||
ffStrbufAppendS(path, "tx_errors");
|
||||
if (ffReadFileBuffer(path->chars, buffer))
|
||||
if (ffReadFileBufferRelative(dfd, "statistics/tx_errors", buffer))
|
||||
counters->txErrors = ffStrbufToUInt(buffer, 0);
|
||||
ffStrbufSubstrBefore(path, statLen);
|
||||
|
||||
ffStrbufAppendS(path, "rx_dropped");
|
||||
if (ffReadFileBuffer(path->chars, buffer))
|
||||
if (ffReadFileBufferRelative(dfd, "statistics/rx_dropped", buffer))
|
||||
counters->rxDrops = ffStrbufToUInt(buffer, 0);
|
||||
ffStrbufSubstrBefore(path, statLen);
|
||||
|
||||
ffStrbufAppendS(path, "tx_dropped");
|
||||
if (ffReadFileBuffer(path->chars, buffer))
|
||||
if (ffReadFileBufferRelative(dfd, "statistics/tx_dropped", buffer))
|
||||
counters->txDrops = ffStrbufToUInt(buffer, 0);
|
||||
ffStrbufSubstrBefore(path, statLen);
|
||||
}
|
||||
|
||||
const char* ffNetIOGetIoCounters(FFlist* result, FFNetIOOptions* options)
|
||||
@@ -65,7 +51,6 @@ const char* ffNetIOGetIoCounters(FFlist* result, FFNetIOOptions* options)
|
||||
FF_AUTO_CLOSE_DIR DIR* dirp = opendir("/sys/class/net");
|
||||
if (!dirp) return "opendir(\"/sys/class/net\") == NULL";
|
||||
|
||||
FF_STRBUF_AUTO_DESTROY path = ffStrbufCreateA(64);
|
||||
FF_STRBUF_AUTO_DESTROY buffer = ffStrbufCreate();
|
||||
|
||||
const char* defaultRouteIfName = ffNetifGetDefaultRouteIfName();
|
||||
@@ -75,7 +60,7 @@ const char* ffNetIOGetIoCounters(FFlist* result, FFNetIOOptions* options)
|
||||
if (options->namePrefix.length && strncmp(defaultRouteIfName, options->namePrefix.chars, options->namePrefix.length) != 0)
|
||||
return NULL;
|
||||
|
||||
getData(&buffer, defaultRouteIfName, true, &path, result);
|
||||
getData(&buffer, defaultRouteIfName, true, dirfd(dirp), result);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -89,7 +74,7 @@ const char* ffNetIOGetIoCounters(FFlist* result, FFNetIOOptions* options)
|
||||
if (options->namePrefix.length && strncmp(ifName, options->namePrefix.chars, options->namePrefix.length) != 0)
|
||||
continue;
|
||||
|
||||
getData(&buffer, ifName, ffStrEquals(ifName, defaultRouteIfName), &path, result);
|
||||
getData(&buffer, ifName, ffStrEquals(ifName, defaultRouteIfName), dirfd(dirp), result);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -40,6 +40,7 @@ typedef struct FFPackagesResult
|
||||
uint32_t rpm;
|
||||
uint32_t scoop;
|
||||
uint32_t snap;
|
||||
uint32_t soar;
|
||||
uint32_t sorcery;
|
||||
uint32_t winget;
|
||||
uint32_t xbps;
|
||||
|
||||
@@ -682,4 +682,7 @@ void ffDetectPackagesImpl(FFPackagesResult* result, FFPackagesOptions* options)
|
||||
|
||||
if (!(options->disabled & FF_PACKAGES_FLAG_AM_BIT))
|
||||
result->amUser = getAMUser();
|
||||
|
||||
if (!(options->disabled & FF_PACKAGES_FLAG_SOAR_BIT))
|
||||
result->soar += getSQLite3Int(&baseDir, ".local/share/soar/db/soar.db", "SELECT COUNT(DISTINCT pkg_id || pkg_name) FROM packages WHERE is_installed = true", "soar");
|
||||
}
|
||||
|
||||
@@ -78,10 +78,18 @@ static void parsePhysicalDisk(int dfd, const char* devName, FFPhysicalDiskOption
|
||||
ffStrbufInitMove(&device->name, &name);
|
||||
ffStrbufInitF(&device->devPath, "/dev/%s", devName);
|
||||
|
||||
bool isVirtual = false;
|
||||
{
|
||||
ffStrbufInit(&device->interconnect);
|
||||
if (ffStrStartsWith(devName, "nvme"))
|
||||
ffStrbufSetStatic(&device->interconnect, "NVMe");
|
||||
else if (ffStrStartsWith(devName, "mmcblk"))
|
||||
ffStrbufSetStatic(&device->interconnect, "MMC");
|
||||
else if (ffStrStartsWith(devName, "md"))
|
||||
{
|
||||
ffStrbufSetStatic(&device->interconnect, "RAID");
|
||||
isVirtual = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
char pathSysDeviceLink[64];
|
||||
@@ -97,6 +105,8 @@ static void parsePhysicalDisk(int dfd, const char* devName, FFPhysicalDiskOption
|
||||
ffStrbufSetStatic(&device->interconnect, "SCSI");
|
||||
else if (strstr(pathSysDeviceReal, "/nvme") != NULL)
|
||||
ffStrbufSetStatic(&device->interconnect, "NVMe");
|
||||
else if (strstr(pathSysDeviceReal, "/virtio") != NULL)
|
||||
ffStrbufSetStatic(&device->interconnect, "Virtual");
|
||||
else
|
||||
{
|
||||
if (ffAppendFileBufferRelative(devfd, "transport", &device->interconnect))
|
||||
@@ -106,6 +116,7 @@ static void parsePhysicalDisk(int dfd, const char* devName, FFPhysicalDiskOption
|
||||
}
|
||||
}
|
||||
|
||||
if (!isVirtual)
|
||||
{
|
||||
char isRotationalChar = '1';
|
||||
if (ffReadFileDataRelative(dfd, "queue/rotational", 1, &isRotationalChar) > 0)
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
#include "uptime.h"
|
||||
#include "common/time.h"
|
||||
|
||||
#include <sysinfoapi.h>
|
||||
#include <realtimeapiset.h>
|
||||
|
||||
const char* ffDetectUptime(FFUptimeResult* result)
|
||||
{
|
||||
result->uptime = GetTickCount64();
|
||||
// According to MSDN, this function only fails if it's called with NULL
|
||||
QueryUnbiasedInterruptTime(&result->uptime);
|
||||
result->uptime /= 10000; // Convert from 100-nanosecond intervals to milliseconds
|
||||
result->bootTime = ffTimeGetNow() - result->uptime;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
@@ -2,15 +2,11 @@
|
||||
#include "common/io/io.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <net/if_media.h>
|
||||
#include <net80211/ieee80211_ioctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
const char* ffDetectWifi(FFlist* result)
|
||||
{
|
||||
|
||||
@@ -0,0 +1,111 @@
|
||||
#include "wifi.h"
|
||||
#include "common/io/io.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#include <net80211/ieee80211.h>
|
||||
#include <net80211/ieee80211_ioctl.h>
|
||||
#include <unistd.h>
|
||||
|
||||
const char* ffDetectWifi(FFlist* result)
|
||||
{
|
||||
struct if_nameindex* infs = if_nameindex();
|
||||
if(!infs) {
|
||||
return "if_nameindex() failed";
|
||||
}
|
||||
|
||||
FF_AUTO_CLOSE_FD int sock = socket(AF_INET, SOCK_DGRAM, 0);
|
||||
if(sock < 0) {
|
||||
return "socket() failed";
|
||||
}
|
||||
|
||||
for(struct if_nameindex* i = infs; !(i->if_index == 0 && i->if_name == NULL); ++i)
|
||||
{
|
||||
if (!ffStrStartsWith(i->if_name, "iwm")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
FFWifiResult* item = (FFWifiResult*) ffListAdd(result);
|
||||
ffStrbufInitS(&item->inf.description, i->if_name);
|
||||
ffStrbufInit(&item->inf.status);
|
||||
ffStrbufInit(&item->conn.status);
|
||||
ffStrbufInit(&item->conn.ssid);
|
||||
ffStrbufInit(&item->conn.bssid);
|
||||
ffStrbufInit(&item->conn.protocol);
|
||||
ffStrbufInit(&item->conn.security);
|
||||
item->conn.signalQuality = 0.0/0.0;
|
||||
item->conn.rxRate = 0.0/0.0;
|
||||
item->conn.txRate = 0.0/0.0;
|
||||
item->conn.channel = 0;
|
||||
item->conn.frequency = 0;
|
||||
|
||||
struct ieee80211_nodereq nr = {};
|
||||
strlcpy(nr.nr_ifname, i->if_name, sizeof(nr.nr_ifname));
|
||||
|
||||
struct ifreq ifr = {};
|
||||
strlcpy(ifr.ifr_name, i->if_name, sizeof(ifr.ifr_name));
|
||||
if (ioctl(sock, SIOCGIFFLAGS, &ifr) < 0) {
|
||||
ffStrbufSetStatic(&item->inf.status, "Unknown");
|
||||
} else {
|
||||
ffStrbufSetStatic(&item->inf.status, ifr.ifr_flags & IFF_UP ? "Up" : "Down");
|
||||
}
|
||||
|
||||
if (ioctl(sock, SIOCG80211NODE, &nr) < 0) {
|
||||
ffStrbufSetStatic(&item->conn.status, "Not associated");
|
||||
continue;
|
||||
}
|
||||
|
||||
if (nr.nr_nwid_len > 0) {
|
||||
ffStrbufSetStatic(&item->conn.status, "Associated");
|
||||
ffStrbufAppendNS(&item->conn.ssid, nr.nr_nwid_len, (char*)nr.nr_nwid);
|
||||
} else {
|
||||
ffStrbufSetStatic(&item->conn.status, "Not associated");
|
||||
continue;
|
||||
}
|
||||
|
||||
ffStrbufSetF(&item->conn.bssid, "%02X:%02X:%02X:%02X:%02X:%02X",
|
||||
nr.nr_bssid[0], nr.nr_bssid[1], nr.nr_bssid[2],
|
||||
nr.nr_bssid[3], nr.nr_bssid[4], nr.nr_bssid[5]);
|
||||
|
||||
item->conn.channel = nr.nr_channel;
|
||||
|
||||
if (nr.nr_max_rssi) {
|
||||
item->conn.signalQuality = ((float)nr.nr_rssi / nr.nr_max_rssi) * 100.0;
|
||||
}
|
||||
|
||||
if (nr.nr_flags & IEEE80211_NODEREQ_HT) {
|
||||
ffStrbufSetStatic(&item->conn.protocol, "802.11n (Wi-Fi 4)");
|
||||
} else if (nr.nr_flags & IEEE80211_NODEREQ_VHT) {
|
||||
ffStrbufSetStatic(&item->conn.protocol, "802.11ac (Wi-Fi 5)");
|
||||
} else if (nr.nr_chan_flags & IEEE80211_CHANINFO_5GHZ) {
|
||||
ffStrbufSetStatic(&item->conn.protocol, "802.11a");
|
||||
} else if (nr.nr_chan_flags & IEEE80211_CHANINFO_2GHZ) {
|
||||
ffStrbufSetStatic(&item->conn.protocol, "802.11g");
|
||||
}
|
||||
|
||||
struct ieee80211_wpaparams wpa = {};
|
||||
strlcpy(wpa.i_name, i->if_name, sizeof(wpa.i_name));
|
||||
|
||||
if (ioctl(sock, SIOCG80211WPAPARMS, &wpa) >= 0 && wpa.i_enabled) {
|
||||
if (wpa.i_protos & IEEE80211_WPA_PROTO_WPA2)
|
||||
ffStrbufSetStatic(&item->conn.security, "WPA2");
|
||||
else if (wpa.i_protos & IEEE80211_WPA_PROTO_WPA1)
|
||||
ffStrbufSetStatic(&item->conn.security, "WPA");
|
||||
} else {
|
||||
struct ieee80211_nwkey nwkey = {};
|
||||
strlcpy(nwkey.i_name, i->if_name, sizeof(nwkey.i_name));
|
||||
|
||||
if (ioctl(sock, SIOCG80211NWKEY, &nwkey) >= 0) {
|
||||
if (nwkey.i_wepon)
|
||||
ffStrbufSetStatic(&item->conn.security, "WEP");
|
||||
else
|
||||
ffStrbufSetStatic(&item->conn.security, "Open");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if_freenameindex(infs);
|
||||
return NULL;
|
||||
}
|
||||
@@ -38,6 +38,7 @@ static const char* getHyprland(FFstrbuf* result)
|
||||
{
|
||||
ffStrbufSubstrAfterFirstC(result, '"');
|
||||
ffStrbufSubstrBeforeFirstC(result, '"');
|
||||
ffStrbufTrimLeft(result, 'v');
|
||||
FF_DEBUG("Extracted version from version.h: %s", result->chars);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+43
-44
@@ -1,9 +1,11 @@
|
||||
#include "fastfetch.h"
|
||||
#include "common/commandoption.h"
|
||||
#include "common/init.h"
|
||||
#include "common/io/io.h"
|
||||
#include "common/jsonconfig.h"
|
||||
#include "common/printing.h"
|
||||
#include "detection/version/version.h"
|
||||
#include "logo/logo.h"
|
||||
#include "util/stringUtils.h"
|
||||
#include "util/mallocHelper.h"
|
||||
#include "fastfetch_datatext.h"
|
||||
@@ -36,7 +38,7 @@ static void printCommandFormatHelpJson(void)
|
||||
yyjson_mut_val* obj = yyjson_mut_obj(doc);
|
||||
if (yyjson_mut_obj_add(root, yyjson_mut_strbuf(doc, &type), obj))
|
||||
{
|
||||
FF_STRBUF_AUTO_DESTROY content = ffStrbufCreateF("Output format of the module `%s`. See `-h format` for formatting syntax\n", baseInfo->name);
|
||||
FF_STRBUF_AUTO_DESTROY content = ffStrbufCreateF("Output format of the module `%s`. See Wiki for formatting syntax\n", baseInfo->name);
|
||||
for (unsigned i = 0; i < baseInfo->formatArgs.count; i++)
|
||||
{
|
||||
const FFModuleFormatArg* arg = &baseInfo->formatArgs.args[i];
|
||||
@@ -180,7 +182,11 @@ static void printFullHelp()
|
||||
}
|
||||
yyjson_doc_free(doc);
|
||||
|
||||
puts("\n" FASTFETCH_DATATEXT_HELP_FOOTER);
|
||||
puts("\n\
|
||||
Parsing is not case sensitive. E.g. `--print-logos` is equal to `--Print-Logos`\n\
|
||||
If a value starts with a ?, it is optional. An optional boolean value defaults to true if not specified.\n\
|
||||
More detailed help messages for each options can be printed with `-h <option_without_dash_prefix>`\n\
|
||||
All options can be made permanent with command `fastfetch <options> --gen-config`");
|
||||
}
|
||||
|
||||
static bool printSpecificCommandHelp(const char* command)
|
||||
@@ -298,10 +304,6 @@ static void printCommandHelp(const char* command)
|
||||
{
|
||||
if(command == NULL)
|
||||
printFullHelp();
|
||||
else if(ffStrEqualsIgnCase(command, "color"))
|
||||
puts(FASTFETCH_DATATEXT_HELP_COLOR);
|
||||
else if(ffStrEqualsIgnCase(command, "format"))
|
||||
puts(FASTFETCH_DATATEXT_HELP_FORMAT);
|
||||
else if(ffStrEqualsIgnCase(command, "format-json"))
|
||||
printCommandFormatHelpJson();
|
||||
else if(ffCharIsEnglishAlphabet(command[0]) && ffStrEndsWithIgnCase(command, "-format")) // <module>-format
|
||||
@@ -374,13 +376,13 @@ static void listModules(bool pretty)
|
||||
}
|
||||
}
|
||||
|
||||
static bool parseJsoncFile(const char* path)
|
||||
static bool parseJsoncFile(const char* path, bool strictJson)
|
||||
{
|
||||
assert(!instance.state.configDoc);
|
||||
|
||||
{
|
||||
yyjson_read_err error;
|
||||
instance.state.configDoc = yyjson_read_file(path, YYJSON_READ_ALLOW_COMMENTS | YYJSON_READ_ALLOW_TRAILING_COMMAS, NULL, &error);
|
||||
instance.state.configDoc = yyjson_read_file(path, strictJson ? 0 : YYJSON_READ_ALLOW_COMMENTS | YYJSON_READ_ALLOW_TRAILING_COMMAS, NULL, &error);
|
||||
if (!instance.state.configDoc)
|
||||
{
|
||||
if (error.code != YYJSON_READ_ERROR_FILE_OPEN)
|
||||
@@ -452,57 +454,54 @@ static void optionParseConfigFile(FFdata* data, const char* key, const char* val
|
||||
fprintf(stderr, "Error: usage: %s <config>\n", key);
|
||||
exit(413);
|
||||
}
|
||||
uint32_t fileNameLen = (uint32_t) strlen(value);
|
||||
if(fileNameLen == 0)
|
||||
{
|
||||
fprintf(stderr, "Error: usage: %s <config>\n", key);
|
||||
exit(413);
|
||||
}
|
||||
|
||||
if (ffStrEqualsIgnCase(value, "none"))
|
||||
if (value[0] == '\0' || ffStrEqualsIgnCase(value, "none"))
|
||||
return;
|
||||
|
||||
if (ffStrEndsWithIgnCase(value, ".conf"))
|
||||
{
|
||||
fprintf(stderr, "Error: flag based config files are no longer not supported: %s\n", value);
|
||||
exit(414);
|
||||
}
|
||||
|
||||
//Try to load as an absolute path
|
||||
|
||||
if (parseJsoncFile(value)) return;
|
||||
FF_STRBUF_AUTO_DESTROY absolutePath = ffStrbufCreateS(value);
|
||||
bool strictJson = ffStrbufEndsWithIgnCaseS(&absolutePath, ".json");
|
||||
bool needExtension = !strictJson && !ffStrbufEndsWithIgnCaseS(&absolutePath, ".jsonc");
|
||||
if (needExtension)
|
||||
ffStrbufAppendS(&absolutePath, ".jsonc");
|
||||
|
||||
FF_STRBUF_AUTO_DESTROY absolutePath = ffStrbufCreateA(128);
|
||||
|
||||
//Try to load as a relative path with the directory of fastfetch binary
|
||||
if (instance.state.platform.exePath.length)
|
||||
{
|
||||
ffStrbufSet(&absolutePath, &instance.state.platform.exePath);
|
||||
ffStrbufSubstrBeforeLastC(&absolutePath, '/');
|
||||
ffStrbufAppendS(&absolutePath, "/");
|
||||
ffStrbufAppendS(&absolutePath, value);
|
||||
|
||||
if (parseJsoncFile(absolutePath.chars)) return;
|
||||
ffStrbufClear(&absolutePath);
|
||||
}
|
||||
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
|
||||
|
||||
//Try to load as a relative path
|
||||
|
||||
FF_LIST_FOR_EACH(FFstrbuf, path, instance.state.platform.dataDirs)
|
||||
{
|
||||
//We need to copy it, because if a config file loads a config file, the value of path must be unchanged
|
||||
ffStrbufSet(&absolutePath, path);
|
||||
ffStrbufAppendS(&absolutePath, "fastfetch/presets/");
|
||||
ffStrbufAppendS(&absolutePath, value);
|
||||
|
||||
bool success = parseJsoncFile(absolutePath.chars);
|
||||
if (!success)
|
||||
{
|
||||
if (needExtension)
|
||||
ffStrbufAppendS(&absolutePath, ".jsonc");
|
||||
success = parseJsoncFile(absolutePath.chars);
|
||||
}
|
||||
|
||||
if (success) return;
|
||||
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
|
||||
}
|
||||
|
||||
//Try to load as a relative path with the directory of fastfetch binary
|
||||
|
||||
if (instance.state.platform.exePath.length)
|
||||
{
|
||||
uint32_t lastSlash = ffStrbufLastIndexC(&instance.state.platform.exePath, '/') + 1;
|
||||
assert(lastSlash < instance.state.platform.exePath.length);
|
||||
|
||||
// Try {exePath}/
|
||||
ffStrbufSetNS(&absolutePath, lastSlash, instance.state.platform.exePath.chars);
|
||||
ffStrbufAppendS(&absolutePath, value);
|
||||
if (needExtension)
|
||||
ffStrbufAppendS(&absolutePath, ".jsonc");
|
||||
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
|
||||
|
||||
// Try {exePath}/presets/
|
||||
ffStrbufSubstrBefore(&absolutePath, lastSlash);
|
||||
ffStrbufAppendS(&absolutePath, "presets/");
|
||||
ffStrbufAppendS(&absolutePath, value);
|
||||
if (needExtension)
|
||||
ffStrbufAppendS(&absolutePath, ".jsonc");
|
||||
if (parseJsoncFile(absolutePath.chars, strictJson)) return;
|
||||
}
|
||||
|
||||
//File not found
|
||||
@@ -665,7 +664,7 @@ static void parseConfigFiles(void)
|
||||
uint32_t dirLength = dir->length;
|
||||
|
||||
ffStrbufAppendS(dir, "fastfetch/config.jsonc");
|
||||
bool success = parseJsoncFile(dir->chars);
|
||||
bool success = parseJsoncFile(dir->chars, false);
|
||||
ffStrbufSubstrBefore(dir, dirLength);
|
||||
if (success) return;
|
||||
}
|
||||
|
||||
@@ -63,27 +63,3 @@ typedef struct FFinstance
|
||||
} FFinstance;
|
||||
extern FFinstance instance; // Defined in `common/init.c`
|
||||
extern FFModuleBaseInfo** ffModuleInfos[];
|
||||
|
||||
//////////////////////
|
||||
// Init functions //
|
||||
//////////////////////
|
||||
|
||||
//common/init.c
|
||||
void ffInitInstance();
|
||||
void ffStart();
|
||||
void ffFinish();
|
||||
void ffDestroyInstance();
|
||||
|
||||
void ffListFeatures();
|
||||
|
||||
////////////////////
|
||||
// Logo functions //
|
||||
////////////////////
|
||||
|
||||
void ffLogoPrint();
|
||||
void ffLogoPrintRemaining();
|
||||
void ffLogoPrintLine();
|
||||
|
||||
void ffLogoBuiltinPrint();
|
||||
void ffLogoBuiltinList();
|
||||
void ffLogoBuiltinListAutocompletion();
|
||||
|
||||
@@ -2,7 +2,3 @@
|
||||
|
||||
#define FASTFETCH_DATATEXT_JSON_HELP @DATATEXT_JSON_HELP@
|
||||
#define FASTFETCH_DATATEXT_STRUCTURE @DATATEXT_STRUCTURE@
|
||||
#define FASTFETCH_DATATEXT_HELP_FOOTER @DATATEXT_HELP_FOOTER@
|
||||
#define FASTFETCH_DATATEXT_HELP_COLOR @DATATEXT_HELP_COLOR@
|
||||
#define FASTFETCH_DATATEXT_HELP_FORMAT @DATATEXT_HELP_FORMAT@
|
||||
#define FASTFETCH_DATATEXT_HELP_CONFIG @DATATEXT_HELP_CONFIG@
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "fastfetch.h"
|
||||
|
||||
#include "common/init.h"
|
||||
#include "modules/modules.h"
|
||||
|
||||
int main(void)
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
.:::::::::::::::::::::.
|
||||
.:::::::::::::::::::::::.
|
||||
.:::::::::::::::::::::::::.
|
||||
.:::::::::::::::::::::::::::.
|
||||
.:::::::::$2,db,$1::::::::::::::::.
|
||||
.::::::::$2,d%%%%b,$1::$2,db,$1:::::::::.
|
||||
.:::::::$2,%%%%P'%%%b,d%%%b,$1::::::::.
|
||||
.::::::$2,%%%%P,$1:::$2`%%%b'^q%%b,$1:::::::.
|
||||
'::::$2,%%%%P,d|$1:::::$2`%%%b:'^%%b,$1:::::'
|
||||
'::$2`%%%'$1:$2'q$|$1:::::::$2'q%%b'`q%%b'$1::'
|
||||
':::::::::::::::::::::::::::::::'
|
||||
':::::::::::::::::::::::::::::'
|
||||
':::::::::::::::::::::::::::'
|
||||
':::::::::::::::::::::::::'
|
||||
':::::::::::::::::::::::'
|
||||
':::::::::::::::::::::'
|
||||
@@ -0,0 +1,6 @@
|
||||
,db,
|
||||
,d%%%%b, ,db,
|
||||
,%%%%P'%%%b,d%%%b,
|
||||
,%%%%P, `%%%b'^q%%b,
|
||||
,%%%%P,d| `%%%b '^%%b,
|
||||
`%%%' 'q$| 'q%%b'`q%%b
|
||||
@@ -0,0 +1,19 @@
|
||||
$1+++++++++++
|
||||
+++++++++++++++++++++
|
||||
+++++++++++++++++++++++++++++++
|
||||
=+++++++++++++++++++++++++++++++++++++++=
|
||||
+++++++++++++++++++++++++++++++++++++++++++++
|
||||
=++++++++++++++++++++++++++++++++++++++++++++
|
||||
==+++++++++++++++++++++++++++++++++==
|
||||
+++++++++++++++++++++++++++
|
||||
$2**** $1++=+++++++++++=++ $2****
|
||||
********** $1+++++++ $2**********
|
||||
************** **************
|
||||
**************** ****************
|
||||
***********************
|
||||
****** ************* ******
|
||||
*********** *** ***********
|
||||
*************** ***************
|
||||
*************** ***************
|
||||
*********************
|
||||
***********
|
||||
+35
-1
@@ -89,6 +89,18 @@ static const FFlogo A[] = {
|
||||
.colorKeys = FF_COLOR_FG_MAGENTA,
|
||||
.colorTitle = FF_COLOR_FG_BLUE,
|
||||
},
|
||||
// Alpine2
|
||||
{
|
||||
.names = {"Alpine2"},
|
||||
.lines = FASTFETCH_DATATEXT_LOGO_ALPINE2,
|
||||
.type = FF_LOGO_LINE_TYPE_ALTER_BIT,
|
||||
.colors = {
|
||||
FF_COLOR_FG_BLUE,
|
||||
FF_COLOR_FG_WHITE,
|
||||
},
|
||||
.colorKeys = FF_COLOR_FG_BLUE,
|
||||
.colorTitle = FF_COLOR_FG_BLUE,
|
||||
},
|
||||
// AlpineSmall
|
||||
{
|
||||
.names = {"Alpine_small"},
|
||||
@@ -113,6 +125,17 @@ static const FFlogo A[] = {
|
||||
.colorKeys = FF_COLOR_FG_MAGENTA,
|
||||
.colorTitle = FF_COLOR_FG_BLUE,
|
||||
},
|
||||
// Alpine3Small
|
||||
{
|
||||
.names = {"alpine3_small"},
|
||||
.type = FF_LOGO_LINE_TYPE_SMALL_BIT | FF_LOGO_LINE_TYPE_ALTER_BIT,
|
||||
.lines = FASTFETCH_DATATEXT_LOGO_ALPINE3_SMALL,
|
||||
.colors = {
|
||||
FF_COLOR_FG_WHITE,
|
||||
},
|
||||
.colorKeys = FF_COLOR_FG_BLUE,
|
||||
.colorTitle = FF_COLOR_FG_BLUE,
|
||||
},
|
||||
// Alter
|
||||
{
|
||||
.names = {"Alter"},
|
||||
@@ -197,6 +220,17 @@ static const FFlogo A[] = {
|
||||
.colorKeys = FF_COLOR_FG_GREEN,
|
||||
.colorTitle = FF_COLOR_FG_GREEN,
|
||||
},
|
||||
//AnduinOS
|
||||
{
|
||||
.names = {"anduinos"},
|
||||
.lines = FASTFETCH_DATATEXT_LOGO_ANDUINOS,
|
||||
.colors = {
|
||||
FF_COLOR_FG_CYAN,
|
||||
FF_COLOR_FG_BLUE,
|
||||
},
|
||||
.colorKeys = FF_COLOR_FG_BLUE,
|
||||
.colorTitle = FF_COLOR_FG_WHITE,
|
||||
},
|
||||
// Antergos
|
||||
{
|
||||
.names = {"Antergos"},
|
||||
@@ -2365,7 +2399,7 @@ static const FFlogo K[] = {
|
||||
},
|
||||
// KDE Neon
|
||||
{
|
||||
.names = {"KDE Neon"}, // Distro ID is `neon`; Distro name is `KDE Neon`
|
||||
.names = {"KDE Neon"}, // Distro ID is "neon"; Distro name is "KDE Neon"
|
||||
.lines = FASTFETCH_DATATEXT_LOGO_KDENEON,
|
||||
.colors = {
|
||||
FF_COLOR_FG_GREEN,
|
||||
|
||||
+7
-1
@@ -626,7 +626,13 @@ void ffLogoPrint(void)
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "konsole") ||
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "wezterm") ||
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "wayst") ||
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "ghostty");
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "ghostty") ||
|
||||
#ifdef __APPLE__
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "WarpTerminal") ||
|
||||
#else
|
||||
ffStrbufIgnCaseEqualS(&terminal->processName, "warp") ||
|
||||
#endif
|
||||
false;
|
||||
|
||||
//Try to load the logo as an image. If it succeeds, print it and return.
|
||||
if(logoPrintImageIfExists(supportsKitty ? FF_LOGO_TYPE_IMAGE_KITTY : FF_LOGO_TYPE_IMAGE_CHAFA, false))
|
||||
|
||||
@@ -21,7 +21,13 @@ typedef struct FFlogo
|
||||
} FFlogo;
|
||||
|
||||
//logo.c
|
||||
void ffLogoPrint(void);
|
||||
void ffLogoPrintChars(const char* data, bool doColorReplacement);
|
||||
void ffLogoPrintLine(void);
|
||||
void ffLogoPrintRemaining(void);
|
||||
void ffLogoBuiltinPrint(void);
|
||||
void ffLogoBuiltinList(void);
|
||||
void ffLogoBuiltinListAutocompletion(void);
|
||||
|
||||
//builtin.c
|
||||
extern const FFlogo* ffLogoBuiltins[];
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "common/printing.h"
|
||||
#include "logo/logo.h"
|
||||
#include "modules/break/break.h"
|
||||
|
||||
void ffPrintBreak(FF_MAYBE_UNUSED FFBreakOptions* options)
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#include "common/printing.h"
|
||||
#include "common/jsonconfig.h"
|
||||
#include "util/textModifier.h"
|
||||
#include "logo/logo.h"
|
||||
#include "modules/colors/colors.h"
|
||||
#include "util/textModifier.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
static inline uint8_t min(uint8_t a, uint8_t b)
|
||||
|
||||
@@ -7,40 +7,41 @@
|
||||
typedef enum __attribute__((__packed__)) FFPackagesFlags
|
||||
{
|
||||
FF_PACKAGES_FLAG_NONE = 0,
|
||||
FF_PACKAGES_FLAG_APK_BIT = 1 << 0,
|
||||
FF_PACKAGES_FLAG_BREW_BIT = 1 << 1,
|
||||
FF_PACKAGES_FLAG_CHOCO_BIT = 1 << 2,
|
||||
FF_PACKAGES_FLAG_DPKG_BIT = 1 << 3,
|
||||
FF_PACKAGES_FLAG_EMERGE_BIT = 1 << 4,
|
||||
FF_PACKAGES_FLAG_EOPKG_BIT = 1 << 5,
|
||||
FF_PACKAGES_FLAG_FLATPAK_BIT = 1 << 6,
|
||||
FF_PACKAGES_FLAG_NIX_BIT = 1 << 7,
|
||||
FF_PACKAGES_FLAG_OPKG_BIT = 1 << 8,
|
||||
FF_PACKAGES_FLAG_PACMAN_BIT = 1 << 9,
|
||||
FF_PACKAGES_FLAG_PALUDIS_BIT = 1 << 10,
|
||||
FF_PACKAGES_FLAG_PKG_BIT = 1 << 11,
|
||||
FF_PACKAGES_FLAG_PKGTOOL_BIT = 1 << 12,
|
||||
FF_PACKAGES_FLAG_MACPORTS_BIT = 1 << 13,
|
||||
FF_PACKAGES_FLAG_RPM_BIT = 1 << 14,
|
||||
FF_PACKAGES_FLAG_SCOOP_BIT = 1 << 15,
|
||||
FF_PACKAGES_FLAG_SNAP_BIT = 1 << 16,
|
||||
FF_PACKAGES_FLAG_WINGET_BIT = 1 << 17,
|
||||
FF_PACKAGES_FLAG_XBPS_BIT = 1 << 18,
|
||||
FF_PACKAGES_FLAG_AM_BIT = 1 << 19,
|
||||
FF_PACKAGES_FLAG_SORCERY_BIT = 1 << 20,
|
||||
FF_PACKAGES_FLAG_LPKG_BIT = 1 << 21,
|
||||
FF_PACKAGES_FLAG_LPKGBUILD_BIT = 1 << 22,
|
||||
FF_PACKAGES_FLAG_GUIX_BIT = 1 << 23,
|
||||
FF_PACKAGES_FLAG_LINGLONG_BIT = 1 << 24,
|
||||
FF_PACKAGES_FLAG_PACSTALL_BIT = 1 << 25,
|
||||
FF_PACKAGES_FLAG_MPORT_BIT = 1 << 26,
|
||||
FF_PACKAGES_FLAG_QI_BIT = 1 << 27,
|
||||
FF_PACKAGES_FLAG_PKGSRC_BIT = 1 << 28,
|
||||
FF_PACKAGES_FLAG_HPKG_BIT = 1 << 29,
|
||||
FF_PACKAGES_FLAG_PISI_BIT = 1 << 30,
|
||||
FF_PACKAGES_FLAG_FORCE_UNSIGNED = UINT32_MAX,
|
||||
FF_PACKAGES_FLAG_APK_BIT = 1ULL << 0,
|
||||
FF_PACKAGES_FLAG_BREW_BIT = 1ULL << 1,
|
||||
FF_PACKAGES_FLAG_CHOCO_BIT = 1ULL << 2,
|
||||
FF_PACKAGES_FLAG_DPKG_BIT = 1ULL << 3,
|
||||
FF_PACKAGES_FLAG_EMERGE_BIT = 1ULL << 4,
|
||||
FF_PACKAGES_FLAG_EOPKG_BIT = 1ULL << 5,
|
||||
FF_PACKAGES_FLAG_FLATPAK_BIT = 1ULL << 6,
|
||||
FF_PACKAGES_FLAG_NIX_BIT = 1ULL << 7,
|
||||
FF_PACKAGES_FLAG_OPKG_BIT = 1ULL << 8,
|
||||
FF_PACKAGES_FLAG_PACMAN_BIT = 1ULL << 9,
|
||||
FF_PACKAGES_FLAG_PALUDIS_BIT = 1ULL << 10,
|
||||
FF_PACKAGES_FLAG_PKG_BIT = 1ULL << 11,
|
||||
FF_PACKAGES_FLAG_PKGTOOL_BIT = 1ULL << 12,
|
||||
FF_PACKAGES_FLAG_MACPORTS_BIT = 1ULL << 13,
|
||||
FF_PACKAGES_FLAG_RPM_BIT = 1ULL << 14,
|
||||
FF_PACKAGES_FLAG_SCOOP_BIT = 1ULL << 15,
|
||||
FF_PACKAGES_FLAG_SNAP_BIT = 1ULL << 16,
|
||||
FF_PACKAGES_FLAG_WINGET_BIT = 1ULL << 17,
|
||||
FF_PACKAGES_FLAG_XBPS_BIT = 1ULL << 18,
|
||||
FF_PACKAGES_FLAG_AM_BIT = 1ULL << 19,
|
||||
FF_PACKAGES_FLAG_SORCERY_BIT = 1ULL << 20,
|
||||
FF_PACKAGES_FLAG_LPKG_BIT = 1ULL << 21,
|
||||
FF_PACKAGES_FLAG_LPKGBUILD_BIT = 1ULL << 22,
|
||||
FF_PACKAGES_FLAG_GUIX_BIT = 1ULL << 23,
|
||||
FF_PACKAGES_FLAG_LINGLONG_BIT = 1ULL << 24,
|
||||
FF_PACKAGES_FLAG_PACSTALL_BIT = 1ULL << 25,
|
||||
FF_PACKAGES_FLAG_MPORT_BIT = 1ULL << 26,
|
||||
FF_PACKAGES_FLAG_QI_BIT = 1ULL << 27,
|
||||
FF_PACKAGES_FLAG_PKGSRC_BIT = 1ULL << 28,
|
||||
FF_PACKAGES_FLAG_HPKG_BIT = 1ULL << 29,
|
||||
FF_PACKAGES_FLAG_PISI_BIT = 1ULL << 30,
|
||||
FF_PACKAGES_FLAG_SOAR_BIT = 1ULL << 31,
|
||||
FF_PACKAGES_FLAG_FORCE_UNSIGNED = UINT64_MAX,
|
||||
} FFPackagesFlags;
|
||||
static_assert(sizeof(FFPackagesFlags) == sizeof(uint32_t), "");
|
||||
static_assert(sizeof(FFPackagesFlags) == sizeof(uint64_t), "");
|
||||
|
||||
typedef struct FFPackagesOptions
|
||||
{
|
||||
|
||||
@@ -78,6 +78,7 @@ void ffPrintPackages(FFPackagesOptions* options)
|
||||
FF_PRINT_PACKAGE(mport)
|
||||
FF_PRINT_PACKAGE(qi)
|
||||
FF_PRINT_PACKAGE(pisi)
|
||||
FF_PRINT_PACKAGE(soar)
|
||||
|
||||
putchar('\n');
|
||||
}
|
||||
@@ -130,6 +131,7 @@ void ffPrintPackages(FFPackagesOptions* options)
|
||||
FF_FORMAT_ARG(counts.hpkgSystem, "hpkg-system"),
|
||||
FF_FORMAT_ARG(counts.hpkgUser, "hpkg-user"),
|
||||
FF_FORMAT_ARG(counts.pisi, "pisi"),
|
||||
FF_FORMAT_ARG(counts.soar, "soar"),
|
||||
FF_FORMAT_ARG(nixAll, "nix-all"),
|
||||
FF_FORMAT_ARG(flatpakAll, "flatpak-all"),
|
||||
FF_FORMAT_ARG(brewAll, "brew-all"),
|
||||
@@ -222,6 +224,7 @@ bool ffParsePackagesCommandOptions(FFPackagesOptions* options, const char* key,
|
||||
case 'S': if (false);
|
||||
FF_TEST_PACKAGE_NAME(SCOOP)
|
||||
FF_TEST_PACKAGE_NAME(SNAP)
|
||||
FF_TEST_PACKAGE_NAME(SOAR)
|
||||
FF_TEST_PACKAGE_NAME(SORCERY)
|
||||
break;
|
||||
case 'W': if (false);
|
||||
@@ -341,6 +344,7 @@ void ffParsePackagesJsonObject(FFPackagesOptions* options, yyjson_val* module)
|
||||
case 'S': if (false);
|
||||
FF_TEST_PACKAGE_NAME(SCOOP)
|
||||
FF_TEST_PACKAGE_NAME(SNAP)
|
||||
FF_TEST_PACKAGE_NAME(SOAR)
|
||||
FF_TEST_PACKAGE_NAME(SORCERY)
|
||||
break;
|
||||
case 'W': if (false);
|
||||
@@ -400,6 +404,7 @@ void ffGeneratePackagesJsonConfig(FFPackagesOptions* options, yyjson_mut_doc* do
|
||||
FF_TEST_PACKAGE_NAME(RPM)
|
||||
FF_TEST_PACKAGE_NAME(SCOOP)
|
||||
FF_TEST_PACKAGE_NAME(SNAP)
|
||||
FF_TEST_PACKAGE_NAME(SOAR)
|
||||
FF_TEST_PACKAGE_NAME(SORCERY)
|
||||
FF_TEST_PACKAGE_NAME(WINGET)
|
||||
FF_TEST_PACKAGE_NAME(XBPS)
|
||||
@@ -459,6 +464,7 @@ void ffGeneratePackagesJsonResult(FF_MAYBE_UNUSED FFPackagesOptions* options, yy
|
||||
FF_APPEND_PACKAGE_COUNT(rpm)
|
||||
FF_APPEND_PACKAGE_COUNT(scoop)
|
||||
FF_APPEND_PACKAGE_COUNT(snap)
|
||||
FF_APPEND_PACKAGE_COUNT(soar)
|
||||
FF_APPEND_PACKAGE_COUNT(sorcery)
|
||||
FF_APPEND_PACKAGE_COUNT(winget)
|
||||
FF_APPEND_PACKAGE_COUNT(xbps)
|
||||
@@ -515,6 +521,7 @@ static FFModuleBaseInfo ffModuleInfo = {
|
||||
{"Number of hpkg-system packages", "hpkg-system"},
|
||||
{"Number of hpkg-user packages", "hpkg-user"},
|
||||
{"Number of pisi packages", "pisi"},
|
||||
{"Number of soar packages", "soar"},
|
||||
{"Total number of all nix packages", "nix-all"},
|
||||
{"Total number of all flatpak app packages", "flatpak-all"},
|
||||
{"Total number of all brew packages", "brew-all"},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#include "common/printing.h"
|
||||
#include "common/jsonconfig.h"
|
||||
#include "logo/logo.h"
|
||||
#include "modules/separator/separator.h"
|
||||
#include "util/stringUtils.h"
|
||||
#include "util/mallocHelper.h"
|
||||
|
||||
@@ -63,6 +63,7 @@ void ffPrintTitle(FFTitleOptions* options)
|
||||
FF_FORMAT_ARG(userNameColored, "user-name-colored"),
|
||||
FF_FORMAT_ARG(atColored, "at-symbol-colored"),
|
||||
FF_FORMAT_ARG(hostNameColored, "host-name-colored"),
|
||||
FF_FORMAT_ARG(instance.state.platform.fullUserName, "full-user-name"),
|
||||
}));
|
||||
}
|
||||
}
|
||||
@@ -170,6 +171,7 @@ void ffGenerateTitleJsonResult(FF_MAYBE_UNUSED FFTitleOptions* options, yyjson_m
|
||||
{
|
||||
yyjson_mut_val* obj = yyjson_mut_obj_add_obj(doc, module, "result");
|
||||
yyjson_mut_obj_add_strbuf(doc, obj, "userName", &instance.state.platform.userName);
|
||||
yyjson_mut_obj_add_strbuf(doc, obj, "fullUserName", &instance.state.platform.fullUserName);
|
||||
yyjson_mut_obj_add_strbuf(doc, obj, "hostName", &instance.state.platform.hostName);
|
||||
yyjson_mut_obj_add_strbuf(doc, obj, "homeDir", &instance.state.platform.homeDir);
|
||||
yyjson_mut_obj_add_strbuf(doc, obj, "exePath", &instance.state.platform.exePath);
|
||||
@@ -193,6 +195,7 @@ static FFModuleBaseInfo ffModuleInfo = {
|
||||
{"User name (colored)", "user-name-colored"},
|
||||
{"@ symbol (colored)", "at-symbol-colored"},
|
||||
{"Host name (colored)", "host-name-colored"},
|
||||
{"Full user name", "full-user-name"},
|
||||
}))
|
||||
};
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
#include "common/io/io.h"
|
||||
#include "util/stringUtils.h"
|
||||
|
||||
#if !_WIN32
|
||||
const char* ffFindExecutableInPath(const char* name, FFstrbuf* result)
|
||||
{
|
||||
char* path = getenv("PATH");
|
||||
@@ -47,6 +48,22 @@ const char* ffFindExecutableInPath(const char* name, FFstrbuf* result)
|
||||
ffStrbufClear(result);
|
||||
return "Executable not found";
|
||||
}
|
||||
#else
|
||||
#include <windows.h>
|
||||
|
||||
const char* ffFindExecutableInPath(const char* name, FFstrbuf* result)
|
||||
{
|
||||
char buffer[MAX_PATH + 1];
|
||||
DWORD length = SearchPathA(NULL, name, ".exe", sizeof(buffer), buffer, NULL);
|
||||
if (length == 0)
|
||||
{
|
||||
ffStrbufClear(result);
|
||||
return "Executable not found";
|
||||
}
|
||||
ffStrbufSetS(result, buffer);
|
||||
return NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool ffIsAbsolutePath(const char* path)
|
||||
{
|
||||
|
||||
@@ -12,6 +12,7 @@ void ffPlatformInit(FFPlatform* platform)
|
||||
ffStrbufInit(&platform->exePath);
|
||||
|
||||
ffStrbufInit(&platform->userName);
|
||||
ffStrbufInit(&platform->fullUserName);
|
||||
ffStrbufInit(&platform->hostName);
|
||||
ffStrbufInit(&platform->userShell);
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ typedef struct FFPlatform
|
||||
FFstrbuf exePath; // The real path of current exe
|
||||
|
||||
FFstrbuf userName;
|
||||
FFstrbuf fullUserName;
|
||||
FFstrbuf hostName;
|
||||
FFstrbuf userShell;
|
||||
|
||||
|
||||
@@ -172,14 +172,6 @@ static void getDataDirs(FFPlatform* platform)
|
||||
#endif
|
||||
ffPlatformPathAddAbsolute(&platform->dataDirs, FASTFETCH_TARGET_DIR_USR "/local/share/");
|
||||
ffPlatformPathAddAbsolute(&platform->dataDirs, FASTFETCH_TARGET_DIR_USR "/share/");
|
||||
|
||||
if (platform->exePath.length > 0)
|
||||
{
|
||||
// Add ${currentExePath}
|
||||
FF_STRBUF_AUTO_DESTROY path = ffStrbufCreateCopy(&platform->exePath);
|
||||
ffStrbufSubstrBeforeLastC(&path, '/');
|
||||
ffPlatformPathAddAbsolute(&platform->dataDirs, path.chars);
|
||||
}
|
||||
}
|
||||
|
||||
static void getUserName(FFPlatform* platform, const struct passwd* pwd)
|
||||
@@ -189,6 +181,8 @@ static void getUserName(FFPlatform* platform, const struct passwd* pwd)
|
||||
user = pwd->pw_name;
|
||||
|
||||
ffStrbufAppendS(&platform->userName, user);
|
||||
|
||||
if (pwd) ffStrbufAppendS(&platform->fullUserName, pwd->pw_gecos);
|
||||
}
|
||||
|
||||
static void getHostName(FFPlatform* platform, const struct utsname* uts)
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
#include <Windows.h>
|
||||
#include <shlobj.h>
|
||||
|
||||
#define SECURITY_WIN32 1 // For secext.h
|
||||
#include <secext.h>
|
||||
|
||||
static void getExePath(FFPlatform* platform)
|
||||
{
|
||||
wchar_t exePathW[MAX_PATH];
|
||||
@@ -129,14 +132,6 @@ static void getDataDirs(FFPlatform* platform)
|
||||
platformPathAddKnownFolder(&platform->dataDirs, &FOLDERID_RoamingAppData);
|
||||
platformPathAddKnownFolder(&platform->dataDirs, &FOLDERID_LocalAppData);
|
||||
ffPlatformPathAddHome(&platform->dataDirs, platform, "");
|
||||
|
||||
if (platform->exePath.length > 0)
|
||||
{
|
||||
// Add ${currentExePath}
|
||||
FF_STRBUF_AUTO_DESTROY path = ffStrbufCreateCopy(&platform->exePath);
|
||||
ffStrbufSubstrBeforeLastC(&path, '/');
|
||||
ffPlatformPathAddAbsolute(&platform->dataDirs, path.chars);
|
||||
}
|
||||
}
|
||||
|
||||
static void getUserName(FFPlatform* platform)
|
||||
@@ -146,11 +141,16 @@ static void getUserName(FFPlatform* platform)
|
||||
ffStrbufSetS(&platform->userName, userName);
|
||||
else
|
||||
{
|
||||
wchar_t buffer[128];
|
||||
wchar_t buffer[256];
|
||||
DWORD len = ARRAY_SIZE(buffer);
|
||||
if(GetUserNameW(buffer, &len))
|
||||
ffStrbufSetWS(&platform->userName, buffer);
|
||||
}
|
||||
|
||||
wchar_t buffer[256];
|
||||
DWORD len = ARRAY_SIZE(buffer);
|
||||
if (GetUserNameExW(NameDisplay, buffer, &len))
|
||||
ffStrbufSetWS(&platform->fullUserName, buffer);
|
||||
}
|
||||
|
||||
static void getHostName(FFPlatform* platform)
|
||||
|
||||
Reference in New Issue
Block a user