mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
Merge pull request #1526 from fastfetch-cli/dev
Some checks failed
CI / spellcheck (push) Has been cancelled
CI / No-features-test (push) Has been cancelled
CI / Linux-amd64 (push) Has been cancelled
CI / Linux-aarch64 (push) Has been cancelled
CI / Linux-armv7 (push) Has been cancelled
CI / Linux-armv6 (push) Has been cancelled
CI / Linux-riscv64 (push) Has been cancelled
CI / Linux-ppc64le (push) Has been cancelled
CI / Musl-amd64 (push) Has been cancelled
CI / macOS-universal (push) Has been cancelled
CI / SunOS-amd64 (push) Has been cancelled
CI / FreeBSD-amd64 (push) Has been cancelled
CI / DragonFly-amd64 (push) Has been cancelled
CI / OpenBSD-amd64 (push) Has been cancelled
CI / NetBSD-amd64 (push) Has been cancelled
CI / Windows-amd64 (push) Has been cancelled
CI / Release (push) Has been cancelled
Some checks failed
CI / spellcheck (push) Has been cancelled
CI / No-features-test (push) Has been cancelled
CI / Linux-amd64 (push) Has been cancelled
CI / Linux-aarch64 (push) Has been cancelled
CI / Linux-armv7 (push) Has been cancelled
CI / Linux-armv6 (push) Has been cancelled
CI / Linux-riscv64 (push) Has been cancelled
CI / Linux-ppc64le (push) Has been cancelled
CI / Musl-amd64 (push) Has been cancelled
CI / macOS-universal (push) Has been cancelled
CI / SunOS-amd64 (push) Has been cancelled
CI / FreeBSD-amd64 (push) Has been cancelled
CI / DragonFly-amd64 (push) Has been cancelled
CI / OpenBSD-amd64 (push) Has been cancelled
CI / NetBSD-amd64 (push) Has been cancelled
CI / Windows-amd64 (push) Has been cancelled
CI / Release (push) Has been cancelled
Release: v2.35.0
This commit is contained in:
commit
865929b173
80
.github/ISSUE_TEMPLATE/bug_report.md
vendored
80
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -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
.github/ISSUE_TEMPLATE/bug_report_crash.yml
vendored
Normal file
113
.github/ISSUE_TEMPLATE/bug_report_crash.yml
vendored
Normal 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
|
106
.github/ISSUE_TEMPLATE/bug_report_general.yml
vendored
Normal file
106
.github/ISSUE_TEMPLATE/bug_report_general.yml
vendored
Normal file
@ -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
.github/ISSUE_TEMPLATE/bug_report_logo.yml
vendored
Normal file
129
.github/ISSUE_TEMPLATE/bug_report_logo.yml
vendored
Normal 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
.github/ISSUE_TEMPLATE/feature_request.md
vendored
18
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -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 -->
|
40
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
40
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
Normal file
@ -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
.github/ISSUE_TEMPLATE/logo_request.md
vendored
23
.github/ISSUE_TEMPLATE/logo_request.md
vendored
@ -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
.github/ISSUE_TEMPLATE/logo_request.yml
vendored
Normal file
38
.github/ISSUE_TEMPLATE/logo_request.yml
vendored
Normal 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
.github/workflows/ci.yml
vendored
37
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
35
CHANGELOG.md
35
CHANGELOG.md
@ -1,3 +1,38 @@
|
||||
# 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.
|
||||
|
@ -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.1
|
||||
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")
|
||||
@ -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}")
|
||||
|
6
debian/changelog
vendored
6
debian/changelog
vendored
@ -1,3 +1,9 @@
|
||||
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
|
||||
|
2
debian/files
vendored
2
debian/files
vendored
@ -1 +1 @@
|
||||
fastfetch_2.34.0_source.buildinfo universe/utils optional
|
||||
fastfetch_2.34.1_source.buildinfo universe/utils optional
|
||||
|
@ -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": {
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
|
@ -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))
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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
|
||||
|
@ -167,11 +167,11 @@ static struct kde_output_device_v2_listener outputListener = {
|
||||
.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 = {
|
||||
@ -185,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);
|
||||
|
||||
@ -233,6 +242,8 @@ void ffWaylandHandleKdeOutput(WaylandData* wldata, struct wl_registry* registry,
|
||||
ffStrbufDestroy(&display.description);
|
||||
ffStrbufDestroy(&display.name);
|
||||
ffStrbufDestroy(&display.edidName);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
@ -243,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
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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()
|
||||
|
@ -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");
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -1,6 +1,6 @@
|
||||
${c1} /\\ /\\
|
||||
/${c2}/ ${c1}\\ \\
|
||||
/${c2}// ${c1}\\ \\
|
||||
/${c2}// ${c1}\\ \\
|
||||
${c2}// ${c1}\\ \\
|
||||
\\
|
||||
${c1} /\ /\
|
||||
/${c2}/ ${c1}\ \
|
||||
/${c2}// ${c1}\ \
|
||||
/${c2}// ${c1}\ \
|
||||
${c2}// ${c1}\ \
|
||||
\
|
@ -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
src/logo/ascii/arch_old.txt
Normal file
16
src/logo/ascii/arch_old.txt
Normal 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' '!
|
@ -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 @ @
|
||||
|
@ -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
|
@ -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}\/
|
@ -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,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} /=\
|
||||
\=/
|
||||
^
|
@ -1,6 +1,6 @@
|
||||
_______
|
||||
/ ____ \\
|
||||
/ | / /\\
|
||||
|__\\ / / |
|
||||
\\ /__/ /
|
||||
\\_______/
|
||||
/ ____ \
|
||||
/ | / /\
|
||||
|__\ / / |
|
||||
\ /__/ /
|
||||
\_______/
|
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
|.__ __.|
|
||||
|__ \\ / __|
|
||||
\\ \\ / /
|
||||
\\ \\ / /
|
||||
\\ \\ / /
|
||||
\\ \\/ /
|
||||
\\__/
|
||||
|__ \ / __|
|
||||
\ \ / /
|
||||
\ \ / /
|
||||
\ \ / /
|
||||
\ \/ /
|
||||
\__/
|
@ -1,7 +1,7 @@
|
||||
,^,
|
||||
/ \\
|
||||
/ \
|
||||
*--_ ; ; _--*
|
||||
\\ '" "' /
|
||||
\ '" "' /
|
||||
'. .'
|
||||
.-'" "'-.
|
||||
'-.__. .__.-'
|
||||
|
@ -1,7 +1,7 @@
|
||||
|`__.`/
|
||||
\____/
|
||||
.--.
|
||||
/ \\
|
||||
/ ___ \\
|
||||
/ .` `.\\
|
||||
/.` `.\\
|
||||
/ \
|
||||
/ ___ \
|
||||
/ .` `.\
|
||||
/.` `.\
|
14
src/logo/ascii/kdelinux.txt
Normal file
14
src/logo/ascii/kdelinux.txt
Normal 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
|
@ -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
|
||||
|
@ -1,7 +1,7 @@
|
||||
/\\
|
||||
/ \\
|
||||
/ ${c2}/ ${c1}/
|
||||
> ${c2}/ ${c1}/
|
||||
\\ ${c2}\\ ${c1}\\
|
||||
\\_${c2}\\${c1}_\\
|
||||
${c2} \\
|
||||
/\
|
||||
/ \
|
||||
/ ${c2}/ ${c1}/
|
||||
/ ${c2}/ ${c1}/
|
||||
\ ${c2}\ ${c1}\
|
||||
\_${c2}\${c1}_\
|
||||
${c2} \
|
@ -1,7 +1,7 @@
|
||||
*
|
||||
*
|
||||
**
|
||||
${c2} /\\__/\\
|
||||
/ \\
|
||||
\\ /
|
||||
\\____/
|
||||
${c2} /\__/\
|
||||
/ \
|
||||
\ /
|
||||
\____/
|
@ -1,7 +1,7 @@
|
||||
\\\\ /
|
||||
\\\\/
|
||||
\\\\
|
||||
/\\/ \\\\
|
||||
/ \\ /\\
|
||||
/ \\/ \\
|
||||
/__________\\
|
||||
\\ /
|
||||
\\/
|
||||
\\
|
||||
/\/ \\
|
||||
/ \ /\
|
||||
/ \/ \
|
||||
/__________\
|
@ -1,13 +1,13 @@
|
||||
_======__
|
||||
(===============\\
|
||||
(===================\\
|
||||
(===============\
|
||||
(===================\
|
||||
_ _---__
|
||||
(= ====-
|
||||
(= ======
|
||||
(== ======
|
||||
(== ======
|
||||
(==\\ \\=-_ _=/ /====/
|
||||
(==\\ \\========/ /====/ /====-_
|
||||
(==\\ \\=====/ /==/ /===--
|
||||
(==\ \=-_ _=/ /====/
|
||||
(==\ \========/ /====/ /====-_
|
||||
(==\ \=====/ /==/ /===--
|
||||
/================/ /===-
|
||||
\\===========/
|
||||
\===========/
|
@ -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 | `. `
|
||||
|/`. `-. `._)
|
||||
/ .-.\\
|
||||
\\ ( `\\
|
||||
`.\\
|
||||
/ .-.\
|
||||
\ ( `\
|
||||
`.\
|
@ -1,7 +1,7 @@
|
||||
$1 _____
|
||||
\\- -/
|
||||
\\_/ \\
|
||||
_____
|
||||
\- -/
|
||||
\_/ \
|
||||
| $2O O$1 |
|
||||
|_ < ) 3 )
|
||||
/ \\ /
|
||||
/-_____-\\
|
||||
/ \ /
|
||||
/-_____-\
|
@ -1,7 +1,7 @@
|
||||
A
|
||||
VW
|
||||
VVW\\
|
||||
.yWWW\\
|
||||
VVW\
|
||||
.yWWW\
|
||||
,;,,u,;yy;;v;uyyyyyyy ,WWWWW^
|
||||
*WWWWWWWWWWWWWWWW/ $VWWWWw ,
|
||||
^*%WWWWWWVWWX $WWWW** ,yy
|
||||
|
@ -1,7 +1,7 @@
|
||||
/\ /\
|
||||
( \\\\ // )
|
||||
\ \\\\ // /
|
||||
\_\\\\||||//_/
|
||||
( \\ // )
|
||||
\ \\ // /
|
||||
\_\\||||//_/
|
||||
\/ _ _ \
|
||||
\/|(O)(O)|
|
||||
\/ | |
|
||||
@ -17,4 +17,4 @@
|
||||
| | | | | ||
|
||||
| | | | | ||
|
||||
|_| |_| |_||
|
||||
\_\ \_\ \_\\
|
||||
\_\ \_\ \_\
|
@ -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"},
|
||||
@ -2273,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"},
|
||||
@ -3103,7 +3124,7 @@ static const FFlogo N[] = {
|
||||
FF_COLOR_FG_RED,
|
||||
FF_COLOR_FG_WHITE,
|
||||
},
|
||||
.colorKeys = FF_COLOR_FG_MAGENTA,
|
||||
.colorKeys = FF_COLOR_FG_RED,
|
||||
.colorTitle = FF_COLOR_FG_WHITE,
|
||||
},
|
||||
// Nobara
|
||||
|
@ -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"},
|
||||
}))
|
||||
};
|
||||
|
||||
|
@ -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), "");
|
||||
|
@ -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"},
|
||||
|
@ -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)
|
||||
|
@ -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"},
|
||||
}))
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user