Skip to content

Commit

Permalink
Merge pull request #794 from fastfetch-cli/dev
Browse files Browse the repository at this point in the history
Release: v2.9.2
  • Loading branch information
CarterLi committed Apr 16, 2024
2 parents fd41770 + 40b9af6 commit 6769410
Show file tree
Hide file tree
Showing 34 changed files with 522 additions and 138 deletions.
12 changes: 7 additions & 5 deletions .github/ISSUE_TEMPLATE/bug_report.md
Expand Up @@ -13,6 +13,7 @@ assignees: ''

* 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 (What package manager) / Built from source yourself -->
* Does this issue still occurs in [the latest dev build](https://github.com/fastfetch-cli/fastfetch/actions/)?
Expand Down Expand Up @@ -41,18 +42,19 @@ Output of `fastfetch --list-features`:
//paste here
```

## If fastfatch crashed
## If fastfatch crashed or freezed

Paste the stacktrace here. You may get it with:

```
$ gdb -q -ex 'set confirm off' -ex run -ex 'bt full' -ex quit --args /path/to/fastfetch
```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

```
$ strace /path/to/fastfetch --multithreading false --structure {MODULE} --pipe
```shell
strace /path/to/fastfetch --multithreading false -s {MODULE} --pipe
```

If you cannot do the instructions above, please upload the core dump file:
Expand Down
26 changes: 22 additions & 4 deletions .github/ISSUE_TEMPLATE/feature_request.md
Expand Up @@ -7,10 +7,28 @@ assignees: ''

---

<!-- Before requesting a new feature, please try `fastfetch -c all.jsonc` to see if it has been supported -->
## Before requesting a new feature

# Current state:
* A lot of features are not enabled by default. Please try `fastfetch --list-modules` and `fastfetch -c all.jsonc` to see if it has been supported
* Fastfetch supports `Command` module, which can be used to grab output from a custom shell script. Please check if it fits your needs

# Wanted state:
```jsonc
// ~/.config/fastfetch/fastfetch.jsonc
{
"modules": [
{
"type": "command",
"text": "/path/to/your/script",
"key": "Feature Title"
}
]
}
```

# Why the change is sensible:
## Wanted features:

<!-- Your features here -->

## Motivation:

<!-- Your motivation here -->
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/logo_request.md
Expand Up @@ -7,6 +7,8 @@ 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 here. If this file doesn't exist, describe a way to identify the distro.
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,23 @@
# 2.9.2

Changes:
* To make use of the newly introduced `yyjson` flag `YYJSON_WRITE_NEWLINE_AT_END`, fastfetch now requires `yyjson` 0.9.0 or later

Features:
* Always add a final new-line when generating JSON output
* Detect partition create time, which can be used as OS installation time (Disk)
* Print time string when generating JSON result instead of UNIX epoch time number, which is more human-readable

Bugfixes:
* Fix a memory leak
* Better portable mode detection of Windows Terminal (TerminalFont, Windows)
* Fix parsing of option `--packages-disabled` (Packages)
* Don't use command `time` as a shell (Shell)

Logos:
* Add openSUSE MicroOS
* Fix color of AOSC OS

# 2.9.1

Features:
Expand Down
9 changes: 8 additions & 1 deletion CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.9.1
VERSION 2.9.2
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -699,6 +699,9 @@ check_function_exists(wcwidth HAVE_WCWIDTH)
if(NOT HAVE_WCWIDTH)
list(APPEND LIBFASTFETCH_SRC src/3rdparty/mk_wcwidch/wcwidth.c)
endif()
if(LINUX)
check_function_exists(statx HAVE_STATX)
endif()

if(ENABLE_SYSTEM_YYJSON)
find_package(yyjson)
Expand Down Expand Up @@ -762,6 +765,10 @@ elseif(APPLE)
target_compile_definitions(libfastfetch PUBLIC _DARWIN_C_SOURCE)
endif()

if(HAVE_STATX)
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_STATX)
endif()

if(HAVE_WCWIDTH)
target_compile_definitions(libfastfetch PRIVATE FF_HAVE_WCWIDTH)
endif()
Expand Down
133 changes: 133 additions & 0 deletions CODE_OF_CONDUCT.md
@@ -0,0 +1,133 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our
community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.

Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official email address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
[INSERT CONTACT METHOD].
All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the
reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of
actions.

**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the
community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations
33 changes: 29 additions & 4 deletions doc/json_schema.json
Expand Up @@ -730,7 +730,6 @@
},
{
"type": "object",
"additionalProperties": false,
"description": "Run module with custom configurations",
"required": [
"type"
Expand Down Expand Up @@ -1577,9 +1576,35 @@
"description": "List installed package managers and count of installed packages"
},
"disabled": {
"description": "A colon separated list of package managers to be disabled when detecting",
"type": "string",
"default": "winget"
"description": "List of package managers to be disabled when detecting",
"type": "array",
"items": {
"type": "string",
"enum": [
"am",
"apk",
"brew",
"choco",
"dpkg",
"emerge",
"eopkg",
"flatpak",
"macports",
"nix",
"opkg",
"pacman",
"paludis",
"pkg",
"pkgtool",
"rpm",
"scoop",
"snap",
"winget",
"xbps"
],
"uniqueItems": true
},
"default": ["winget"]
},
"key": {
"$ref": "#/$defs/key"
Expand Down
6 changes: 3 additions & 3 deletions presets/examples/10.jsonc
Expand Up @@ -84,17 +84,17 @@
},
{
"type": "host",
"key": " PC",
"key": "󰌢 PC",
"keyColor": "green"
},
{
"type": "cpu",
"key": "│ ├",
"key": "│ ├󰻠",
"keyColor": "green"
},
{
"type": "gpu",
"key": "│ ├",
"key": "│ ├󰍛",
"keyColor": "green"
},
{
Expand Down
6 changes: 3 additions & 3 deletions presets/examples/12.jsonc
Expand Up @@ -23,7 +23,7 @@
"type": "os"
},
{
"key": " Machine ",
"key": " 󰌢 Machine ",
"keyColor": "green",
"type": "host"
},
Expand Down Expand Up @@ -64,12 +64,12 @@
"type": "terminal"
},
{
"key": " CPU ",
"key": " 󰻠 CPU ",
"keyColor": "yellow",
"type": "cpu"
},
{
"key": " GPU ",
"key": " 󰍛 GPU ",
"keyColor": "blue",
"type": "gpu"
},
Expand Down
6 changes: 3 additions & 3 deletions presets/examples/2.jsonc
Expand Up @@ -19,15 +19,15 @@
},
{
"type": "host",
"key": " "
"key": " 󰌢"
},
{
"type": "cpu",
"key": " "
"key": " 󰻠"
},
{
"type": "gpu",
"key": " "
"key": " 󰍛"
},
{
"type": "disk",
Expand Down
3 changes: 1 addition & 2 deletions presets/examples/5.jsonc
Expand Up @@ -14,8 +14,7 @@
},
{
"type": "icons",
"key": "I",
"format": "{5}"
"key": "I"
},
{
"type": "font",
Expand Down

0 comments on commit 6769410

Please sign in to comment.