Skip to content

Commit

Permalink
Merge pull request #1105 from fastfetch-cli/dev
Browse files Browse the repository at this point in the history
Release: v2.19.0
  • Loading branch information
CarterLi authored Jul 22, 2024
2 parents efd9e94 + 036d407 commit 7c15d0c
Show file tree
Hide file tree
Showing 91 changed files with 1,564 additions and 764 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
run: ./fastfetch --list-features

- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false

- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:
run: ./fastfetch --list-features

- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false

- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
Expand Down Expand Up @@ -146,7 +146,7 @@ jobs:
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
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
Expand Down Expand Up @@ -185,7 +185,7 @@ jobs:
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
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
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
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
Expand Down Expand Up @@ -259,7 +259,7 @@ jobs:
- name: run
run: |
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
Expand Down Expand Up @@ -300,7 +300,7 @@ jobs:
- name: run
run: |
./fastfetch --list-features
time ./fastfetch -c presets/ci.jsonc
time ./fastfetch -c presets/ci.jsonc --stat false
time ./fastfetch -c presets/ci.jsonc --format json
time ./flashfetch
ldd fastfetch
Expand Down Expand Up @@ -348,7 +348,7 @@ jobs:
run: ./fastfetch --list-features

- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false

- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
Expand Down Expand Up @@ -477,7 +477,7 @@ jobs:
run: ./fastfetch --list-features

- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false

- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
Expand Down Expand Up @@ -547,7 +547,7 @@ jobs:
run: curl -LO https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK/raw/master/ags_lib/lib/amd_ags_x86.dll

- name: run fastfetch
run: time ./fastfetch -c presets/ci.jsonc
run: time ./fastfetch -c presets/ci.jsonc --stat false

- name: run fastfetch --format json
run: time ./fastfetch -c presets/ci.jsonc --format json
Expand Down
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
# 2.19.0

Changes:
* JSON option `modules.cpu.freqNdigits` has been renamed and moved to `display.freq.ndigits`
* Previously: `{ "modules": { "type": "cpu", "freqNdigits": 2 } }`
* Now: `{ "display": { "freq": { "ndigits": 2 } } }`
* This option now affects GPU frequency too
* By default, frequencies are displayed in *GHz*. Set `display.freq.ndigits` to `-1` to display them in *MHz*
* JSON option `display.binaryPrefix` has been moved to `display.size.binaryPrefix`
* Previously: `{ "display": { "binaryPrefix": "IEC" } }`
* Now: `{ "display": { "size": { "binaryPrefix": "IEC" } } }`

