Compare commits

...

58 Commits

Author SHA1 Message Date
Carter Li 865929b173 Merge pull request #1526 from fastfetch-cli/dev
Release: v2.35.0
2025-01-26 10:14:38 +08:00
李通洲 9324136f52 Thread: optimise locking (unused though) 2025-01-26 09:49:31 +08:00
李通洲 f601d2d9f5 CPU (Linux): add comments 2025-01-26 09:47:31 +08:00
李通洲 54de7c8c96 Release: v2.35.0 2025-01-25 23:03:47 +08:00
李通洲 3bb3bd542e PhysicalDisk: change temp range to 50-70 °C
Fix #1525
2025-01-25 21:41:00 +08:00
李通洲 e6e7572bc2 Doc: update changelog again [ci skip] 2025-01-25 11:01:35 +08:00
李通洲 884d256a34 Doc: update changelog [ci skip] 2025-01-24 21:14:21 +08:00
Carter Li ed8430fb2f Doc: update json_schema [ci skip] 2025-01-24 14:17:19 +08:00
Carter Li 7fc1f0098e Doc: update changelog [ci skip] 2025-01-24 14:08:01 +08:00
Carter Li 3839ee60d6 Disk / Users: support duration printing in custom format 2025-01-24 14:05:16 +08:00
Carter Li 6f266a1609 Doc: update changelog 2025-01-24 10:13:31 +08:00
Carter Li 026489c934 CPU (Android): add QS8E for Galaxy 2025-01-24 10:05:24 +08:00
Carter Li 1d03747ec3 CMake: add option -DCUSTOM_LSB_RELEASE_PATH 2025-01-24 09:57:15 +08:00
Carter Li a2919f5b2e OS (Linux): acquire more os info from lsb-release if missing from os-release
Fix #1521
2025-01-24 09:57:15 +08:00
Carter Li 680978b0d3 Logo (Builtin): fix more escape problems
Ref: #1522
2025-01-24 09:57:15 +08:00
Carter Li af813dee00 Logo (Builtin): fix OpenBSD & OpenBSD_small
Fix #1522
2025-01-24 08:44:44 +08:00
User8395 c281c46fff Logo (Builtin): Add KDE Linux logo (#1523)
* Add KDE Linux logo

* Update coloring
2025-01-24 08:44:27 +08:00
Carter Li 1f5e56c69e CPU (Android): detect new QS8E 2025-01-23 19:33:42 +08:00
Carter Li 35d431dd3f CPU (Linux): detect SOC name on RISCV
Fix #1519
2025-01-22 22:19:23 +08:00
李通洲 6a2e8de563 Doc: update changelog [ci skip] 2025-01-22 15:48:52 +08:00
李通洲 9528cf96f0 Presets: fix percentage number printing in examples/20 [ci skip] 2025-01-22 09:01:08 +08:00
Carter Li 66deb4316b Disk (NetBSD): silence compiler warnings
Ref: https://github.com/NetBSD/pkgsrc/blob/ef998fe87c836293a337726e5f212011d4ee0327/sysutils/fastfetch/patches/patch-src_detection_disk_disk__bsd.c
2025-01-21 09:41:40 +08:00
Carter Li 61e9db97b9 Doc: update feature_request issue template 2025-01-21 08:52:07 +08:00
Carter Li 66fbda9542 Display (Linux): return reason if errored 2025-01-21 08:44:24 +08:00
李通洲 5137a9e7a4 Packages: fix file type check 2025-01-18 19:34:50 +08:00
李通洲 f76981c241 Packages (SunOS): fix building 2025-01-17 15:58:09 +08:00
李通洲 85050f7ff1 Packages: add pkgsrc; code refactor
Fix #1515
2025-01-17 11:01:47 +08:00
李通洲 0b39d6fc59 Doc: update issue templates [ci skip] 2025-01-16 15:13:41 +08:00
李通洲 b7dd7fea0a CI: add linux-armv6 2025-01-16 10:20:34 +08:00
李通洲 cc51596e5c OpenGL: suppress output of EGL again
oops...
2025-01-15 21:39:21 +08:00
李通洲 b566ffe81b Doc: update more issue templates [ci skip] 2025-01-15 14:15:03 +08:00
李通洲 60c06a888c Doc: split bug report issue template into smaller parts [ci skip] 2025-01-15 13:47:04 +08:00
Carter Li 8ceda02bbb CPU (Linux): query SOC name in cpuinfo for aarch64
Fix #1510
2025-01-14 13:54:27 +08:00
Carter Li c005bc50c2 TerminalShell (Linux): ignore proot 2025-01-14 13:46:59 +08:00
Carter Li 52411f6e37 Logo (Builtin): update netbsd small 2025-01-14 10:38:27 +08:00
Carter Li 31f620c041 Logo (Builtin): add Arch Old
Fix #1511
2025-01-14 10:38:21 +08:00
Carter Li fdbd8d9ad5 Chore: forbid using of VLAs 2025-01-14 10:28:22 +08:00
Carter Li 1cad1dfdb0 Packaging: update debian stuff [ci skip] 2025-01-13 16:16:32 +08:00
Carter Li 4a1037d2b6 Merge pull request #1509 from fastfetch-cli/dev
Release: v2.34.1
2025-01-13 15:57:52 +08:00
Carter Li dbcd5b922a Sound: fix a memleak 2025-01-13 15:39:16 +08:00
Carter Li 8982b860f9 Chore: fix spelling 2025-01-13 15:15:28 +08:00
Carter Li 373b4353bb CPU (BSD): improve base freq detection 2025-01-13 15:06:18 +08:00
Carter Li ace336dfa9 Release: v2.34.1 2025-01-13 14:55:53 +08:00
CELESTIFYX Team 4060626382 fix(logo): Rename *_LOGO_SMARTOS to *_LOGO_SNIGDHAOS (#1502) 2025-01-13 13:48:02 +08:00
李通洲 9f9e3dd931 Logo (Builtin): add Oreon 2025-01-13 13:42:20 +08:00
李通洲 3ed5a250a4 Logo (Builtin): add HeliumOS 2025-01-13 13:39:07 +08:00
carterli fc969b01c7 Memory (NetBSD): change formula to be consistant with other systems 2025-01-13 10:47:25 +08:00
carterli 41e22ea866 Memory (OpenBSD): update formula to be consistant with other systems 2025-01-13 10:47:25 +08:00
李通洲 0b4a6055c6 Logo (Builtin): add netbsd_small 2025-01-13 10:41:11 +08:00
Carter Li b340d4e149 CI: fix build 2025-01-12 12:10:10 +08:00
Carter Li 878e516880 DisplayServer (Linux): upgrade wayland protocol kde-output-device-v2
Ref: #1504
2025-01-12 11:23:42 +08:00
Carter Li 4e3673a2bb DisplayServer (Linux): check HDR support with xx_color_manager_v4_interface (WIP) 2025-01-11 13:10:07 +08:00
李通洲 10c8c1b4bf Media (Linux): use file name as media name if song title is not available 2025-01-10 22:17:36 +08:00
李通洲 17e3853f38 CPU (FreeBSD): bind process to the first 2 cores 2025-01-10 21:14:51 +08:00
李通洲 1bc41dfa54 chore: remove unnecessary NULL checks
Fix #1494
2025-01-10 14:01:48 +08:00
李通洲 8c227ae4b8 TerminalFont (macOS): fix Ghostty termfont detection
`~/Library/Application Support/com.mitchellh.ghostty/config` is generated as an empty file if the settings dialog is opened

Fix #1495
2025-01-10 09:41:19 +08:00
李通洲 c5c2589f4d GPU: set GPU vendor string when using OpenGL backend 2025-01-10 08:48:29 +08:00
Carter Li b273693842 Packaging: update debian stuff [ci skip] 2025-01-09 09:06:41 +08:00
82 changed files with 1276 additions and 510 deletions
-80
View File
@@ -1,80 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
title: '[BUG] '
labels: bug
assignees: ''
---
Be sure to read the [FAQ](https://github.com/fastfetch-cli/fastfetch?tab=readme-ov-file#faq) before submitting a new issue.
<!-- We will try hard to solve the issue. However since platforms and hardwares vary greatly, it can be hard to find the root cause of an issue. Providing the following information may help us greatly. Thanks in advance! -->
# General description of bug:
* What happened:
* What should happen:
* Fastfetch version used: <!-- please use the latest version, if possible -->
* Did it work in an older version: <!-- if yes, which version -->
* Where did you get the binary: <!-- GitHub release / GitHub Actions / installed with a package manager (please tell us which package manager you used!) / built from source yourself -->
* Does this issue still occur in [the latest dev build](https://github.com/fastfetch-cli/fastfetch/actions/)?
# Often helpful information:
Screenshot:
<!-- Paste the screenshot here -->
The content of the configuration file you use (if any):
```
// Paste here
```
Output of `fastfetch -c ci.jsonc --format json`:
<!--
Note that this output will contain you public IP. If it is not relevant for the issue, feel free to remove it before uploading.
-->
```
// Paste here
```
Output of `fastfetch --list-features`:
```
// Paste here
```
## If fastfatch crashed or froze
Paste the stacktrace here. You may get it with:
```shell
# You may need Ctrl+C to stop the process if it freezes
gdb -q -ex 'set confirm off' -ex run -ex 'bt full' -ex quit --args /path/to/fastfetch
```
If you are able to identify which module crashed, the strace can be helpful too
```shell
strace /path/to/fastfetch --multithreading false -s {MODULE} --pipe
```
If you cannot do the instructions above, please upload the core dump file:
## If fastfetch is slow
Use `time fastfetch --stat` to show time usage for each module.
## If an image or logo didn't show
<!-- Please make sure your terminal supports the image protocol you used. Note that GNOME Terminal doesn't support any image protocols. -->
* The image protocol you used:
* The terminal you used:
* Upload the image file here, or paste the image URL:
* Does it work with `--logo-width {WIDTH} --logo-height {HEIGHT}`?
## If fastfetch behaves incorrectly on shell startup
* The bug is reproducible with a clean shell configuration (i.e. `fastfetch` is the only line in `.zshrc` or `~/.config/fish/config.fish`):
* Does `sleep 1` before running `fastfetch` work?
+113
View File
@@ -0,0 +1,113 @@
name: Crash Bug Report
description: If fastfetch crashes or freezes
title: "[BUG] "
labels: ["bug", "crash", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! We will try hard to solve the issue.
However since platforms and hardwares vary greatly, it can be hard to find the root cause of an issue.
Providing the following information may help us greatly. Thanks in advance!
- type: checkboxes
attributes:
label: Read the FAQ first
description: Please check if the issue is already covered in the FAQ.
options:
- label: I have checked the FAQ but the issue is not covered
required: true
- type: markdown
attributes:
value: "### General description of the bug"
- type: textarea
attributes:
label: Description
description: A clear and concise description of what the bug is.
placeholder: I was trying to [...] but [...]
validations:
required: true
- type: input
attributes:
label: Version used
description: Fastfetch version used. Please use the latest version (found in the [releases](https://github.com/fastfetch-cli/fastfetch/releases)) if possible.
placeholder: Result of `fastfetch --version`
validations:
required: true
- type: dropdown
attributes:
label: Bug prevalence
description: How often does the bug occur?
options:
-
- Always
- Sometimes
- Rarely
- Once
- Other
validations:
required: true
- type: dropdown
attributes:
label: Regression
description: Did it work in an older version?
options:
-
- Not sure
- 'Yes'
- 'No'
validations:
required: true
- type: dropdown
attributes:
label: Installation
description: Where did you install fastfetch from?
options:
-
- GitHub Releases
- GitHub Actions (nightly)
- Built from source
- Package manager
validations:
required: true
- type: input
attributes:
label: Package manager
description: Which package manager did you use if applicable?
placeholder: e.g. `apt`, `pacman`, `brew`, `scoop`
- type: markdown
attributes:
value: '### Often helpful information'
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
- type: textarea
attributes:
label: Configuration
description: If applicable, paste your configuration file here.
placeholder: cat ~/.config/fastfetch/config.jsonc
render: jsonc
- type: markdown
attributes:
value: |
Paste the stacktrace here. You may get it with:
```shell
# You may need Ctrl+C to stop the process if it freezes
gdb -q -ex 'set confirm off' -ex run -ex 'bt full' -ex quit --args /path/to/fastfetch
```
If you are able to identify which module crashed, the strace can be helpful too
```shell
strace /path/to/fastfetch --multithreading false -s {MODULE} --pipe
```
If you cannot do the instructions above, please upload the core dump file if available.
- type: textarea
attributes:
label: Stacktrace
description: Paste the stacktrace or core dump file here.
render: text
validations:
required: true
@@ -0,0 +1,106 @@
name: General Bug Report
description: If something is not working as expected (wrong output, missing info, etc)
title: "[BUG] "
labels: ["bug", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! We will try hard to solve the issue.
However since platforms and hardwares vary greatly, it can be hard to find the root cause of an issue.
Providing the following information may help us greatly. Thanks in advance!
- type: checkboxes
attributes:
label: Read the FAQ first
description: Please check if the issue is already covered in the FAQ.
options:
- label: I have checked the FAQ but the issue is not covered
required: true
- type: markdown
attributes:
value: "### General description of the bug"
- type: textarea
attributes:
label: Description
description: A clear and concise description of what the bug is.
placeholder: I was trying to [...] but [...]
validations:
required: true
- type: input
attributes:
label: Version used
description: Fastfetch version used. Please use the latest version (found in the [releases](https://github.com/fastfetch-cli/fastfetch/releases)) if possible.
placeholder: Result of `fastfetch --version`
validations:
required: true
- type: dropdown
attributes:
label: Bug prevalence
description: How often does the bug occur?
options:
-
- Always
- Sometimes
- Rarely
- Once
- Other
validations:
required: true
- type: dropdown
attributes:
label: Regression
description: Did it work in an older version?
options:
-
- Not sure
- 'Yes'
- 'No'
validations:
required: true
- type: dropdown
attributes:
label: Installation
description: Where did you install fastfetch from?
options:
-
- GitHub Releases
- GitHub Actions (nightly)
- Built from source
- Package manager
validations:
required: true
- type: input
attributes:
label: Package manager
description: Which package manager did you use if applicable?
placeholder: e.g. `apt`, `pacman`, `brew`, `scoop`
- type: markdown
attributes:
value: '### Often helpful information'
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
- type: textarea
attributes:
label: Configuration
description: If applicable, paste your configuration file here.
placeholder: cat ~/.config/fastfetch/config.jsonc
render: jsonc
- type: textarea
attributes:
label: System information
description: Output of `fastfetch -c all.jsonc --stat --format json`
placeholder: |
Note that this output will contain you public IP.
If it is not relevant for the issue, feel free to remove it before uploading.
render: jsonc
validations:
required: true
- type: textarea
attributes:
label: Features built-in
description: Output of `fastfetch --list-features`
render: text
validations:
required: true
+129
View File
@@ -0,0 +1,129 @@
name: Logo Bug Report
description: If my image logo is not displayed correctly
title: "[BUG] "
labels: ["bug", "logo", "triage"]
body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report! We will try hard to solve the issue.
However since platforms and hardwares vary greatly, it can be hard to find the root cause of an issue.
Providing the following information may help us greatly. Thanks in advance!
- type: checkboxes
attributes:
label: Read the FAQ first
description: Please check if the issue is already covered in the FAQ.
options:
- label: I have checked the FAQ but the issue is not covered
required: true
- type: markdown
attributes:
value: "### General description of the bug"
- type: textarea
attributes:
label: Description
description: A clear and concise description of what the bug is.
placeholder: I was trying to [...] but [...]
validations:
required: true
- type: input
attributes:
label: Version used
description: Fastfetch version used. Please use the latest version (found in the [releases](https://github.com/fastfetch-cli/fastfetch/releases)) if possible.
placeholder: Result of `fastfetch --version`
validations:
required: true
- type: dropdown
attributes:
label: Bug prevalence
description: How often does the bug occur?
options:
-
- Always
- Sometimes
- Rarely
- Once
- Other
validations:
required: true
- type: dropdown
attributes:
label: Regression
description: Did it work in an older version?
options:
-
- Not sure
- 'Yes'
- 'No'
validations:
required: true
- type: dropdown
attributes:
label: Installation
description: Where did you install fastfetch from?
options:
-
- GitHub Releases
- GitHub Actions (nightly)
- Built from source
- Package manager
validations:
required: true
- type: input
attributes:
label: Package manager
description: Which package manager did you use if applicable?
placeholder: e.g. `apt`, `pacman`, `brew`, `scoop`
- type: markdown
attributes:
value: '### Often helpful information'
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots to help explain your problem.
- type: textarea
attributes:
label: Configuration
description: If applicable, paste your configuration file here.
placeholder: cat ~/.config/fastfetch/config.jsonc
render: jsonc
- type: markdown
attributes:
value: |
#### If an image or logo didn't show
Please make sure your terminal supports the image protocol you used.
Note that GNOME Terminal doesn't support any image protocols as of now
Some tips:
1. Try `fastfetch --show-errors` to see if there are any errors.
2. Try `fastfetch --logo-width {WIDTH} --logo-height {HEIGHT}`. Some protocols may require a image size being set.
- type: input
attributes:
label: Image protocol
description: The image protocol you used
validations:
required: true
- type: input
attributes:
label: Terminal
description: The terminal you used
validations:
required: true
- type: textarea
attributes:
label: Image tried
description: Upload the image file, or paste the image URL here
validations:
required: true
- type: textarea
attributes:
label: Error message
description: Error message printed by `fastfetch -s none --show-errors`, if any
- type: textarea
attributes:
label: Features built-in
description: Output of `fastfetch --list-features`
render: text
validations:
required: true
-18
View File
@@ -1,18 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
title: '[FEAT] '
labels: enhancement
assignees: ''
---
Be sure to read [FAQ](https://github.com/fastfetch-cli/fastfetch?tab=readme-ov-file#faq) before submitting a new issue.
## Wanted features:
<!-- Your features here -->
## Motivation:
<!-- Your motivation here -->
@@ -0,0 +1,40 @@
name: Feature Request
description: Suggest an idea for this project
title: "[FEAT] "
labels: ["enhancement"]
body:
- type: markdown
attributes:
value: |
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:
```jsonc
// This module shows the git version
{
"modules": [
{
"type": "command",
"key": "Git",
"text": "git version",
"format": "{~12}" // cut the first 12 characters
}
]
}
```
- type: textarea
attributes:
label: Description
description: A clear and concise description of what the feature is.
validations:
required: true
- type: textarea
attributes:
label: Motivation
description: Why do you want this feature? Why doesn't `Command` module suffice for you?
validations:
required: true
- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
-23
View File
@@ -1,23 +0,0 @@
---
name: Logo request
about: Request a new logo
title: '[LOGO] '
labels: logo request
assignees: ''
---
Tip: A logo can be displayed by fastfetch without getting into fastfetch's official repo. For highly customized logo for personal use, it's recommended to keep it locally. Please refer to https://github.com/fastfetch-cli/fastfetch/wiki/Migrate-Neofetch-Logo-To-Fastfetch
# OS
```
Paste content of /etc/os-release and /etc/lsb-release here. If none of these files exist, describe a way to identify the distro
```
# Ascii
An ASCII logo should not take up too much space (smaller than 50x20 characters). Please also include the color codes if not available in `os-release`
```
Paste ascii art here.
```
+38
View File
@@ -0,0 +1,38 @@
name: Logo Request
description: Request a new ASCII logo for your favorite distro
title: "[LOGO] "
labels: ["logo request"]
body:
- type: markdown
attributes:
value: |
Tip: A logo can be displayed by fastfetch without getting into fastfetch's official repo.
For highly customized logo for personal use, it's recommended to keep it locally.
Please refer to https://github.com/fastfetch-cli/fastfetch/wiki/Migrate-Neofetch-Logo-To-Fastfetch
- type: textarea
attributes:
label: OS
description: Paste content of `/etc/os-release` and `/etc/lsb-release` here. If none of these files exist, describe a way to identify the distro
placeholder: cat /etc/os-release
validations:
required: true
- type: textarea
attributes:
label: ASCII Art
description: An ASCII logo should not take up too much space (smaller than 50x20 characters). Please also include the color codes if not available in `os-release`
placeholder: Paste ASCII art here
validations:
required: true
- type: input
attributes:
label: Original Image
description: If the ASCII art is based on an image, please provide a link to the original image
placeholder: Image URL or distro website URL
- type: checkboxes
attributes:
label: Checklist
options:
- label: The ASCII art is smaller than 50x20 characters (width x height)
required: true
- label: The ASCII art contains color codes, or the color codes are available in `os-release`
required: true
+37
View File
@@ -197,6 +197,42 @@ jobs:
name: fastfetch-linux-armv7
path: ./fastfetch-*.*
linux-armv6:
name: Linux-armv6
runs-on: ubuntu-22.04
permissions:
security-events: write
contents: read
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: run VM
uses: uraimo/run-on-arch-action@v2
id: runcmd
with:
arch: armv6
distro: bookworm
githubToken: ${{ github.token }}
run: |
uname -a
apt-get update && apt-get install -y wget
apt-get install -y cmake make g++ libvulkan-dev libwayland-dev libxrandr-dev libxcb-randr0-dev libdconf-dev libdbus-1-dev libmagickcore-dev libxfconf-0-dev libsqlite3-dev librpm-dev libegl-dev libglx-dev libosmesa6-dev ocl-icd-opencl-dev libpulse-dev libdrm-dev libelf-dev directx-headers-dev rpm
cmake -DSET_TWEAK=Off -DBUILD_TESTS=On -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build . --target package --verbose -j4
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
ctest
- name: upload artifacts
uses: actions/upload-artifact@v4
with:
name: fastfetch-linux-armv6
path: ./fastfetch-*.*
linux-riscv64:
name: Linux-riscv64
runs-on: ubuntu-22.04
@@ -612,6 +648,7 @@ jobs:
- linux-amd64
- linux-aarch64
- linux-armv7
- linux-armv6
- linux-riscv64
- linux-ppc64le
- musl-amd64
+57
View File
@@ -1,3 +1,60 @@
# 2.35.0
Bugfixes:
* Suppress output of EGL again (#1513, GPU, Linux)
* Regression of 2.34.0
Features:
* Show SOC name reported in `cpuinfo` if available (#1510, CPU, Linux)
* Change package manager name of NetBSD from `pkg` to `pkgsrc` (#1515, Packages, NetBSD)
* Detect SOC name on RISCV (#1519, CPU, Linux)
* Report marketing name of new QS8Es (CPU, Android)
* Acquire acquire more os info from lsb-release if missing from os-release (#1521)
* CMake: add option `-DCUSTOM_LSB_RELEASE_PATH` to specify the path of `lsb-release` file
* `-DCUSTOM_OS_RELEASE_PATH` has been supported since `v2.11.4`
* Report more SOC names on Android (CPU, Android)
* Support duration printing in custom format (Disk / Users)
* For example:
```jsonc
{
"modules": [
{
"key": "OS Installation Date", // No longer need to write bash scripts
"type": "disk",
"folders": "/", // Different OSes may need to specify different folders
"format": "{create-time:10} [{days} days]" // Reports the creation date of the root folder
}
]
}
```
Logo:
* Add Arch_old
* Update key color of NetBSD_small
* Fix OpenBSD and many other ascii logos (#1522)
# 2.34.1
An early release to fix KDE Plasma 6.3 compatibility. Hopefully it can be accepted by package managers before KDE 6.3 is officially released.
To package managers: if you find fastfetch bugs, it's highly appreciated if you can report them to the upstream, so that all users can benefit from the fix, instead of maintaining out-of-tree patches. Thanks!
Features:
* Report vendor name when detecting GPUs by OpenGL
* Note: the vendor name is actually the creator of the OpenGL driver (such as `Mesa`) and may not be the same as the GPU vendor.
Bugfixes:
* Fix Ghostty termfont detection (#1495, TerminalFont, macOS)
* Fix compatibility with KDE Plasma 6.3 (#1504, Display, Linux)
* Make memory usage detection logic consistent with other systems (Memory, OpenBSD / NetBSD)
* Report media file name if media title is not available (Media)
* Fix max frequency detection for CPUs with both performance and efficiency cores (CPU, FreeBSD)
Logo:
* Add HeliumOS
* Add Oreon
* Update SnigdhaOS
# 2.34.0
Changes:
+7 -3
View File
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
project(fastfetch
VERSION 2.34.0
VERSION 2.35.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
@@ -134,7 +134,7 @@ else()
message(STATUS "Threads type: disabled")
endif()
set(WARNING_FLAGS "-Wall -Wextra -Wconversion -Werror=uninitialized -Werror=return-type")
set(WARNING_FLAGS "-Wall -Wextra -Wconversion -Werror=uninitialized -Werror=return-type -Werror=vla")
set(CMAKE_C_STANDARD 11)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} -Werror=incompatible-pointer-types -Werror=implicit-function-declaration -Werror=int-conversion")
@@ -752,7 +752,7 @@ elseif(NetBSD)
src/detection/localip/localip_linux.c
src/detection/gamepad/gamepad_nosupport.c
src/detection/media/media_linux.c
src/detection/memory/memory_obsd.c
src/detection/memory/memory_nbsd.c
src/detection/mouse/mouse_nosupport.c
src/detection/netio/netio_bsd.c
src/detection/opengl/opengl_linux.c
@@ -1238,6 +1238,10 @@ if(NOT "${CUSTOM_OS_RELEASE_PATH}" STREQUAL "")
message(STATUS "Custom file path of os_release: ${CUSTOM_OS_RELEASE_PATH}")
target_compile_definitions(libfastfetch PRIVATE FF_CUSTOM_OS_RELEASE_PATH=${CUSTOM_OS_RELEASE_PATH})
endif()
if(NOT "${CUSTOM_LSB_RELEASE_PATH}" STREQUAL "")
message(STATUS "Custom file path of lsb_release: ${CUSTOM_LSB_RELEASE_PATH}")
target_compile_definitions(libfastfetch PRIVATE FF_CUSTOM_LSB_RELEASE_PATH=${CUSTOM_LSB_RELEASE_PATH})
endif()
if(NOT BINARY_LINK_TYPE STREQUAL "dlopen")
message(STATUS "Enabling custom link type: ${BINARY_LINK_TYPE}")
+12
View File
@@ -1,3 +1,15 @@
fastfetch (2.34.1) jammy; urgency=medium
* Update to 2.34.1
-- Carter Li <zhangsongcui@live.cn> Mon, 13 Jan 2025 16:06:22 +0800
fastfetch (2.34.0) jammy; urgency=medium
* Update to 2.34.0
-- Carter Li <zhangsongcui@live.cn> Thu, 09 Jan 2025 09:03:17 +0800
fastfetch (2.33.0) jammy; urgency=medium
* Update to 2.33.0
+1 -1
View File
@@ -1 +1 @@
fastfetch_2.33.0_source.buildinfo universe/utils optional
fastfetch_2.34.1_source.buildinfo universe/utils optional
+3 -3
View File
@@ -183,7 +183,7 @@
"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. {(null)}: (null)",
"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",
"type": "string"
},
"diskioFormat": {
@@ -279,7 +279,7 @@
"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. {nix-all}: Total number of all nix packages\n 39. {flatpak-all}: Total number of all flatpak app packages\n 40. {brew-all}: Total number of all brew packages\n 41. {guix-all}: Total number of all guix packages",
"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. {nix-all}: Total number of all nix packages\n 40. {flatpak-all}: Total number of all flatpak app packages\n 41. {brew-all}: Total number of all brew packages\n 42. {guix-all}: Total number of all guix packages",
"type": "string"
},
"physicaldiskFormat": {
@@ -355,7 +355,7 @@
"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",
"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",
"type": "string"
},
"versionFormat": {
+18 -6
View File
@@ -9,7 +9,7 @@
},
"separator": "│ ",
"percent": {
"type": 6
"type": ["bar", "hide-others"]
},
"bar": {
"borderLeft": "",
@@ -70,7 +70,7 @@
"type": "localip",
"key": "│ MAC ADDR │{$1}",
"format": "{mac} ({ifname})",
"showIPv4": false,
"showIpv4": false,
"showMac": true
},
{
@@ -120,12 +120,18 @@
{
"type": "memory",
"key": "│ MEMORY │{$1}",
"format": "{used} / {total} [{percentage}]"
"format": "{used} / {total} [{percentage}]",
"percent": {
"type": ["num"]
}
},
{
"type": "memory",
"key": "│ USAGE │{$1}",
"format": ""
"format": "",
"percent": {
"type": ["bar", "hide-others"]
}
},
{
"type": "custom",
@@ -135,12 +141,18 @@
"type": "disk",
"key": "│ VOLUME │{$1}",
"format": "{size-used} / {size-total} [{size-percentage}]",
"folders": "/"
"folders": "/",
"percent": {
"type": ["num"]
}
},
{
"type": "disk",
"key": "│ DISK USAGE │{$1}",
"format": ""
"format": "",
"percent": {
"type": ["bar", "hide-others"]
}
},
{
"type": "custom",
+12 -4
View File
@@ -36,11 +36,19 @@
#if FF_HAVE_PTHREAD_NP
#include <pthread_np.h>
#endif
#define FF_THREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
typedef pthread_mutex_t FFThreadMutex;
typedef pthread_t FFThreadType;
static inline void ffThreadMutexLock(FFThreadMutex* mutex) { pthread_mutex_lock(mutex); }
static inline void ffThreadMutexUnlock(FFThreadMutex* mutex) { pthread_mutex_unlock(mutex); }
#if __APPLE__
#include <os/lock.h>
#define FF_THREAD_MUTEX_INITIALIZER OS_UNFAIR_LOCK_INIT
typedef os_unfair_lock FFThreadMutex;
static inline void ffThreadMutexLock(os_unfair_lock* mutex) { os_unfair_lock_lock(mutex); }
static inline void ffThreadMutexUnlock(os_unfair_lock* mutex) { os_unfair_lock_unlock(mutex); }
#else
#define FF_THREAD_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER
typedef pthread_mutex_t FFThreadMutex;
static inline void ffThreadMutexLock(FFThreadMutex* mutex) { pthread_mutex_lock(mutex); }
static inline void ffThreadMutexUnlock(FFThreadMutex* mutex) { pthread_mutex_unlock(mutex); }
#endif
static inline FFThreadType ffThreadCreate(void* (* func)(void*), void* data) {
FFThreadType newThread = 0;
pthread_create(&newThread, NULL, func, data);
+1 -1
View File
@@ -24,7 +24,7 @@ static const char* enumerateDevices(FFBtrfsResult* item, int dfd, FFstrbuf* buff
ffStrbufAppendC(&item->devices, ',');
ffStrbufAppendS(&item->devices, entry->d_name);
char path[ARRAY_SIZE(entry->d_name) + ARRAY_SIZE("/size") + 1];
char path[sizeof(entry->d_name) + sizeof("/size") + 1];
snprintf(path, ARRAY_SIZE(path), "%s/size", entry->d_name);
if (ffReadFileBufferRelative(subfd, path, buffer))
+17 -1
View File
@@ -1,6 +1,12 @@
#include "cpu.h"
#include "common/sysctl.h"
#include <sys/param.h>
#if __has_include(<sys/cpuset.h>)
#include <sys/cpuset.h>
#define FF_HAVE_CPUSET 1
#endif
static const char* detectCpuTemp(double* current)
{
int temp = ffSysctlGetInt("dev.cpu.0.temperature", -999999);
@@ -60,9 +66,19 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
}
}
#if FF_HAVE_CPUSET && (__x86_64__ || __i386__)
// Bind current process to the first two cores, which is *usually* a performance core
cpuset_t currentCPU;
CPU_ZERO(&currentCPU);
CPU_SET(1, &currentCPU);
CPU_SET(2, &currentCPU);
cpuset_setaffinity(CPU_LEVEL_WHICH, CPU_WHICH_TID, -1, sizeof(cpuset_t), &currentCPU);
#endif
ffCPUDetectSpeedByCpuid(cpu);
cpu->frequencyBase = (uint32_t) ffSysctlGetInt("hw.clockrate", 0);
uint32_t clockrate = (uint32_t) ffSysctlGetInt("hw.clockrate", 0);
if (clockrate > cpu->frequencyBase) cpu->frequencyBase = clockrate;
cpu->temperature = FF_CPU_TEMP_UNSET;
if (options->temp)
+30 -25
View File
@@ -97,7 +97,11 @@ static void detectQualcomm(FFCPUResult* cpu)
{
// https://en.wikipedia.org/wiki/List_of_Qualcomm_Snapdragon_systems_on_chips
if (ffStrbufEqualS(&cpu->name, "SM8750"))
if (ffStrbufEqualS(&cpu->name, "SM8750-AC"))
ffStrbufSetStatic(&cpu->name, "Qualcomm Snapdragon 8 Elite for Galaxy [SM8750-AC]");
else if (ffStrbufEqualS(&cpu->name, "SM8750-3"))
ffStrbufSetStatic(&cpu->name, "Qualcomm Snapdragon 8 Elite [SM8750-3]");
else if (ffStrbufEqualS(&cpu->name, "SM8750"))
ffStrbufSetStatic(&cpu->name, "Qualcomm Snapdragon 8 Elite [SM8750]");
else if (ffStrbufEqualS(&cpu->name, "SM8635"))
ffStrbufSetStatic(&cpu->name, "Qualcomm Snapdragon 8s Gen 3 [SM8635]");
@@ -280,7 +284,7 @@ static const char* parseCpuInfo(
{
//Stop after reasonable information is acquired
if((*line == '\0' || *line == '\n')
#if __arm__ || __loongarch__
#if __arm__ || __aarch64__ || __loongarch__
&& cpu->name.length > 0 // #1202 #1204
#endif
)
@@ -432,7 +436,7 @@ FF_MAYBE_UNUSED static void parseIsa(FFstrbuf* cpuIsa)
}
}
FF_MAYBE_UNUSED static void detectArmSoc(FFCPUResult* cpu)
FF_MAYBE_UNUSED static void detectSocName(FFCPUResult* cpu)
{
if (cpu->name.length > 0)
return;
@@ -557,7 +561,7 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
#if __x86_64__ || __i386__
cpu->packages = getPackageCount(&cpuinfo);
if (cpu->packages > 1)
cpu->coresPhysical *= cpu->packages;
cpu->coresPhysical *= cpu->packages; // https://github.com/hykilpikonna/hyfetch/issues/374#issuecomment-2571578914
#endif
// Ref https://github.com/fastfetch-cli/fastfetch/issues/1194#issuecomment-2295058252
@@ -565,35 +569,36 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
if (!detectFrequency(cpu, options) || cpu->frequencyBase == 0)
cpu->frequencyBase = (uint32_t) ffStrbufToUInt(&cpuMHz, 0);
#if !(__x86_64__ || __i386__ || __arm__ || __aarch64__)
if(cpuUarch.length > 0)
{
if(cpu->name.length > 0)
ffStrbufAppendC(&cpu->name, ' ');
ffStrbufAppend(&cpu->name, &cpuUarch);
}
if(cpuIsa.length > 0)
{
parseIsa(&cpuIsa);
if(cpu->name.length > 0)
ffStrbufAppendC(&cpu->name, ' ');
ffStrbufAppend(&cpu->name, &cpuIsa);
}
#if __ANDROID__
detectAndroid(cpu);
#elif !(__x86_64__ || __i386__)
detectSocName(cpu);
#endif
#if __arm__ || __aarch64__
uint32_t cpuImplementer = (uint32_t) strtoul(cpuImplementerStr.chars, NULL, 16);
ffStrbufSetStatic(&cpu->vendor, hwImplId2Vendor(cpuImplementer));
#if __ANDROID__
detectAndroid(cpu);
#else
detectArmSoc(cpu);
#endif
if (cpu->name.length == 0)
detectArmName(&cpuinfo, cpu, cpuImplementer);
#elif !(__x86_64__ || __i386__)
if (cpu->name.length == 0)
{
if(cpuUarch.length > 0)
{
if(cpu->name.length > 0)
ffStrbufAppendC(&cpu->name, ' ');
ffStrbufAppend(&cpu->name, &cpuUarch);
}
if(cpuIsa.length > 0)
{
parseIsa(&cpuIsa);
if(cpu->name.length > 0)
ffStrbufAppendC(&cpu->name, ' ');
ffStrbufAppend(&cpu->name, &cpuIsa);
}
}
#endif
return NULL;
+1 -2
View File
@@ -58,8 +58,7 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
ffCPUDetectSpeedByCpuid(cpu);
uint32_t freq = (uint32_t) ffSysctlGetInt("machdep.cpu.frequency.target", 0);
if (freq > cpu->frequencyBase)
cpu->frequencyBase = freq;
if (freq > cpu->frequencyBase) cpu->frequencyBase = freq;
cpu->temperature = FF_CPU_TEMP_UNSET;
+3 -1
View File
@@ -15,7 +15,9 @@ const char* ffDetectCPUImpl(const FFCPUOptions* options, FFCPUResult* cpu)
ffCPUDetectSpeedByCpuid(cpu);
cpu->frequencyBase = (uint32_t) ffSysctlGetInt(CTL_HW, HW_CPUSPEED, 0);
uint32_t cpuspeed = (uint32_t) ffSysctlGetInt(CTL_HW, HW_CPUSPEED, 0);
if (cpuspeed > cpu->frequencyBase) cpu->frequencyBase = cpuspeed;
cpu->temperature = FF_CPU_TEMP_UNSET;
if (options->temp)
{
+11 -4
View File
@@ -8,7 +8,6 @@
#ifdef __NetBSD__
#include <sys/types.h>
#include <sys/statvfs.h>
#define getfsstat(...) getvfsstat(__VA_ARGS__)
#define statfs statvfs
#define f_flags f_flag
#define f_bsize f_frsize
@@ -125,14 +124,22 @@ static void detectFsInfo(struct statfs* fs, FFDisk* disk)
const char* ffDetectDisksImpl(FFDiskOptions* options, FFlist* disks)
{
#ifndef __NetBSD__
int size = getfsstat(NULL, 0, MNT_WAIT);
if(size <= 0)
return "getfsstat(NULL, 0, MNT_WAIT) failed";
if(size <= 0) return "getfsstat(NULL, 0, MNT_WAIT) failed";
#else
int size = getvfsstat(NULL, 0, ST_WAIT);
if(size <= 0) return "getvfsstat(NULL, 0, ST_WAIT) failed";
#endif
FF_AUTO_FREE struct statfs* buf = malloc(sizeof(*buf) * (unsigned) size);
#ifndef __NetBSD__
if(getfsstat(buf, (int) (sizeof(*buf) * (unsigned) size), MNT_NOWAIT) <= 0)
return "getfsstat(buf, size, MNT_NOWAIT) failed";
#else
if(getvfsstat(buf, sizeof(*buf) * (unsigned) size, ST_NOWAIT) <= 0)
return "getvfsstat(buf, size, ST_NOWAIT) failed";
#endif
for(struct statfs* fs = buf; fs < buf + size; ++fs)
{
+1 -2
View File
@@ -99,8 +99,7 @@ const char* ffDiskIOGetIoCounters(FFlist* result, FFDiskIOOptions* options)
device->writeCount = current->num_writes;
}
if (stats.dinfo->mem_ptr)
free(stats.dinfo->mem_ptr);
free(stats.dinfo->mem_ptr);
free(stats.dinfo);
return NULL;
@@ -78,11 +78,11 @@ static struct zxdg_output_v1_listener zxdgOutputListener = {
.description = (void*) ffWaylandOutputDescriptionListener,
};
void ffWaylandHandleGlobalOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
const char* ffWaylandHandleGlobalOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
{
struct wl_proxy* output = wldata->ffwl_proxy_marshal_constructor_versioned((struct wl_proxy*) registry, WL_REGISTRY_BIND, wldata->ffwl_output_interface, version, name, wldata->ffwl_output_interface->name, version, NULL);
if(output == NULL)
return;
return "Failed to create wl_output";
WaylandDisplay display = {
.parent = wldata,
@@ -94,8 +94,16 @@ void ffWaylandHandleGlobalOutput(WaylandData* wldata, struct wl_registry* regist
.edidName = ffStrbufCreate(),
};
wldata->ffwl_proxy_add_listener(output, (void(**)(void)) &outputListener, &display);
wldata->ffwl_display_roundtrip(wldata->display);
if (wldata->ffwl_proxy_add_listener(output, (void(**)(void)) &outputListener, &display) < 0)
{
wldata->ffwl_proxy_destroy(output);
return "Failed to add listener to wl_output";
}
if (wldata->ffwl_display_roundtrip(wldata->display) < 0)
{
wldata->ffwl_proxy_destroy(output);
return "Failed to roundtrip wl_output";
}
if (wldata->zxdgOutputManager)
{
@@ -112,7 +120,7 @@ void ffWaylandHandleGlobalOutput(WaylandData* wldata, struct wl_registry* regist
wldata->ffwl_proxy_destroy(output);
if(display.width <= 0 || display.height <= 0)
return;
return "Failed to get display information from wl_output";
uint32_t rotation = ffWaylandHandleRotation(&display);
@@ -156,15 +164,19 @@ void ffWaylandHandleGlobalOutput(WaylandData* wldata, struct wl_registry* regist
ffStrbufDestroy(&display.description);
ffStrbufDestroy(&display.name);
ffStrbufDestroy(&display.edidName);
return NULL;
}
void ffWaylandHandleZxdgOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
const char* ffWaylandHandleZxdgOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
{
struct wl_proxy* manager = wldata->ffwl_proxy_marshal_constructor_versioned((struct wl_proxy*) registry, WL_REGISTRY_BIND, &zxdg_output_manager_v1_interface, version, name, zxdg_output_manager_v1_interface.name, version, NULL);
if(manager == NULL)
return;
return "Failed to create zxdg_output_manager_v1";
wldata->zxdgOutputManager = manager;
return NULL;
}
#endif
@@ -1,4 +1,4 @@
/* Generated by wayland-scanner 1.22.0 */
/* Generated by wayland-scanner 1.23.1 */
#ifndef KDE_OUTPUT_DEVICE_V2_CLIENT_PROTOCOL_H
#define KDE_OUTPUT_DEVICE_V2_CLIENT_PROTOCOL_H
@@ -53,6 +53,11 @@ struct kde_output_device_v2;
* This object is published as global during start up for every available
* display devices, or when one later becomes available, for example by
* being hotplugged via a physical connector.
*
* Warning! The protocol described in this file is a desktop environment
* implementation detail. Regular clients must not use this protocol.
* Backward incompatible changes may be added without bumping the major
* version of the extension.
* @section page_iface_kde_output_device_v2_api API
* See @ref iface_kde_output_device_v2.
*/
@@ -75,6 +80,11 @@ struct kde_output_device_v2;
* This object is published as global during start up for every available
* display devices, or when one later becomes available, for example by
* being hotplugged via a physical connector.
*
* Warning! The protocol described in this file is a desktop environment
* implementation detail. Regular clients must not use this protocol.
* Backward incompatible changes may be added without bumping the major
* version of the extension.
*/
extern const struct wl_interface kde_output_device_v2_interface;
#endif
@@ -199,6 +209,11 @@ enum kde_output_device_v2_capability {
* @since 5
*/
KDE_OUTPUT_DEVICE_V2_CAPABILITY_ICC_PROFILE = 0x40,
/**
* if this outputdevice supports the brightness setting
* @since 9
*/
KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS = 0x80,
};
/**
* @ingroup iface_kde_output_device_v2
@@ -216,6 +231,10 @@ enum kde_output_device_v2_capability {
* @ingroup iface_kde_output_device_v2
*/
#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_ICC_PROFILE_SINCE_VERSION 5
/**
* @ingroup iface_kde_output_device_v2
*/
#define KDE_OUTPUT_DEVICE_V2_CAPABILITY_BRIGHTNESS_SINCE_VERSION 9
#endif /* KDE_OUTPUT_DEVICE_V2_CAPABILITY_ENUM */
#ifndef KDE_OUTPUT_DEVICE_V2_VRR_POLICY_ENUM
@@ -274,6 +293,29 @@ enum kde_output_device_v2_color_profile_source {
};
#endif /* KDE_OUTPUT_DEVICE_V2_COLOR_PROFILE_SOURCE_ENUM */
#ifndef KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM
#define KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM
/**
* @ingroup iface_kde_output_device_v2
* tradeoff between power and accuracy
*
* The compositor can do a lot of things that trade between
* performance, power and color accuracy. This setting describes
* a high level preference from the user about in which direction
* that tradeoff should be made.
*/
enum kde_output_device_v2_color_power_tradeoff {
/**
* prefer efficiency and performance
*/
KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_EFFICIENCY = 0,
/**
* prefer accuracy
*/
KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ACCURACY = 1,
};
#endif /* KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_ENUM */
/**
* @ingroup iface_kde_output_device_v2
* @struct kde_output_device_v2_listener
@@ -593,6 +635,29 @@ struct kde_output_device_v2_listener {
void (*brightness)(void *data,
struct kde_output_device_v2 *kde_output_device_v2,
uint32_t brightness);
/**
* the preferred color/power tradeoff
*
*
* @since 10
*/
void (*color_power_tradeoff)(void *data,
struct kde_output_device_v2 *kde_output_device_v2,
uint32_t preference);
/**
* dimming multiplier
*
* This is the dimming multiplier of the output. This is similar
* to the brightness setting, except it's meant to be a temporary
* setting only, not persistent and may be implemented differently
* depending on the display. 0 is the minimum dimming factor (not
* completely dark) and 10000 means the output is not dimmed.
* @param multiplier multiplier in 0-10000
* @since 11
*/
void (*dimming)(void *data,
struct kde_output_device_v2 *kde_output_device_v2,
uint32_t multiplier);
};
/**
@@ -706,34 +771,42 @@ kde_output_device_v2_add_listener(struct kde_output_device_v2 *kde_output_device
* @ingroup iface_kde_output_device_v2
*/
#define KDE_OUTPUT_DEVICE_V2_BRIGHTNESS_SINCE_VERSION 8
/**
* @ingroup iface_kde_output_device_v2
*/
#define KDE_OUTPUT_DEVICE_V2_COLOR_POWER_TRADEOFF_SINCE_VERSION 10
/**
* @ingroup iface_kde_output_device_v2
*/
#define KDE_OUTPUT_DEVICE_V2_DIMMING_SINCE_VERSION 11
// /** @ingroup iface_kde_output_device_v2 */
// static inline void
// kde_output_device_v2_set_user_data(struct kde_output_device_v2 *kde_output_device_v2, void *user_data)
// {
// wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_v2, user_data);
// }
/** @ingroup iface_kde_output_device_v2 */
static inline void
kde_output_device_v2_set_user_data(struct kde_output_device_v2 *kde_output_device_v2, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_v2, user_data);
}
// /** @ingroup iface_kde_output_device_v2 */
// static inline void *
// kde_output_device_v2_get_user_data(struct kde_output_device_v2 *kde_output_device_v2)
// {
// return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_v2);
// }
/** @ingroup iface_kde_output_device_v2 */
static inline void *
kde_output_device_v2_get_user_data(struct kde_output_device_v2 *kde_output_device_v2)
{
return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_v2);
}
// static inline uint32_t
// kde_output_device_v2_get_version(struct kde_output_device_v2 *kde_output_device_v2)
// {
// return wl_proxy_get_version((struct wl_proxy *) kde_output_device_v2);
// }
static inline uint32_t
kde_output_device_v2_get_version(struct kde_output_device_v2 *kde_output_device_v2)
{
return wl_proxy_get_version((struct wl_proxy *) kde_output_device_v2);
}
// /** @ingroup iface_kde_output_device_v2 */
// static inline void
// kde_output_device_v2_destroy(struct kde_output_device_v2 *kde_output_device_v2)
// {
// wl_proxy_destroy((struct wl_proxy *) kde_output_device_v2);
// }
/** @ingroup iface_kde_output_device_v2 */
static inline void
kde_output_device_v2_destroy(struct kde_output_device_v2 *kde_output_device_v2)
{
wl_proxy_destroy((struct wl_proxy *) kde_output_device_v2);
}
/**
* @ingroup iface_kde_output_device_mode_v2
@@ -811,32 +884,32 @@ kde_output_device_mode_v2_add_listener(struct kde_output_device_mode_v2 *kde_out
#define KDE_OUTPUT_DEVICE_MODE_V2_REMOVED_SINCE_VERSION 1
// /** @ingroup iface_kde_output_device_mode_v2 */
// static inline void
// kde_output_device_mode_v2_set_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2, void *user_data)
// {
// wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_mode_v2, user_data);
// }
/** @ingroup iface_kde_output_device_mode_v2 */
static inline void
kde_output_device_mode_v2_set_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) kde_output_device_mode_v2, user_data);
}
// /** @ingroup iface_kde_output_device_mode_v2 */
// static inline void *
// kde_output_device_mode_v2_get_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
// {
// return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_mode_v2);
// }
/** @ingroup iface_kde_output_device_mode_v2 */
static inline void *
kde_output_device_mode_v2_get_user_data(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
{
return wl_proxy_get_user_data((struct wl_proxy *) kde_output_device_mode_v2);
}
// static inline uint32_t
// kde_output_device_mode_v2_get_version(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
// {
// return wl_proxy_get_version((struct wl_proxy *) kde_output_device_mode_v2);
// }
static inline uint32_t
kde_output_device_mode_v2_get_version(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
{
return wl_proxy_get_version((struct wl_proxy *) kde_output_device_mode_v2);
}
// /** @ingroup iface_kde_output_device_mode_v2 */
// static inline void
// kde_output_device_mode_v2_destroy(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
// {
// wl_proxy_destroy((struct wl_proxy *) kde_output_device_mode_v2);
// }
/** @ingroup iface_kde_output_device_mode_v2 */
static inline void
kde_output_device_mode_v2_destroy(struct kde_output_device_mode_v2 *kde_output_device_mode_v2)
{
wl_proxy_destroy((struct wl_proxy *) kde_output_device_mode_v2);
}
#ifdef __cplusplus
}
@@ -1,6 +1,6 @@
#ifdef FF_HAVE_WAYLAND
/* Generated by wayland-scanner 1.22.0 */
/* Generated by wayland-scanner 1.23.1 */
/*
* SPDX-FileCopyrightText: 2008-2011 Kristian Høgsberg
@@ -12,6 +12,7 @@
* SPDX-License-Identifier: MIT-CMU
*/
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include <wayland-util.h>
@@ -57,12 +58,14 @@ static const struct wl_message kde_output_device_v2_events[] = {
{ "sdr_gamut_wideness", "6u", kde_output_device_v2_types + 0 },
{ "color_profile_source", "7u", kde_output_device_v2_types + 0 },
{ "brightness", "8u", kde_output_device_v2_types + 0 },
{ "color_power_tradeoff", "10u", kde_output_device_v2_types + 0 },
{ "dimming", "11u", kde_output_device_v2_types + 0 },
};
WL_EXPORT const struct wl_interface kde_output_device_v2_interface = {
"kde_output_device_v2", 8,
"kde_output_device_v2", 11,
0, NULL,
25, kde_output_device_v2_events,
27, kde_output_device_v2_events,
};
static const struct wl_message kde_output_device_mode_v2_events[] = {
@@ -163,13 +163,15 @@ static struct kde_output_device_v2_listener outputListener = {
.sdr_gamut_wideness = (void*) stubListener,
.color_profile_source = (void*) stubListener,
.brightness = (void*) stubListener,
.color_power_tradeoff = (void*) stubListener,
.dimming = (void*) stubListener,
};
void ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
const char* ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
{
struct wl_proxy* output = wldata->ffwl_proxy_marshal_constructor_versioned((struct wl_proxy*) registry, WL_REGISTRY_BIND, &kde_output_device_v2_interface, version, name, kde_output_device_v2_interface.name, version, NULL);
if(output == NULL)
return;
return "Failed to create kde_output_device_v2";
FF_LIST_AUTO_DESTROY modes = ffListCreate(sizeof(WaylandKdeMode));
WaylandDisplay display = {
@@ -183,12 +185,21 @@ void ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry,
.internal = &modes,
};
wldata->ffwl_proxy_add_listener(output, (void(**)(void)) &outputListener, &display);
wldata->ffwl_display_roundtrip(wldata->display);
if (wldata->ffwl_proxy_add_listener(output, (void(**)(void)) &outputListener, &display) < 0)
{
wldata->ffwl_proxy_destroy(output);
return "Failed to add listener to kde_output_device_v2";
}
if (wldata->ffwl_display_roundtrip(wldata->display) < 0)
{
wldata->ffwl_proxy_destroy(output);
return "Failed to roundtrip kde_output_device_v2";
}
wldata->ffwl_proxy_destroy(output);
if(display.width <= 0 || display.height <= 0 || !display.internal)
return;
return "Failed to get display information from kde_output_device_v2";
uint32_t rotation = ffWaylandHandleRotation(&display);
@@ -231,6 +242,8 @@ void ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry,
ffStrbufDestroy(&display.description);
ffStrbufDestroy(&display.name);
ffStrbufDestroy(&display.edidName);
return NULL;
}
@@ -241,20 +254,30 @@ static void waylandKdeOutputOrderListener(void *data, FF_MAYBE_UNUSED struct kde
*id = ffWaylandGenerateIdFromName(output_name);
}
void ffWaylandHandleKdeOutputOrder(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
const char* ffWaylandHandleKdeOutputOrder(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
{
struct wl_proxy* output = wldata->ffwl_proxy_marshal_constructor_versioned((struct wl_proxy*) registry, WL_REGISTRY_BIND, &kde_output_order_v1_interface, version, name, kde_output_order_v1_interface.name, version, NULL);
if(output == NULL)
return;
return "Failed to create kde_output_order_v1";
struct kde_output_order_v1_listener orderListener = {
.output = waylandKdeOutputOrderListener,
.done = (void*) stubListener,
};
wldata->ffwl_proxy_add_listener(output, (void(**)(void)) &orderListener, &wldata->primaryDisplayId);
wldata->ffwl_display_roundtrip(wldata->display);
if (wldata->ffwl_proxy_add_listener(output, (void(**)(void)) &orderListener, &wldata->primaryDisplayId) < 0)
{
wldata->ffwl_proxy_destroy(output);
return "Failed to add listener to kde_output_order_v1";
}
if (wldata->ffwl_display_roundtrip(wldata->display) < 0)
{
wldata->ffwl_proxy_destroy(output);
return "Failed to roundtrip kde_output_order_v1";
}
wldata->ffwl_proxy_destroy(output);
return NULL;
}
#endif
@@ -80,17 +80,20 @@ static void waylandGlobalAddListener(void* data, struct wl_registry* registry, u
if((wldata->protocolType == FF_WAYLAND_PROTOCOL_TYPE_NONE || wldata->protocolType == FF_WAYLAND_PROTOCOL_TYPE_GLOBAL) && ffStrEquals(interface, wldata->ffwl_output_interface->name))
{
wldata->protocolType = FF_WAYLAND_PROTOCOL_TYPE_GLOBAL;
ffWaylandHandleGlobalOutput(wldata, registry, name, version);
if (ffWaylandHandleGlobalOutput(wldata, registry, name, version) != NULL)
wldata->protocolType = FF_WAYLAND_PROTOCOL_TYPE_NONE;
}
else if((wldata->protocolType == FF_WAYLAND_PROTOCOL_TYPE_NONE || wldata->protocolType == FF_WAYLAND_PROTOCOL_TYPE_ZWLR) && ffStrEquals(interface, zwlr_output_manager_v1_interface.name))
{
wldata->protocolType = FF_WAYLAND_PROTOCOL_TYPE_ZWLR;
ffWaylandHandleZwlrOutput(wldata, registry, name, version);
if (ffWaylandHandleZwlrOutput(wldata, registry, name, version) != NULL)
wldata->protocolType = FF_WAYLAND_PROTOCOL_TYPE_NONE;
}
else if((wldata->protocolType == FF_WAYLAND_PROTOCOL_TYPE_NONE || wldata->protocolType == FF_WAYLAND_PROTOCOL_TYPE_KDE) && ffStrEquals(interface, kde_output_device_v2_interface.name))
{
wldata->protocolType = FF_WAYLAND_PROTOCOL_TYPE_KDE;
ffWaylandHandleKdeOutput(wldata, registry, name, version);
if (ffWaylandHandleKdeOutput(wldata, registry, name, version) != NULL)
wldata->protocolType = FF_WAYLAND_PROTOCOL_TYPE_NONE;
}
else if(ffStrEquals(interface, kde_output_order_v1_interface.name))
{
@@ -79,10 +79,10 @@ void ffWaylandOutputDescriptionListener(void* data, FF_MAYBE_UNUSED void* output
// Modifies content of display. Don't call this function when calling ffdsAppendDisplay
uint32_t ffWaylandHandleRotation(WaylandDisplay* display);
void ffWaylandHandleGlobalOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
void ffWaylandHandleZwlrOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
void ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
void ffWaylandHandleKdeOutputOrder(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
void ffWaylandHandleZxdgOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
const char* ffWaylandHandleGlobalOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
const char* ffWaylandHandleZwlrOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
const char* ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
const char* ffWaylandHandleKdeOutputOrder(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
const char* ffWaylandHandleZxdgOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version);
#endif
@@ -188,11 +188,11 @@ static void waylandHandleZwlrHead(void *data, FF_MAYBE_UNUSED struct zwlr_output
wldata->ffwl_proxy_destroy((void*) head);
}
void ffWaylandHandleZwlrOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
const char* ffWaylandHandleZwlrOutput(WaylandData* wldata, struct wl_registry* registry, uint32_t name, uint32_t version)
{
struct wl_proxy* output = wldata->ffwl_proxy_marshal_constructor_versioned((struct wl_proxy*) registry, WL_REGISTRY_BIND, &zwlr_output_manager_v1_interface, version, name, zwlr_output_manager_v1_interface.name, version, NULL);
if(output == NULL)
return;
return "Failed to bind zwlr_output_manager_v1";
const struct zwlr_output_manager_v1_listener outputListener = {
.head = waylandHandleZwlrHead,
@@ -200,9 +200,19 @@ void ffWaylandHandleZwlrOutput(WaylandData* wldata, struct wl_registry* registry
.finished = (void*) stubListener,
};
wldata->ffwl_proxy_add_listener(output, (void(**)(void)) &outputListener, wldata);
wldata->ffwl_display_roundtrip(wldata->display);
if (wldata->ffwl_proxy_add_listener(output, (void(**)(void)) &outputListener, wldata) < 0)
{
wldata->ffwl_proxy_destroy(output);
return "Failed to add listener to zwlr_output_manager_v1";
}
if (wldata->ffwl_display_roundtrip(wldata->display) < 0)
{
wldata->ffwl_proxy_destroy(output);
return "Failed to roundtrip display";
}
wldata->ffwl_proxy_destroy(output);
return NULL;
}
#endif
+2 -2
View File
@@ -51,9 +51,9 @@ const char* detectByOpenGL(FFlist* gpus)
{
FFGPUResult* gpu = (FFGPUResult*) ffListAdd(gpus);
gpu->type = FF_GPU_TYPE_UNKNOWN;
ffStrbufInit(&gpu->vendor);
ffStrbufInitMove(&gpu->vendor, &result.vendor);
ffStrbufInitMove(&gpu->name, &result.renderer);
ffStrbufInitMove(&gpu->driver, &result.vendor);
ffStrbufInit(&gpu->driver);
ffStrbufInitF(&gpu->platformApi, "OpenGL %s", result.version.chars);
gpu->index = FF_GPU_INDEX_UNSET;
gpu->temperature = FF_GPU_TEMP_UNSET;
+1 -2
View File
@@ -74,8 +74,7 @@ static bool detectPlasmaFromFile(const char* filename, FFQtResult* result)
}
}
if(line != NULL)
free(line);
free(line);
fclose(kdeglobals);
+29 -5
View File
@@ -8,7 +8,6 @@
#ifdef FF_HAVE_DBUS
#include "common/dbus.h"
#include "common/library.h"
#define FF_DBUS_ITER_CONTINUE(dbus, iterator) \
{ \
@@ -116,10 +115,35 @@ static bool getBusProperties(FFDBusData* data, const char* busName, FFMediaResul
if(result->song.length == 0)
{
ffStrbufClear(&result->artist);
ffStrbufClear(&result->album);
ffStrbufClear(&result->url);
return false;
if(result->url.length)
{
const char* fileName = memrchr(result->url.chars, '/', result->url.length);
assert(fileName);
++fileName;
ffStrbufEnsureFixedLengthFree(&result->song, result->url.length - (uint32_t) (fileName - result->url.chars));
for(; *fileName && *fileName != '?'; ++fileName)
{
if (*fileName != '%')
{
ffStrbufAppendC(&result->song, *fileName);
}
else
{
char str[] = { fileName[1], fileName[2], 0 };
if (str[0] == 0 || str[1] == 0)
break;
ffStrbufAppendC(&result->song, (char) strtoul(str, NULL, 16));
fileName += 2;
}
}
}
else
{
ffStrbufClear(&result->artist);
ffStrbufClear(&result->album);
ffStrbufClear(&result->url);
return false;
}
}
//Set short bus name
+1 -7
View File
@@ -4,13 +4,7 @@
const char* ffDetectMemory(FFMemoryResult* ram)
{
size_t length = sizeof(ram->bytesTotal);
if (sysctl((int[]){ CTL_HW,
#if __NetBSD__
HW_PHYSMEM64
#else
HW_PHYSMEM
#endif
}, 2, &ram->bytesTotal, &length, NULL, 0))
if (sysctl((int[]){ CTL_HW, HW_PHYSMEM }, 2, &ram->bytesTotal, &length, NULL, 0))
return "Failed to read hw.physmem";
// vm.stats.vm.* are int values
+18
View File
@@ -0,0 +1,18 @@
#include "memory.h"
#include "common/sysctl.h"
#include <sys/param.h>
#include <uvm/uvm_extern.h>
const char* ffDetectMemory(FFMemoryResult* ram)
{
struct uvmexp_sysctl buf;
size_t length = sizeof(buf);
if (sysctl((int[]){ CTL_VM, VM_UVMEXP2 }, 2, &buf, &length, NULL, 0) < 0)
return "sysctl(CTL_VM, VM_UVMEXP2) failed";
ram->bytesTotal = (uint64_t) buf.npages * instance.state.platform.sysinfo.pageSize;
ram->bytesUsed = ((uint64_t) buf.active + (uint64_t) buf.inactive + (uint64_t) buf.wired) * instance.state.platform.sysinfo.pageSize;
return NULL;
}
+2 -5
View File
@@ -2,10 +2,7 @@
#include "common/sysctl.h"
#include <sys/param.h>
#if __NetBSD__
#include <uvm/uvm_extern.h>
#endif
#include <uvm/uvm_extern.h>
const char* ffDetectMemory(FFMemoryResult* ram)
{
@@ -15,7 +12,7 @@ const char* ffDetectMemory(FFMemoryResult* ram)
return "sysctl(CTL_VM, VM_UVMEXP) failed";
ram->bytesTotal = (uint64_t) buf.npages * instance.state.platform.sysinfo.pageSize;
ram->bytesUsed = ram->bytesTotal - (uint64_t) buf.free * instance.state.platform.sysinfo.pageSize;
ram->bytesUsed = ((uint64_t) buf.active + (uint64_t) buf.inactive + (uint64_t) buf.wired) * instance.state.platform.sysinfo.pageSize;
return NULL;
}
+1 -1
View File
@@ -154,7 +154,7 @@ const char* ffOpenGLDetectByEGL(FFOpenGLResult* result)
FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE(egl, eglData, eglDestroySurface);
FF_LIBRARY_LOAD_SYMBOL_VAR_MESSAGE(egl, eglData, eglTerminate);
// FF_SUPPRESS_IO();
FF_SUPPRESS_IO();
return eglHandleData(result, &eglData);
}
+10 -17
View File
@@ -11,14 +11,6 @@
#define FF_STR_INDIR(x) #x
#define FF_STR(x) FF_STR_INDIR(x)
static inline bool allRelevantValuesSet(const FFOSResult* result)
{
return result->id.length > 0
&& result->name.length > 0
&& result->prettyName.length > 0
;
}
static bool parseLsbRelease(const char* fileName, FFOSResult* result)
{
return ffParsePropFileValues(fileName, 4, (FFpropquery[]) {
@@ -260,7 +252,9 @@ static void detectOS(FFOSResult* os)
{
#ifdef FF_CUSTOM_OS_RELEASE_PATH
parseOsRelease(FF_STR(FF_CUSTOM_OS_RELEASE_PATH), os);
parseLsbRelease(FF_STR(FF_CUSTOM_OS_RELEASE_PATH), os);
#ifdef FF_CUSTOM_LSB_RELEASE_PATH
parseLsbRelease(FF_STR(FF_CUSTOM_LSB_RELEASE_PATH), os);
#endif
return;
#endif
@@ -275,18 +269,17 @@ static void detectOS(FFOSResult* os)
if(os->prettyName.length == 0)
ffStrbufAppendS(&os->prettyName, "Bedrock Linux");
if(parseOsRelease("/bedrock" FASTFETCH_TARGET_DIR_ETC "/os-release", os) && allRelevantValuesSet(os))
return;
parseOsRelease("/bedrock" FASTFETCH_TARGET_DIR_ETC "/os-release", os);
return;
}
// Refer: https://gist.github.com/natefoo/814c5bf936922dad97ff
if((parseOsRelease(FASTFETCH_TARGET_DIR_ETC "/os-release", os) ||
parseLsbRelease(FASTFETCH_TARGET_DIR_ETC "/lsb-release", os)) &&
allRelevantValuesSet(os))
return;
parseOsRelease(FASTFETCH_TARGET_DIR_USR "/lib/os-release", os);
parseOsRelease(FASTFETCH_TARGET_DIR_ETC "/os-release", os);
if (os->id.length == 0 || os->version.length == 0 || os->prettyName.length == 0 || os->codename.length == 0)
parseLsbRelease(FASTFETCH_TARGET_DIR_ETC "/lsb-release", os);
if (os->id.length == 0 || os->name.length > 0 || os->prettyName.length > 0)
parseOsRelease(FASTFETCH_TARGET_DIR_USR "/lib/os-release", os);
}
void ffDetectOSImpl(FFOSResult* os)
+35
View File
@@ -85,3 +85,38 @@ bool ffPackagesWriteCache(FFstrbuf* cacheDir, FFstrbuf* cacheContent, uint32_t n
ffStrbufAppendF(cacheContent, "%" PRIu32, num_elements);
return ffWriteFileBuffer(cacheDir->chars, cacheContent);
}
#ifndef _WIN32
uint32_t ffPackagesGetNumElements(const char* dirname, bool isdir)
{
FF_AUTO_CLOSE_DIR DIR* dirp = opendir(dirname);
if(dirp == NULL)
return 0;
uint32_t num_elements = 0;
struct dirent *entry;
while((entry = readdir(dirp)) != NULL)
{
bool ok = false;
#ifndef __sun
if(entry->d_type != DT_UNKNOWN && entry->d_type != DT_LNK)
ok = entry->d_type == (isdir ? DT_DIR : DT_REG);
else
#endif
{
struct stat stbuf;
if (fstatat(dirfd(dirp), entry->d_name, &stbuf, 0) == 0)
ok = isdir ? S_ISDIR(stbuf.st_mode) : S_ISREG(stbuf.st_mode);
}
if(ok) ++num_elements;
}
if(isdir && num_elements >= 2)
num_elements -= 2; // accounting for . and ..
return num_elements;
}
#endif
+5
View File
@@ -31,6 +31,7 @@ typedef struct FFPackagesResult
uint32_t pacstall;
uint32_t paludis;
uint32_t pkg;
uint32_t pkgsrc;
uint32_t pkgtool;
uint32_t qi;
uint32_t rpm;
@@ -48,3 +49,7 @@ typedef struct FFPackagesResult
const char* ffDetectPackages(FFPackagesResult* result, FFPackagesOptions* options);
bool ffPackagesReadCache(FFstrbuf* cacheDir, FFstrbuf* cacheContent, const char* filePath, const char* packageId, uint32_t* result);
bool ffPackagesWriteCache(FFstrbuf* cacheDir, FFstrbuf* cacheContent, uint32_t num_elements);
#ifndef _WIN32
uint32_t ffPackagesGetNumElements(const char* dirname, bool isdir);
#endif
+3 -23
View File
@@ -4,26 +4,6 @@
#include "common/processing.h"
#include "util/stringUtils.h"
static uint32_t getNumElements(const char* dirname, unsigned char type)
{
FF_AUTO_CLOSE_DIR DIR* dirp = opendir(dirname);
if(dirp == NULL)
return 0;
uint32_t num_elements = 0;
struct dirent *entry;
while((entry = readdir(dirp)) != NULL) {
if(entry->d_type == type)
++num_elements;
}
if(type == DT_DIR)
num_elements -= 2; // accounting for . and ..
return num_elements;
}
static void countBrewPackages(const char* dirname, FFPackagesResult* result)
{
FF_STRBUF_AUTO_DESTROY baseDir = ffStrbufCreateS(dirname);
@@ -31,11 +11,11 @@ static void countBrewPackages(const char* dirname, FFPackagesResult* result)
uint32_t baseDirLength = baseDir.length;
ffStrbufAppendS(&baseDir, "/Caskroom");
result->brewCask += getNumElements(baseDir.chars, DT_DIR);
result->brewCask += ffPackagesGetNumElements(baseDir.chars, true);
ffStrbufSubstrBefore(&baseDir, baseDirLength);
ffStrbufAppendS(&baseDir, "/Cellar");
result->brew += getNumElements(baseDir.chars, DT_DIR);
result->brew += ffPackagesGetNumElements(baseDir.chars, true);
ffStrbufSubstrBefore(&baseDir, baseDirLength);
}
@@ -54,7 +34,7 @@ static uint32_t countMacPortsPackages(const char* dirname)
FF_STRBUF_AUTO_DESTROY baseDir = ffStrbufCreateS(dirname);
ffStrbufAppendS(&baseDir, "/var/macports/software");
return getNumElements(baseDir.chars, DT_DIR);
return ffPackagesGetNumElements(baseDir.chars, true);
}
static uint32_t getMacPortsPackages()
+14 -36
View File
@@ -7,33 +7,11 @@
#include "detection/os/os.h"
#include "util/stringUtils.h"
#include <dirent.h>
static uint32_t getNumElementsImpl(const char* dirname, unsigned char type)
{
FF_AUTO_CLOSE_DIR DIR* dirp = opendir(dirname);
if(dirp == NULL)
return 0;
uint32_t num_elements = 0;
struct dirent *entry;
while((entry = readdir(dirp)) != NULL) {
if(entry->d_type == type)
++num_elements;
}
if(type == DT_DIR && num_elements >= 2)
num_elements -= 2; // accounting for . and ..
return num_elements;
}
static uint32_t getNumElements(FFstrbuf* baseDir, const char* dirname, unsigned char type)
static uint32_t getNumElements(FFstrbuf* baseDir, const char* dirname, bool isdir)
{
uint32_t baseDirLength = baseDir->length;
ffStrbufAppendS(baseDir, dirname);
uint32_t num_elements = getNumElementsImpl(baseDir->chars, type);
uint32_t num_elements = ffPackagesGetNumElements(baseDir->chars, isdir);
ffStrbufSubstrBefore(baseDir, baseDirLength);
return num_elements;
}
@@ -332,10 +310,10 @@ static uint32_t getXBPS(FFstrbuf* baseDir, const char* dirname)
static uint32_t getSnap(FFstrbuf* baseDir)
{
uint32_t result = getNumElements(baseDir, "/snap", DT_DIR);
uint32_t result = getNumElements(baseDir, "/snap", true);
if (result == 0)
result = getNumElements(baseDir, "/var/lib/snapd/snap", DT_DIR);
result = getNumElements(baseDir, "/var/lib/snapd/snap", true);
//Accounting for the /snap/bin folder
return result > 0 ? result - 1 : 0;
@@ -501,7 +479,7 @@ static inline uint32_t getFlatpakRuntimePackagesArch(FFstrbuf* baseDir)
{
if(entry->d_type == DT_DIR && entry->d_name[0] != '.')
{
num_elements += getNumElements(baseDir, entry->d_name, DT_DIR);
num_elements += getNumElements(baseDir, entry->d_name, true);
}
}
@@ -550,7 +528,7 @@ static uint32_t getFlatpakPackages(FFstrbuf* baseDir, const char* dirname)
uint32_t flatpakDirLength = baseDir->length;
ffStrbufAppendS(baseDir, "app");
num_elements += getNumElementsImpl(baseDir->chars, DT_DIR);
num_elements += ffPackagesGetNumElements(baseDir->chars, true);
ffStrbufSubstrBefore(baseDir, flatpakDirLength);
num_elements += getFlatpakRuntimePackages(baseDir);
@@ -566,23 +544,23 @@ static void getPackageCounts(FFstrbuf* baseDir, FFPackagesResult* packageCounts,
if (!(options->disabled & FF_PACKAGES_FLAG_DPKG_BIT)) packageCounts->dpkg += getNumStrings(baseDir, "/var/lib/dpkg/status", "Status: install ok installed", "dpkg");
if (!(options->disabled & FF_PACKAGES_FLAG_LPKG_BIT)) packageCounts->lpkg += getNumStrings(baseDir, "/opt/Loc-OS-LPKG/installed-lpkg/Listinstalled-lpkg.list", "\n", "lpkg");
if (!(options->disabled & FF_PACKAGES_FLAG_EMERGE_BIT)) packageCounts->emerge += countFilesRecursive(baseDir, "/var/db/pkg", "SIZE");
if (!(options->disabled & FF_PACKAGES_FLAG_EOPKG_BIT)) packageCounts->eopkg += getNumElements(baseDir, "/var/lib/eopkg/package", DT_DIR);
if (!(options->disabled & FF_PACKAGES_FLAG_EOPKG_BIT)) packageCounts->eopkg += getNumElements(baseDir, "/var/lib/eopkg/package", true);
if (!(options->disabled & FF_PACKAGES_FLAG_FLATPAK_BIT)) packageCounts->flatpakSystem += getFlatpakPackages(baseDir, "/var/lib");
if (!(options->disabled & FF_PACKAGES_FLAG_NIX_BIT))
{
packageCounts->nixDefault += getNixPackages(baseDir, "/nix/var/nix/profiles/default");
packageCounts->nixSystem += getNixPackages(baseDir, "/run/current-system");
}
if (!(options->disabled & FF_PACKAGES_FLAG_PACMAN_BIT)) packageCounts->pacman += getNumElements(baseDir, "/var/lib/pacman/local", DT_DIR);
if (!(options->disabled & FF_PACKAGES_FLAG_LPKGBUILD_BIT)) packageCounts->lpkgbuild += getNumElements(baseDir, "/opt/Loc-OS-LPKG/lpkgbuild/remove", DT_REG);
if (!(options->disabled & FF_PACKAGES_FLAG_PKGTOOL_BIT)) packageCounts->pkgtool += getNumElements(baseDir, "/var/log/packages", DT_REG);
if (!(options->disabled & FF_PACKAGES_FLAG_PACMAN_BIT)) packageCounts->pacman += getNumElements(baseDir, "/var/lib/pacman/local", true);
if (!(options->disabled & FF_PACKAGES_FLAG_LPKGBUILD_BIT)) packageCounts->lpkgbuild += getNumElements(baseDir, "/opt/Loc-OS-LPKG/lpkgbuild/remove", false);
if (!(options->disabled & FF_PACKAGES_FLAG_PKGTOOL_BIT)) packageCounts->pkgtool += getNumElements(baseDir, "/var/log/packages", false);
if (!(options->disabled & FF_PACKAGES_FLAG_RPM_BIT)) packageCounts->rpm += getSQLite3Int(baseDir, "/var/lib/rpm/rpmdb.sqlite", "SELECT count(*) FROM Packages", "rpm");
if (!(options->disabled & FF_PACKAGES_FLAG_SNAP_BIT)) packageCounts->snap += getSnap(baseDir);
if (!(options->disabled & FF_PACKAGES_FLAG_XBPS_BIT)) packageCounts->xbps += getXBPS(baseDir, "/var/db/xbps");
if (!(options->disabled & FF_PACKAGES_FLAG_BREW_BIT))
{
packageCounts->brewCask += getNumElements(baseDir, "/home/linuxbrew/.linuxbrew/Caskroom", DT_DIR);
packageCounts->brew += getNumElements(baseDir, "/home/linuxbrew/.linuxbrew/Cellar", DT_DIR);
packageCounts->brewCask += getNumElements(baseDir, "/home/linuxbrew/.linuxbrew/Caskroom", true);
packageCounts->brew += getNumElements(baseDir, "/home/linuxbrew/.linuxbrew/Cellar", true);
}
if (!(options->disabled & FF_PACKAGES_FLAG_PALUDIS_BIT)) packageCounts->paludis += countFilesRecursive(baseDir, "/var/db/paludis/repositories", "environment.bz2");
if (!(options->disabled & FF_PACKAGES_FLAG_OPKG_BIT)) packageCounts->opkg += getNumStrings(baseDir, "/usr/lib/opkg/status", "Package:", "opkg"); // openwrt
@@ -592,8 +570,8 @@ static void getPackageCounts(FFstrbuf* baseDir, FFPackagesResult* packageCounts,
{
packageCounts->guixSystem += getGuixPackages(baseDir, "/run/current-system/profile");
}
if (!(options->disabled & FF_PACKAGES_FLAG_LINGLONG_BIT)) packageCounts->linglong += getNumElements(baseDir, "/var/lib/linglong/repo/refs/heads/main", DT_DIR);
if (!(options->disabled & FF_PACKAGES_FLAG_PACSTALL_BIT)) packageCounts->pacstall += getNumElements(baseDir, "/var/lib/pacstall/metadata", DT_REG);
if (!(options->disabled & FF_PACKAGES_FLAG_LINGLONG_BIT)) packageCounts->linglong += getNumElements(baseDir, "/var/lib/linglong/repo/refs/heads/main", true);
if (!(options->disabled & FF_PACKAGES_FLAG_PACSTALL_BIT)) packageCounts->pacstall += getNumElements(baseDir, "/var/lib/pacstall/metadata", false);
if (!(options->disabled & FF_PACKAGES_FLAG_QI_BIT)) packageCounts->qi += getNumStrings(baseDir, "/var/qi/installed_packages.list", "\n", "qi");
}
+6 -29
View File
@@ -2,36 +2,13 @@
#include "common/io/io.h"
static uint32_t getNumElementsImpl(const char* dirname, unsigned char type)
{
FF_AUTO_CLOSE_DIR DIR* dirp = opendir(dirname);
if(dirp == NULL)
return 0;
uint32_t num_elements = 0;
struct dirent *entry;
while((entry = readdir(dirp)) != NULL) {
if(entry->d_type == type)
++num_elements;
}
if(type == DT_DIR && num_elements >= 2)
num_elements -= 2; // accounting for . and ..
return num_elements;
}
void ffDetectPackagesImpl(FFPackagesResult* result, FFPackagesOptions* options)
{
#if __OpenBSD__
if (!(options->disabled & FF_PACKAGES_FLAG_PKG_BIT))
{
result->pkg = getNumElementsImpl(FASTFETCH_TARGET_DIR_ROOT
#if __OpenBSD__
"/var/db/pkg"
#else
"/usr/pkg/pkgdb"
#endif
, DT_DIR);
}
result->pkg = ffPackagesGetNumElements(FASTFETCH_TARGET_DIR_ROOT "/var/db/pkg", true);
#elif __NetBSD__
if (!(options->disabled & FF_PACKAGES_FLAG_PKGSRC_BIT))
result->pkgsrc = ffPackagesGetNumElements(FASTFETCH_TARGET_DIR_ROOT "/usr/pkg/pkgdb", true);
#endif
}
+3
View File
@@ -1,4 +1,5 @@
#include "packages.h"
#include <dirent.h>
void ffDetectPackagesImpl(FFPackagesResult* result, FFPackagesOptions* options)
{
@@ -12,4 +13,6 @@ void ffDetectPackagesImpl(FFPackagesResult* result, FFPackagesOptions* options)
result->pkg = (uint32_t) yyjson_get_uint(packageCount);
}
}
if (!(options->disabled & FF_PACKAGES_FLAG_PKGSRC_BIT))
result->pkgsrc = ffPackagesGetNumElements(FASTFETCH_TARGET_DIR_ROOT "/usr/pkg/pkgdb", true);
}
@@ -173,7 +173,7 @@ const char* ffDetectPhysicalDisk(FFlist* result, FFPhysicalDiskOptions* options)
if (devName[0] == '.')
continue;
char pathSysBlock[ARRAY_SIZE("/sys/block/") + ARRAY_SIZE(sysBlockEntry->d_name)];
char pathSysBlock[sizeof("/sys/block/") + sizeof(sysBlockEntry->d_name)];
snprintf(pathSysBlock, ARRAY_SIZE(pathSysBlock), "/sys/block/%s", devName);
int dfd = openat(dirfd(sysBlockDirp), devName, O_RDONLY | O_CLOEXEC | O_PATH | O_DIRECTORY);
+1 -1
View File
@@ -13,7 +13,7 @@ static void paSinkInfoCallback(pa_context *c, const pa_sink_info *i, int eol, vo
FFSoundDevice* device = ffListAdd(userdata);
ffStrbufInitS(&device->identifier, i->name);
ffStrbufInitS(&device->platformApi, "PulseAudio");
ffStrbufInitStatic(&device->platformApi, "PulseAudio");
ffStrbufTrimRightSpace(&device->identifier);
ffStrbufInitS(&device->name, i->description);
ffStrbufTrimRightSpace(&device->name);
+6 -10
View File
@@ -58,18 +58,14 @@ static void detectGhostty(FFTerminalFontResult* terminalFont)
{"font-size =", &fontSize},
};
if (
#if __APPLE__
!ffParsePropFileConfigValues("com.mitchellh.ghostty/config", 2, fontQueryToml) &&
#endif
!ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml)
) {
ffStrbufAppendS(&terminalFont->error, "Couldn't find file `ghostty/config`");
return;
}
#if __APPLE__
ffParsePropFileConfigValues("com.mitchellh.ghostty/config", 2, fontQueryToml);
#endif
ffParsePropFileConfigValues("ghostty/config", 2, fontQueryToml);
if(fontName.length == 0)
ffStrbufAppendS(&fontName, "JetBrains Mono");
ffStrbufAppendS(&fontName, "JetBrainsMono Nerd Font");
if(fontSize.length == 0)
ffStrbufAppendS(&fontSize, "13");
@@ -57,9 +57,7 @@ static pid_t getShellInfo(FFShellResult* result, pid_t pid)
ffStrbufEqualS(&result->processName, "flashfetch") ||
ffStrbufContainS(&result->processName, "debug") ||
ffStrbufContainS(&result->processName, "command-not-") ||
#ifdef __ANDROID__
ffStrbufEqualS(&result->processName, "proot") ||
#endif
ffStrbufEndsWithS(&result->processName, ".sh")
)
{
@@ -108,9 +106,7 @@ static pid_t getTerminalInfo(FFTerminalResult* result, pid_t pid)
ffStrbufEqualS(&result->processName, "login") ||
ffStrbufEqualS(&result->processName, "clifm") || // https://github.com/leo-arch/clifm/issues/289
ffStrbufEqualS(&result->processName, "chezmoi") || // #762
#ifdef __ANDROID__
ffStrbufEqualS(&result->processName, "proot") ||
#endif
#ifdef __linux__
ffStrbufStartsWithS(&result->processName, "flatpak-") || // #707
#endif
+6 -6
View File
@@ -1,6 +1,6 @@
${c1} /\\ /\\
/${c2}/ ${c1}\\ \\
/${c2}// ${c1}\\ \\
/${c2}// ${c1}\\ \\
${c2}// ${c1}\\ \\
\\
${c1} /\ /\
/${c2}/ ${c1}\ \
/${c2}// ${c1}\ \
/${c2}// ${c1}\ \
${c2}// ${c1}\ \
\
+3 -3
View File
@@ -1,9 +1,9 @@
${c2} _____ ${c1}_____${c2}
-' '-${c1}| |${c2}
/ ___ ${c1}| |${c2}
| / _ \\${c1}|_____|${c2}
' / /_\\ \\
\\ / _____ \\${c4}___
| / _ \${c1}|_____|${c2}
' / /_\ \
\ / _____ \${c4}___
${c3}|${c2}/_/ ${c3}| ${c4}| |
${c3}| | ${c4}|___|
${c3}|_____|
+16
View File
@@ -0,0 +1,16 @@
__
_=(SDGJT=_
_GTDJHGGFCVS)
,GTDJGGDTDFBGX0
${c1} JDJDIJHRORVFSBSVL${c2}-=+=,_
${c1} IJFDUFHJNXIXCDXDSV,${c2} "DEBL
${c1} [LKDSDJTDU=OUSCSBFLD.${c2} '?ZWX,
${c1} ,LMDSDSWH' `DCBOSI${c2} DRDS],
${c1} SDDFDFH' !YEWD,${c2} )HDROD
${c1} !KMDOCG &GSU|${c2}\_GFHRGO\'
${c1} HKLSGP'${c2} __${c1}\TKM0${c2}\GHRBV)'
${c1}JSNRVW'${c2} __+MNAEC${c1}\IOI,${c2}\BN'
${c1}HELK['${c2} __,=OFFXCBGHC${c1}\FD)
${c1}?KGHE ${c2}\_-#DASDFLSV='${c1} 'EF
'EHTI !H
`0F' '!
+8 -8
View File
@@ -3,19 +3,19 @@
G #
6 %
?#M#%KW3"
// \\\
// \\\
// \\\
// \\\
// \\
// \\
// \\
// \\
n%@$DK&ML .0O3#@&M_
P # 8 W
H U G #
B N O @
C&&#%HNAR 'WS3QMHB"
// \\\ \\\
// \\\ \\\
// \\\ \\\
// \\\ \\\
// \\ \\
// \\ \\
// \\ \\
// \\ \\
uURF$##Bv nKWB$%ABc aM@3R@D@b
8 M @ O # %
% & G U @ @
+17 -17
View File
@@ -1,22 +1,22 @@
AA
AaaA
Aa${c2}/\\${c1}aA
${c1} Aa${c2}/${c1}aa${c2}\\${c1}aA
${c1} Aa${c2}/${c1}aAAa${c2}\\${c1}aA
${c1} aA${c2}/${c1}aaAAaa${c2}\\${c1}Aa
${c1} aA${c2}/${c1}aaAAAAaa${c2}\\${c1}Aa
${c1} aaaaaaAAAAa${c2}/${c1}aaAAAAAAaa${c2}\\${c1}aAAAAaaaaa
Aa${c2}/\${c1}aA
${c1} Aa${c2}/${c1}aa${c2}\${c1}aA
${c1} Aa${c2}/${c1}aAAa${c2}\${c1}aA
${c1} aA${c2}/${c1}aaAAaa${c2}\${c1}Aa
${c1} aA${c2}/${c1}aaAAAAaa${c2}\${c1}Aa
${c1} aaaaaaAAAAa${c2}/${c1}aaAAAAAAaa${c2}\${c1}aAAAAaaaaa
${c1}aAAa${c2}-----${c1}aaaaaAAAAAAAAAAaaaaa${c2}-----${c1}aAAa
${c1} aAA${c2}\ ${c1}aAAAAAAAAAAAAAAAAAAAAAAa${c2} /${c1}AAa
${c1} aAa${c2}\\${c1}aAAA${c2}\\${c1}AAAA${c2}\\${c1}AAAA${c2}\\${c1}AAA${c2}\\${c1}AAa${c2}/${c1}aAa
${c1} aAa${c2}\\${c1}aA${c2}\\\\${c1}AAA${c2}\\\\${c1}AAA${c2}\\\\${c1}AA${c2}\\\\/${c1}aAa
${c1} aAA${c2}\\${c1}aA${c2}\\\\${c1}AAA${c2}\\\\${c1}AAA${c2}\\\\${c1}Aa${c2}/${c1}AAa
${c1} aA${c2}\\${c1}aA${c2}\\\\${c1}AAA${c2}\\\\${c1}AAA${c2}\\\\/${c1}Aa
${c1} aA${c2}/${c1}AA${c2}\\\\\\${c1}AA${c2}\\\\\\${c1}AA${c2}\\\\\\${c1}Aa
${c1} aA${c2}/\\${c1}AAa${c2}\\\\\\${c1}Aa${c2}\\\\\\${c1}Aa${c2}\\\\\\${c1}Aa
${c1} aA${c2}/\\\\${c1}AAa${c2}\\\\/\\${c1}a${c2}\\\\\\${c1}Aa${c2}\\\\${c1}Aa
${c1} aA${c2}/${c1}a${c2}\\\\\\${c1}Aa${c2}\\/${c1}AA${c2}\\\\\\\\\\${c1}Aa${c2}\\\\${c1}Aa
${c1} aA${c2}/${c1}aA${c2}\\\\/${c1}aAa aAa${c2}\\\\\\${c1}Aa${c2}\\${c1}Aa
${c1} aA${c2}/\\${c1}A${c2}\\/${c1}Aa aA${c2}\\\\${c1}A${c2}\\\\${c1}Aa
${c1} A${c2}|/${c1}aaAa aAaa${c2}\\|${c1}A
${c1} aAa${c2}\${c1}aAAA${c2}\${c1}AAAA${c2}\${c1}AAAA${c2}\${c1}AAA${c2}\${c1}AAa${c2}/${c1}aAa
${c1} aAa${c2}\${c1}aA${c2}\\${c1}AAA${c2}\\${c1}AAA${c2}\\${c1}AA${c2}\\/${c1}aAa
${c1} aAA${c2}\${c1}aA${c2}\\${c1}AAA${c2}\\${c1}AAA${c2}\\${c1}Aa${c2}/${c1}AAa
${c1} aA${c2}\${c1}aA${c2}\\${c1}AAA${c2}\\${c1}AAA${c2}\\/${c1}Aa
${c1} aA${c2}/${c1}AA${c2}\\\${c1}AA${c2}\\\${c1}AA${c2}\\\${c1}Aa
${c1} aA${c2}/\${c1}AAa${c2}\\\${c1}Aa${c2}\\\${c1}Aa${c2}\\\${c1}Aa
${c1} aA${c2}/\\${c1}AAa${c2}\\/\${c1}a${c2}\\\${c1}Aa${c2}\\${c1}Aa
${c1} aA${c2}/${c1}a${c2}\\\${c1}Aa${c2}\/${c1}AA${c2}\\\\\${c1}Aa${c2}\\${c1}Aa
${c1} aA${c2}/${c1}aA${c2}\\/${c1}aAa aAa${c2}\\\${c1}Aa${c2}\${c1}Aa
${c1} aA${c2}/\${c1}A${c2}\/${c1}Aa aA${c2}\\${c1}A${c2}\\${c1}Aa
${c1} A${c2}|/${c1}aaAa aAaa${c2}\|${c1}A
${c1} aAaa aaAa
+3 -3
View File
@@ -1,7 +1,7 @@
___
(${c3}.· ${c1}|
(${c2}<> ${c1}|
/ ${c3}__ ${c1}\\
( ${c3}/ \\ ${c1}/|
${c2}_${c1}/\\ ${c3}__)${c1}/${c2}_${c1})
/ ${c3}__ ${c1}\
( ${c3}/ \ ${c1}/|
${c2}_${c1}/\ ${c3}__)${c1}/${c2}_${c1})
${c2}\/${c1}-____${c2}\/
+1 -1
View File
@@ -3,7 +3,7 @@ ${c3} !M$EEEEEEEEEEEP
${c3}&MMMMMM${c2}MMMMMMMMMMMMM9
${c3}~MMM${c1}MMMM${c2}MMMMMMMMMMMMC
${c1}" ${c3}M${c1}MMMMMMM${c2}MMMMMMMMMMs
${c1}iM${c2}MMM&&${c1}MMMMMMMM${c2}MMMMMMMM\\
${c1}iM${c2}MMM&&${c1}MMMMMMMM${c2}MMMMMMMMs
${c1}BMMM${c2}MMMMM${c1}MMMMMMM${c2}MMMMMM${c3}"
${c1}9MMMMM${c2}MMMMMMM${c1}MMMM${c2}MMMM${c3}MMMf-
${c2}sMMMMMMMM${c1}MM${c2}M${c3}MMMMMMMMM3_
+4 -4
View File
@@ -4,14 +4,14 @@
"==.__/~|~\__.=="
"==._( Y )_.=="
${c2}.-'~~""~=--...,__${c1}\/|\/${c2}__,...--=~""~~'-.
( ..=${c1}\\=${c1}/${c2}=.. )
`'-. ,.-"`;${c1}/=\\${c2};"-.,_ .-'`
( ..=${c1}\=${c1}/${c2}=.. )
`'-. ,.-"`;${c1}/=\${c2};"-.,_ .-'`
`~"-=-~` .-~` ${c1}|=|${c2} `~-. `~-=-"~`
.-~` /${c1}|=|${c2}\ `~-.
.~` / ${c1}|=|${c2} \ `~.
.-~` .' ${c1}|=|${c2} `. `~-.
(` _,.-="` ${c1} |=|${c2} `"=-.,_ `)
`~"~"` ${c1} |=|${c2} `"~"~`
${c1} /=\\
\\=/
${c1} /=\
\=/
^
+5 -5
View File
@@ -1,6 +1,6 @@
_______
/ ____ \\
/ | / /\\
|__\\ / / |
\\ /__/ /
\\_______/
/ ____ \
/ | / /\
|__\ / / |
\ /__/ /
\_______/
+2 -2
View File
@@ -10,8 +10,8 @@ ee ${c2}`/:oooooooo+: ${c1}ee
ee ${c2}`/+ +++ +: ${c1}ee
ee ${c2}+o+\ ${c1}ee
eee ${c2}+o+\ ${c1}eee
eee ${c2}// \\ooo/ \\\ ${c1}eee
eee ${c2}//++++oooo++++\\\ ${c1}eee
eee ${c2}// \ooo/ \\ ${c1}eee
eee ${c2}//++++oooo++++\\ ${c1}eee
eeee ${c2}::::++oooo+::::: ${c1}eeee
eeeee ${c3}Grombyang OS ${c1} eeee
eeeeeeeeeeeeeeeeeeeeeee
+6 -6
View File
@@ -1,7 +1,7 @@
|.__ __.|
|__ \\ / __|
\\ \\ / /
\\ \\ / /
\\ \\ / /
\\ \\/ /
\\__/
|__ \ / __|
\ \ / /
\ \ / /
\ \ / /
\ \/ /
\__/
+2 -2
View File
@@ -1,7 +1,7 @@
,^,
/ \\
/ \
*--_ ; ; _--*
\\ '" "' /
\ '" "' /
'. .'
.-'" "'-.
'-.__. .__.-'
+20
View File
@@ -0,0 +1,20 @@
,,╥╥╥╦╦╦╥╥,,
,╓╦Ñ╨^`_,,,,,,. `"╨╩Nw
,╥Ñ^`,╥╦╫╫╫╫╫╫╫╫╫╫╫╫ÑN≥,`╙Ñ╦_
,j╩_,╦Ñ╙╙╩╫╫╫╫╫╫╫╫╫╫╫╫╫Ñ╨╨╩N,`╨N,
j╩_╓╫╫Ñ ]N ]╫╫╫╫╫╫╫╫╫╫╫╫_]N ]╫Ñw_╩N
,╫^ ]╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫N_╙╫
_╫`,╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫ `╫
ÑH ╫╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫╫_]Ñ
j╫ ]╫╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫╫H ╫H
j╫ ╟╫╫╫╫╫╫Ñ ╫╫,,,,,,,,,,,,,,,╫╫ ]╫╫╫╫╫╫╫ ╠N
j╫ ]╫╫╫╫╫╫Ñ ╫╫```````````````╫╫ ]╫╫╫╫╫╫╫ 1╡
╫_j╫╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫╫N ╫H
╟H_╫╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫╫ jÑ
_╫╕ ╫╫╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫╫╫ ,╫
╫╥ ╩╫╫╫Ñ ╫╫ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╫╫ ]╫╫╫Ñ ╓Ñ
_╚N_`╫╫Ñ ╩╩ ]╫╫╫╫╫╫╫╫╫╫╫╫ ╩╩ 1╫Ñ`,jÑ_
`╩N,`╨N╦╦Ñ╫╫╫╫╫╫╫╫╫╫╫╫╫N╦╥]╩`,╦╩`
_╙Ñ╦,`"╩Ñ╫╫╫╫╫╫╫╫╫╫╫Ñ╩^`,╥Ñ^_
_"╨N╦w,_ `````_ ,╓╦N╩^
__`"^╙╙╨╙╙^^`__
+4 -4
View File
@@ -1,7 +1,7 @@
|`__.`/
\____/
.--.
/ \\
/ ___ \\
/ .` `.\\
/.` `.\\
/ \
/ ___ \
/ .` `.\
/.` `.\
+14
View File
@@ -0,0 +1,14 @@
$1kB@BB >BWWmm$2
$1$BBBB .kBBBBB"$2
,mp. $1%BBBB {BBBBBF$2
'%BBBBmm $1$BBBR,$BBBBB`$2
`TBBB"` $1$BBBBBBBBBF$2
kBF $1%BBBRRBBBBB.$2
,mmWBBF $1kBBBB `%BBBBm$2
T%BBBB $1%BBBB %BBBBBn$2
`"T%m $1$BBBB "%BBBBm$2
TBm $1"*""" $2,m.$1"F""`$2
{BBBBm,. ,zmBBBm.
!%BBBP"T%BBBBBB""R%BBB
`` %BBBF ``
!BBP
+4 -4
View File
@@ -1,8 +1,8 @@
${c2} __^
${c2} __/ \\
${c2} MMy dMy __/ \\
${c2} dMMy MMy ${c1}MM${c2} \\
${c2} MMMy ,, ${c1}dMMMMn ${c2}\\
${c2} __/ \
${c2} MMy dMy __/ \
${c2} dMMy MMy ${c1}MM${c2} \
${c2} MMMy ,, ${c1}dMMMMn ${c2}\
${c2} dMMy dMM dMMMMMMy ${c1}dMM MM dMMMMMy dMM MM.nMMM dMMMMMM
${c1}MMM ${c2}MMy MMy MMy ${c1}dMM MMy MMy MMy MMy dy dMy
${c1}MMM ${c2}dMM dMM MMy ${c1}dMMMMy dMM dMM dMM dMM dMMMMMMM
+7 -7
View File
@@ -1,7 +1,7 @@
/\\
/ \\
/ ${c2}/ ${c1}/
> ${c2}/ ${c1}/
\\ ${c2}\\ ${c1}\\
\\_${c2}\\${c1}_\\
${c2} \\
/\
/ \
/ ${c2}/ ${c1}/
/ ${c2}/ ${c1}/
\ ${c2}\ ${c1}\
\_${c2}\${c1}_\
${c2} \
+4 -4
View File
@@ -1,7 +1,7 @@
*
*
**
${c2} /\\__/\\
/ \\
\\ /
\\____/
${c2} /\__/\
/ \
\ /
\____/
+7 -7
View File
@@ -1,7 +1,7 @@
\\\\ /
\\\\/
\\\\
/\\/ \\\\
/ \\ /\\
/ \\/ \\
/__________\\
\\ /
\\/
\\
/\/ \\
/ \ /\
/ \/ \
/__________\
+8
View File
@@ -0,0 +1,8 @@
$2 \\$1`-______,----__
$2 \\ $1 __,---`_
$2 \\ $1 `.____
$2 \\$1-______,----`-
$2 \\
$2 \\
$2 \\
$2 \\
+6 -6
View File
@@ -1,13 +1,13 @@
_======__
(===============\\
(===================\\
(===============\
(===================\
_ _---__
(= ====-
(= ======
(== ======
(== ======
(==\\ \\=-_ _=/ /====/
(==\\ \\========/ /====/ /====-_
(==\\ \\=====/ /==/ /===--
(==\ \=-_ _=/ /====/
(==\ \========/ /====/ /====-_
(==\ \=====/ /==/ /===--
/================/ /===-
\\===========/
\===========/
+8 -8
View File
@@ -7,17 +7,17 @@ $1 / ||\| Y J ) / |/| ./
J |)'( | ` F`.'/ $3 _
$1 -<| F __ .-< $3(_)
$1 | / .-'$3. $1`. /$3-. $1L___
J \\ < $3\ $1 | | $5O$3\\$1|.-' $3 _
$1 _J \\ .- \\$3/ $5O $3| $1| \\ |$1F $3(_)
$1 '-F -<_. \\ .-' `-' L__
J \ < $3\ $1 | | $5O$3\$1|.-' $3 _
$1 _J \ .- \$3/ $5O $3| $1| \ |$1F $3(_)
$1 '-F -<_. \ .-' `-' L__
__J _ _. >-' $1)$4._. $1|-'
$1 `-|.' /_. $4\_| $1 F
/.- . _.<
/' /.' .' `\\
/L /' |/ _.-'-\\
/' /.' .' `\
/L /' |/ _.-'-\
/'J ___.---'\|
|\ .--' V | `. `
|/`. `-. `._)
/ .-.\\
\\ ( `\\
`.\\
/ .-.\
\ ( `\
`.\
+5 -5
View File
@@ -1,7 +1,7 @@
$1 _____
\\- -/
\\_/ \\
_____
\- -/
\_/ \
| $2O O$1 |
|_ < ) 3 )
/ \\ /
/-_____-\\
/ \ /
/-_____-\
+22
View File
@@ -0,0 +1,22 @@
@@@@@@@@@@
@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@ @@@@@@@@@@@
@@@@@@@@ @@@@@@@@@
@@@@@@@@ @@@@@@@@
@@@@@@@ @@@@@@@
@@@@@@@@ @@@@@@@
@@@@@@@@ @@@@@@
@@@@@@@@@ @@@@@@
@@@@@@@@@@ @@@@@@
@@@@@@@@@@ @@@@@@
@@@@@@@@@ @@@@@@
@@@@@@@@ @@@@@@
@@@@@@@@ @@@@@@@
@@@@@@@ @@@@@@@
@@@@@@@@ @@@@@@@@
@@@@@@@@ @@@@@@@@
@@@@@@@@@@ @@@@@@@@@@@
@@@@@@@@@@@@@@@@@@@@@@@@
@@@@@@@@@@@@@@@@@@
@@@@@@@@@@
+2 -2
View File
@@ -1,7 +1,7 @@
A
VW
VVW\\
.yWWW\\
VVW\
.yWWW\
,;,,u,;yy;;v;uyyyyyyy ,WWWWW^
*WWWWWWWWWWWWWWWW/ $VWWWWw ,
^*%WWWWWWVWWX $WWWW** ,yy
+4 -4
View File
@@ -1,7 +1,7 @@
/\ /\
( \\\\ // )
\ \\\\ // /
\_\\\\||||//_/
( \\ // )
\ \\ // /
\_\\||||//_/
\/ _ _ \
\/|(O)(O)|
\/ | |
@@ -17,4 +17,4 @@
| | | | | ||
| | | | | ||
|_| |_| |_||
\_\ \_\ \_\\
\_\ \_\ \_\
+56 -4
View File
@@ -378,6 +378,18 @@ static const FFlogo A[] = {
FF_COLOR_FG_CYAN,
},
},
// ArchOld
{
.names = {"arch_old"},
.type = FF_LOGO_LINE_TYPE_ALTER_BIT,
.lines = FASTFETCH_DATATEXT_LOGO_ARCH_OLD,
.colors = {
FF_COLOR_FG_CYAN,
FF_COLOR_FG_WHITE,
},
.colorTitle = FF_COLOR_FG_DEFAULT,
.colorKeys = FF_COLOR_FG_CYAN,
},
// Archlabs
{
.names = {"ARCHlabs"},
@@ -2047,6 +2059,16 @@ static const FFlogo H[] = {
FF_COLOR_FG_256 "123",
},
},
// HeliumOS
{
.names = {"HeliumOS"},
.lines = FASTFETCH_DATATEXT_LOGO_HELIUMOS,
.colors = {
FF_COLOR_FG_256 "81",
},
.colorKeys = FF_COLOR_FG_256 "81",
.colorTitle = FF_COLOR_FG_DEFAULT,
},
// Huawei Cloud EulerOS
{
.names = {"Huawei Cloud EulerOS", "hce"},
@@ -2263,6 +2285,15 @@ static const FFlogo K[] = {
FF_COLOR_FG_MAGENTA,
}
},
// KDELinux
{
.names = {"kdelinux", "kde-linux"},
.lines = FASTFETCH_DATATEXT_LOGO_KDELINUX,
.colors = {
FF_COLOR_FG_YELLOW,
FF_COLOR_FG_WHITE
}
},
// KDENeon
{
.names = {"KDE", "kde-neon", "kde neon"},
@@ -3075,13 +3106,25 @@ static const FFlogo N[] = {
},
// NetBSD
{
.names = {"netbsd"},
.names = {"NetBSD"},
.lines = FASTFETCH_DATATEXT_LOGO_NETBSD,
.colors = {
FF_COLOR_FG_MAGENTA,
FF_COLOR_FG_RED,
FF_COLOR_FG_WHITE,
},
.colorKeys = FF_COLOR_FG_MAGENTA,
.colorKeys = FF_COLOR_FG_RED,
.colorTitle = FF_COLOR_FG_WHITE,
},
// NetBSD Small
{
.names = {"NetBSD_small"},
.lines = FASTFETCH_DATATEXT_LOGO_NETBSD_SMALL,
.type = FF_LOGO_LINE_TYPE_SMALL_BIT,
.colors = {
FF_COLOR_FG_RED,
FF_COLOR_FG_WHITE,
},
.colorKeys = FF_COLOR_FG_RED,
.colorTitle = FF_COLOR_FG_WHITE,
},
// Nobara
@@ -3389,6 +3432,15 @@ static const FFlogo O[] = {
.colorKeys = FF_COLOR_FG_WHITE,
.colorTitle = FF_COLOR_FG_MAGENTA,
},
// Oreon
{
.names = {"Oreon"},
.lines = FASTFETCH_DATATEXT_LOGO_OREON,
.colors = {
FF_COLOR_FG_DEFAULT,
FF_COLOR_FG_DEFAULT,
},
},
// OS_Elbrus
{
.names = {"OS Elbrus"},
@@ -4245,7 +4297,7 @@ static const FFlogo S[] = {
// SnigdhaOS
{
.names = {"SnigdhaOS", "Snigdha"},
.lines = FASTFETCH_DATATEXT_LOGO_SMARTOS,
.lines = FASTFETCH_DATATEXT_LOGO_SNIGDHAOS,
.colors = {
FF_COLOR_FG_CYAN,
FF_COLOR_FG_WHITE,
+21 -1
View File
@@ -125,6 +125,17 @@ static void printDisk(FFDiskOptions* options, const FFDisk* disk, uint32_t index
bool isHidden = !!(disk->type & FF_DISK_VOLUME_TYPE_HIDDEN_BIT);
bool isReadOnly = !!(disk->type & FF_DISK_VOLUME_TYPE_READONLY_BIT);
uint64_t duration = ffTimeGetNow() - disk->createTime;
uint32_t milliseconds = (uint32_t) (duration % 1000);
duration /= 1000;
uint32_t seconds = (uint32_t) (duration % 60);
duration /= 60;
uint32_t minutes = (uint32_t) (duration % 60);
duration /= 60;
uint32_t hours = (uint32_t) (duration % 24);
duration /= 24;
uint32_t days = (uint32_t) duration;
FF_PRINT_FORMAT_CHECKED(key.chars, 0, &options->moduleArgs, FF_PRINT_TYPE_NO_CUSTOM_KEY, ((FFformatarg[]) {
FF_FORMAT_ARG(usedPretty, "size-used"),
FF_FORMAT_ARG(totalPretty, "size-total"),
@@ -140,6 +151,11 @@ static void printDisk(FFDiskOptions* options, const FFDisk* disk, uint32_t index
{FF_FORMAT_ARG_TYPE_STRING, ffTimeToShortStr(disk->createTime), "create-time"},
FF_FORMAT_ARG(bytesPercentageBar, "size-percentage-bar"),
FF_FORMAT_ARG(filesPercentageBar, "files-percentage-bar"),
FF_FORMAT_ARG(days, "days"),
FF_FORMAT_ARG(hours, "hours"),
FF_FORMAT_ARG(minutes, "minutes"),
FF_FORMAT_ARG(seconds, "seconds"),
FF_FORMAT_ARG(milliseconds, "milliseconds"),
}));
}
}
@@ -462,7 +478,11 @@ static FFModuleBaseInfo ffModuleInfo = {
{"Create time in local timezone", "create-time"},
{"Size percentage bar", "size-percentage-bar"},
{"Files percentage bar", "files-percentage-bar"},
{},
{"Days after creation", "days"},
{"Hours after creation", "hours"},
{"Minutes after creation", "minutes"},
{"Seconds after creation", "seconds"},
{"Milliseconds after creation", "milliseconds"},
}))
};
+1 -1
View File
@@ -26,7 +26,7 @@ static void printGPUResult(FFGPUOptions* options, uint8_t index, const FFGPUResu
FF_STRBUF_AUTO_DESTROY output = ffStrbufCreate();
if(gpu->vendor.length > 0 && !ffStrbufStartsWith(&gpu->name, &gpu->vendor))
if(gpu->vendor.length > 0 && !ffStrbufStartsWithIgnCase(&gpu->name, &gpu->vendor))
{
ffStrbufAppend(&output, &gpu->vendor);
ffStrbufAppendC(&output, ' ');
+1
View File
@@ -35,6 +35,7 @@ typedef enum __attribute__((__packed__)) FFPackagesFlags
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_FORCE_UNSIGNED = UINT32_MAX,
} FFPackagesFlags;
static_assert(sizeof(FFPackagesFlags) == sizeof(uint32_t), "");
+7
View File
@@ -50,6 +50,7 @@ void ffPrintPackages(FFPackagesOptions* options)
FF_PRINT_PACKAGE_NAME(nixDefault, "nix-default")
FF_PRINT_PACKAGE(apk)
FF_PRINT_PACKAGE(pkg)
FF_PRINT_PACKAGE(pkgsrc)
FF_PRINT_PACKAGE_NAME(flatpakSystem, counts.flatpakUser ? "flatpak-system" : "flatpak")
FF_PRINT_PACKAGE_NAME(flatpakUser, "flatpak-user")
FF_PRINT_PACKAGE(snap)
@@ -121,6 +122,7 @@ void ffPrintPackages(FFPackagesOptions* options)
FF_FORMAT_ARG(counts.mport, "mport"),
FF_FORMAT_ARG(counts.qi, "qi"),
FF_FORMAT_ARG(counts.amUser, "am-user"),
FF_FORMAT_ARG(counts.pkgsrc, "pkgsrc"),
FF_FORMAT_ARG(nixAll, "nix-all"),
FF_FORMAT_ARG(flatpakAll, "flatpak-all"),
FF_FORMAT_ARG(brewAll, "brew-all"),
@@ -197,6 +199,7 @@ bool ffParsePackagesCommandOptions(FFPackagesOptions* options, const char* key,
FF_TEST_PACKAGE_NAME(PALUDIS)
FF_TEST_PACKAGE_NAME(PKG)
FF_TEST_PACKAGE_NAME(PKGTOOL)
FF_TEST_PACKAGE_NAME(PKGSRC)
break;
case 'Q': if (false);
FF_TEST_PACKAGE_NAME(QI)
@@ -311,6 +314,7 @@ void ffParsePackagesJsonObject(FFPackagesOptions* options, yyjson_val* module)
FF_TEST_PACKAGE_NAME(PALUDIS)
FF_TEST_PACKAGE_NAME(PKG)
FF_TEST_PACKAGE_NAME(PKGTOOL)
FF_TEST_PACKAGE_NAME(PKGSRC)
break;
case 'Q': if (false);
FF_TEST_PACKAGE_NAME(QI)
@@ -373,6 +377,7 @@ void ffGeneratePackagesJsonConfig(FFPackagesOptions* options, yyjson_mut_doc* do
FF_TEST_PACKAGE_NAME(PALUDIS)
FF_TEST_PACKAGE_NAME(PKG)
FF_TEST_PACKAGE_NAME(PKGTOOL)
FF_TEST_PACKAGE_NAME(PKGSRC)
FF_TEST_PACKAGE_NAME(QI)
FF_TEST_PACKAGE_NAME(RPM)
FF_TEST_PACKAGE_NAME(SCOOP)
@@ -427,6 +432,7 @@ void ffGeneratePackagesJsonResult(FF_MAYBE_UNUSED FFPackagesOptions* options, yy
FF_APPEND_PACKAGE_COUNT(paludis)
FF_APPEND_PACKAGE_COUNT(pkg)
FF_APPEND_PACKAGE_COUNT(pkgtool)
FF_APPEND_PACKAGE_COUNT(pkgsrc)
FF_APPEND_PACKAGE_COUNT(qi)
FF_APPEND_PACKAGE_COUNT(macports)
FF_APPEND_PACKAGE_COUNT(rpm)
@@ -484,6 +490,7 @@ static FFModuleBaseInfo ffModuleInfo = {
{"Number of mport packages", "mport"},
{"Number of qi packages", "qi"},
{"Number of am-user (aka appman) packages", "am-user"},
{"Number of pkgsrc packages", "pkgsrc"},
{"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 -1
View File
@@ -278,7 +278,7 @@ void ffInitPhysicalDiskOptions(FFPhysicalDiskOptions* options)
ffStrbufInit(&options->namePrefix);
options->temp = false;
options->tempConfig = (FFColorRangeConfig) { 40, 60 };
options->tempConfig = (FFColorRangeConfig) { 50, 70 };
}
void ffDestroyPhysicalDiskOptions(FFPhysicalDiskOptions* options)
+2
View File
@@ -105,6 +105,7 @@ void ffPrintSound(FFSoundOptions* options)
{
ffStrbufDestroy(&device->identifier);
ffStrbufDestroy(&device->name);
ffStrbufDestroy(&device->platformApi);
}
}
@@ -226,6 +227,7 @@ void ffGenerateSoundJsonResult(FF_MAYBE_UNUSED FFSoundOptions* options, yyjson_m
{
ffStrbufDestroy(&device->identifier);
ffStrbufDestroy(&device->name);
ffStrbufDestroy(&device->platformApi);
}
}
+22
View File
@@ -62,16 +62,33 @@ void ffPrintUsers(FFUsersOptions* options)
}
else
{
uint64_t now = ffTimeGetNow();
for(uint32_t i = 0; i < users.length; ++i)
{
FFUserResult* user = FF_LIST_GET(FFUserResult, users, i);
uint64_t duration = now - user->loginTime;
uint32_t milliseconds = (uint32_t) (duration % 1000);
duration /= 1000;
uint32_t seconds = (uint32_t) (duration % 60);
duration /= 60;
uint32_t minutes = (uint32_t) (duration % 60);
duration /= 60;
uint32_t hours = (uint32_t) (duration % 24);
duration /= 24;
uint32_t days = (uint32_t) duration;
FF_PRINT_FORMAT_CHECKED(FF_USERS_MODULE_NAME, users.length == 1 ? 0 : (uint8_t) (i + 1), &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, ((FFformatarg[]){
FF_FORMAT_ARG(user->name, "name"),
FF_FORMAT_ARG(user->hostName, "host-name"),
FF_FORMAT_ARG(user->sessionName, "session-name"),
FF_FORMAT_ARG(user->clientIp, "client-ip"),
{FF_FORMAT_ARG_TYPE_STRING, ffTimeToShortStr(user->loginTime), "login-time"},
FF_FORMAT_ARG(days, "days"),
FF_FORMAT_ARG(hours, "hours"),
FF_FORMAT_ARG(minutes, "minutes"),
FF_FORMAT_ARG(seconds, "seconds"),
FF_FORMAT_ARG(milliseconds, "milliseconds"),
}));
}
}
@@ -200,6 +217,11 @@ static FFModuleBaseInfo ffModuleInfo = {
{"Session name", "session"},
{"Client IP", "client-ip"},
{"Login Time in local timezone", "login-time"},
{"Days after login", "days"},
{"Hours after login", "hours"},
{"Minutes after login", "minutes"},
{"Seconds after login", "seconds"},
{"Milliseconds after login", "milliseconds"},
}))
};