Features:
* Print physical diagonal length if supported (Display)
* Detect display type in X11 mode (Display)
* Assume displays connected via DisplayPort are external monitors (Display, Linux)
* Support GPU frequency detection for Intel XE driver (GPU, Linux)
* Detect init system on Android (InitSystem, Android)
* Use background to display color blocks (Colors)
* To fix weird vertical black lines in some terminals and match the behavior of neofetch (#1094)
* Can be reverted to old behavior with `--colors-symbol block`
* Support Zed terminal version detection (Terminal)
* Improve wezterm font detection (TerminalFont)
* Add option `--separator-length`
* Support GPU frequency detection for Apple Silicon (GPU, macOS)
* Detect maximum refresh rate (#1101, Monitor)
* Detect if HDR mode is supported and enabled (Windows, Display / Monitor)
* Support physical monitor info detection for FreeBSD and SunOS (Monitor)
* Support defining constant strings in JSON config file, which can be used to dedupe formattion strings
```jsonc
{
"display": {
"constants": [
"Hello", // {$1}
"world" // {$2}
]
},
"modules": [
{
"type": "custom",
"format": "{$1} {$2}!" // print "Hello world!"
},
{
"type": "custom",
"format": "{$2} {$1}" // print "world Hello"
}
]
}
```

Bugfixes:
* Fix some presets
* Better detection for XTerm terminal fonts (#1095, TerminalFont, Linux)
* Remove debug output (#1097, Windows)
* Fix command line option `--gpu-hide-type` doesn't work (#1098, GPU)
* Fix wrong date on Raspbian 10 (#1108, DateTime, Linux)
* Use `brightness` instead of `actuall_brightness` when detecting current brightness level (Brightness, Linux)
* Ref: https://bugzilla.kernel.org/show_bug.cgi?id=203905
* Fix buffer overflow with long font family names when detecting kitty term font (TerminalFont)
* Fix some typos

Logos:
* Update void_small
* Add ALT Linux

# 2.18.1

Fix a regression introduced in v2.18.0
Expand Down
6 changes: 3 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url

project(fastfetch
VERSION 2.18.1
VERSION 2.19.0
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down Expand Up @@ -591,7 +591,7 @@ elseif(BSD)
src/detection/gamepad/gamepad_bsd.c
src/detection/media/media_linux.c
src/detection/memory/memory_bsd.c
src/detection/monitor/monitor_nosupport.c
src/detection/monitor/monitor_linux.c
src/detection/netio/netio_bsd.c
src/detection/opengl/opengl_linux.c
src/detection/os/os_linux.c
Expand Down Expand Up @@ -796,7 +796,7 @@ elseif(SunOS)
src/detection/gamepad/gamepad_nosupport.c
src/detection/media/media_linux.c
src/detection/memory/memory_sunos.c
src/detection/monitor/monitor_nosupport.c
src/detection/monitor/monitor_linux.c
src/detection/netio/netio_sunos.c
src/detection/opengl/opengl_linux.c
src/detection/os/os_sunos.c
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,10 @@ Fastfetch uses JSON (with comments) for configuration. I suggest you use an IDE

Alternatively, you can refer to the presets in [`presets` directory](https://github.com/fastfetch-cli/fastfetch/tree/dev/presets).

The **correct** way to edit the configuration:

[![asciicast](https://asciinema.org/a/1uF6sTPGKrHKI1MVaFcikINSQ.svg)](https://asciinema.org/a/1uF6sTPGKrHKI1MVaFcikINSQ)

### Q: I WANT THE DOCUMENTATION!

[Here is the documentation](https://github.com/fastfetch-cli/fastfetch/wiki/Json-Schema). It is generated from [JSON schema](https://github.com/fastfetch-cli/fastfetch/blob/dev/doc/json_schema.json) but you won't like it.
Expand Down Expand Up @@ -169,6 +173,10 @@ The p10k doc clearly states that you should NOT print anything to stdout after `

You can always use `fastfetch --pipe false` to force fastfetch running in colorful mode.

### Q: Why do fastfetch and neofetch show different memory usage result?

See [#1096](https://github.com/fastfetch-cli/fastfetch/issues/1096).

### Q: I want feature A / B / C. Will fastfetch support it?

Fastfetch is a system information tool. We only accept hardware or system level software feature requests. For most personal uses, I recommend using `Command` module to detect it yourself, which can be used to grab output from a custom shell script:
Expand Down
4 changes: 2 additions & 2 deletions completions/fastfetch.bash
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ __fastfetch_complete_logo_type()

__fastfetch_complete_binary_prefix()
{
local __ff_binary_prefixes=(
local __ff_size_binary_prefixes=(
"iec"
"si"
"jedec"
)
COMPREPLY=($(compgen -W "${__ff_binary_prefixes[*]}" -- "$CURRENT_WORD"))
COMPREPLY=($(compgen -W "${__ff_size_binary_prefixes[*]}" -- "$CURRENT_WORD"))
}

__fastfetch_complete_gl()
Expand Down
12 changes: 12 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
fastfetch (2.18.1) jammy; urgency=medium

* Update to 2.18.1

-- Carter Li <[email protected]> Thu, 11 Jul 2024 14:32:15 +0800

fastfetch (2.18.0) jammy; urgency=medium

* Update to 2.18.0

-- Carter Li <[email protected]> Wed, 10 Jul 2024 16:46:32 +0800

fastfetch (2.17.2) jammy; urgency=medium

* Update to 2.17.2
Expand Down
2 changes: 1 addition & 1 deletion debian/files
Original file line number Diff line number Diff line change
@@ -1 +1 @@
fastfetch_2.17.2_source.buildinfo universe/utils optional
fastfetch_2.18.1_source.buildinfo universe/utils optional
2 changes: 1 addition & 1 deletion doc/fastfetch.1.in
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ config files, see the CONFIGURATION section

.B \-\-gen\-config \fI[file]
Generate a config file with options specified on the command line.
If \fIfile\fR is specified, the configuration will written to the
If \fIfile\fR is specified, the configuration will be written to the
file, otherwise it will be written to stdout.
.TP

Expand Down
76 changes: 49 additions & 27 deletions doc/json_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -424,29 +424,29 @@
"minimum": 0,
"default": 0
},
"binaryPrefix": {
"type": "string",
"description": "Set the binary prefix to used when printing bytes",
"oneOf": [
{
"const": "iec",
"description": "1024 Bytes = 1 KiB, 1024 KiB = 1 MiB, ... (standard)"
},
{
"const": "si",
"description": "1000 Bytes = 1 KB, 1000 KB = 1 MB, ..."
},
{
"const": "jedec",
"description": "1024 Bytes = 1 kB, 1024 K = 1 MB, ..."
}
]
},
"size": {
"type": "object",
"additionalProperties": false,
"description": "Set how a size value should be displayed",
"properties": {
"binaryPrefix": {
"type": "string",
"description": "Set the binary prefix to used when formatting sizes",
"oneOf": [
{
"const": "iec",
"description": "1024 Bytes = 1 KiB, 1024 KiB = 1 MiB, ... (standard)"
},
{
"const": "si",
"description": "1000 Bytes = 1 KB, 1000 KB = 1 MB, ..."
},
{
"const": "jedec",
"description": "1024 Bytes = 1 kB, 1024 K = 1 MB, ..."
}
]
},
"maxPrefix": {
"type": "string",
"description": "Set the largest binary prefix to use when formatting sizes",
Expand Down Expand Up @@ -574,10 +574,31 @@
}
}
},
"freq": {
"type": "object",
"additionalProperties": false,
"description": "Set how frequency values should be displayed",
"properties": {
"ndigits": {
"type": "integer",
"description": "Set the number of digits to keep after the decimal point when formatting frequency values\nA positive value will show the frequency in GHz of decimal\n-1 will show the frequency in MHz",
"minimum": -1,
"maximum": 9,
"default": 2
}
}
},
"noBuffer": {
"type": "boolean",
"description": "Whether to disable the stdout application buffer",
"default": false
},
"constants": {
"type": "array",
"description": "List of strings to be used in custom format of modules",
"items": {
"type": "string"
}
}
}
},
Expand Down Expand Up @@ -1096,13 +1117,6 @@
"temp": {
"$ref": "#/$defs/temperature"
},
"freqNdigits": {
"description": "Set the number of digits to keep after the decimal point when printing CPU frequency",
"type": "integer",
"minimum": 0,
"maximum": 9,
"default": 2
},
"showPeCoreCount": {
"description": "Detect and display CPU frequency of different core types (eg. Pcore and Ecore) if supported",
"type": "boolean",
Expand Down Expand Up @@ -1173,13 +1187,14 @@
"type": "string",
"enum": [
"block",
"background",
"circle",
"diamond",
"triangle",
"square",
"star"
],
"default": "block"
"default": "background"
},
"paddingLeft": {
"description": "Set the number of white spaces to print before the symbol",
Expand Down Expand Up @@ -1940,12 +1955,19 @@
"const": "separator"
},
"string": {
"description": "Set the string to be printed",
"description": "Set the string to be printed by the separator line",
"type": "string",
"default": "-"
},
"outputColor": {
"description": "Set the color of the separator line",
"$ref": "#/$defs/outputColor"
},
"length": {
"description": "Set the length of the separator line, or 0 to auto-detect",
"type": "integer",
"minimum": 0,
"default": 0
}
}
},
Expand Down
Loading

0 comments on commit 7c15d0c

Please sign in to comment.