Skip to content

Commit 9a4e787

Browse files
authored
Merge pull request #536 from fastfetch-cli/dev
Release 2.0.3
2 parents eea4150 + d78e528 commit 9a4e787

File tree

28 files changed

+164
-41
lines changed

28 files changed

+164
-41
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ jobs:
187187
with:
188188
msystem: CLANG64
189189
update: true
190-
install: git zip mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-vulkan-loader mingw-w64-clang-x86_64-opencl-icd
190+
install: git mingw-w64-clang-x86_64-7zip mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-vulkan-loader mingw-w64-clang-x86_64-opencl-icd
191191

192192
- name: print msys version
193193
run: uname -a
@@ -222,13 +222,16 @@ jobs:
222222
run: ctest
223223

224224
- name: create zip archive
225-
run: zip fastfetch-$(./fastfetch --version-raw)-Win64.zip *.dll fastfetch.exe flashfetch.exe
225+
run: 7z a -tzip -mx9 -bd -y fastfetch-$(./fastfetch --version-raw)-Win64.zip *.dll fastfetch.exe flashfetch.exe presets
226+
227+
- name: create 7z archive
228+
run: 7z a -t7z -mx9 -bd -y fastfetch-$(./fastfetch --version-raw)-Win64.7z *.dll fastfetch.exe flashfetch.exe presets
226229

227230
- name: upload artifacts
228231
uses: actions/upload-artifact@v3
229232
with:
230233
name: fastfetch-win64
231-
path: ./fastfetch-*-Win64.zip
234+
path: ./fastfetch-*-Win64.*
232235

233236
win32:
234237
name: Win32
@@ -248,7 +251,7 @@ jobs:
248251
with:
249252
msystem: CLANG32
250253
update: true
251-
install: git zip mingw-w64-clang-i686-cmake mingw-w64-clang-i686-clang mingw-w64-clang-i686-vulkan-loader mingw-w64-clang-i686-opencl-icd
254+
install: git mingw-w64-clang-i686-7zip mingw-w64-clang-i686-cmake mingw-w64-clang-i686-clang mingw-w64-clang-i686-vulkan-loader mingw-w64-clang-i686-opencl-icd
252255

253256
- name: print msys version
254257
run: uname -a
@@ -280,13 +283,16 @@ jobs:
280283
run: ctest
281284

282285
- name: create zip archive
283-
run: zip fastfetch-$(./fastfetch --version-raw)-Win32.zip *.dll fastfetch.exe flashfetch.exe
286+
run: 7z a -tzip -mx9 -bd -y fastfetch-$(./fastfetch --version-raw)-Win32.zip *.dll fastfetch.exe flashfetch.exe presets
287+
288+
- name: create 7z archive
289+
run: 7z a -t7z -mx9 -bd -y fastfetch-$(./fastfetch --version-raw)-Win32.7z *.dll fastfetch.exe flashfetch.exe presets
284290

285291
- name: upload artifacts
286292
uses: actions/upload-artifact@v3
287293
with:
288294
name: fastfetch-win32
289-
path: ./fastfetch-*-Win32.zip
295+
path: ./fastfetch-*-Win32.*
290296

291297
release:
292298
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'fastfetch-cli/fastfetch'

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 2.0.3
2+
3+
Bugfixes:
4+
* Fix typo in config parsing for --color-title (#534)
5+
* Fix percent formatting for `--*-format` (#535)
6+
* Fix loading presets for homebrew (macOS)
7+
8+
Features:
9+
* Add option `--percent-ndigits`
10+
* Add command flag `--config` as an alias of `--load-config`
11+
* Windows packages now include presets (Windows)
12+
113
# 2.0.2
214

315
Bugfixes:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
22

33
project(fastfetch
4-
VERSION 2.0.2
4+
VERSION 2.0.3
55
LANGUAGES C
66
DESCRIPTION "Fast system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Fastfetch
22

3-
[![CI](https://github.com/fastfetch-cli/fastfetch/actions/workflows/ci.yml/badge.svg)](https://github.com/fastfetch-cli/fastfetch/actions/workflows/ci.yml)
3+
![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/fastfetch-cli/fastfetch/ci.yml)
4+
![GitHub license](https://img.shields.io/github/license/fastfetch-cli/fastfetch)
5+
![GitHub contributors](https://img.shields.io/github/contributors/fastfetch-cli/fastfetch)
6+
![GitHub top language](https://img.shields.io/github/languages/top/fastfetch-cli/fastfetch?logo=c&label=)
7+
![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/m/fastfetch-cli/fastfetch)
8+
![homebrew downloads](https://img.shields.io/homebrew/installs/dm/fastfetch?logo=homebrew)
9+
![GitHub all releases](https://img.shields.io/github/downloads/fastfetch-cli/fastfetch/total?logo=github)
10+
![GitHub release (with filter)](https://img.shields.io/github/v/release/fastfetch-cli/fastfetch?logo=github)
11+
[![latest packaged version(s)](https://repology.org/badge/latest-versions/fastfetch.svg)](https://repology.org/project/fastfetch/versions)
12+
[![Packaging status](https://repology.org/badge/tiny-repos/fastfetch.svg)](https://repology.org/project/fastfetch/versions)
413

514
Fastfetch is a [neofetch](https://github.com/dylanaraps/neofetch)-like tool for fetching system information and displaying them in a pretty way. It is written mainly in C, with performance and customizability in mind. Currently, Linux, Android, FreeBSD, MacOS and Windows 7+ are supported.
615

doc/json_schema.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,8 @@
343343
"sizeNdigits": {
344344
"type": "integer",
345345
"title": "Set the number of digits to keep after the decimal point when formatting sizes",
346+
"minimum": 0,
347+
"maximum": 9,
346348
"default": 2
347349
},
348350
"sizeMaxPrefix": {
@@ -388,9 +390,16 @@
388390
"type": "number",
389391
"title": "Set the percentage output type. 1 for percentage number, 2 for bar, 3 for both, 6 for bar only, 9 for colored number",
390392
"minimum": 0,
391-
"maximum": 9,
393+
"maximum": 255,
392394
"default": 1
393395
},
396+
"percentNdigits": {
397+
"type": "number",
398+
"title": "Set the number of digits to keep after the decimal point when formatting percentage numbers",
399+
"minimum": 0,
400+
"maximum": 9,
401+
"default": 0
402+
},
394403
"noBuffer": {
395404
"type": "boolean",
396405
"title": "Whether to disable the stdout application buffer",

src/common/bar.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void ffAppendPercentNum(FFstrbuf* buffer, double percent, uint8_t green, uint8_t
9393
ffStrbufAppendS(buffer, "\e[" FF_COLOR_FG_LIGHT_RED "m");
9494
}
9595
}
96-
ffStrbufAppendF(buffer, "%u%%", (unsigned) (percent + 0.5));
96+
ffStrbufAppendF(buffer, "%.*f%%", instance.config.percentNdigits, percent);
9797

9898
if (colored && !instance.config.pipe)
9999
{

src/common/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ static void defaultConfig(void)
7474
instance.config.barWidth = 10;
7575
instance.config.barBorder = true;
7676
instance.config.percentType = 1;
77+
instance.config.percentNdigits = 0;
7778

7879
ffInitBatteryOptions(&instance.config.battery);
7980
ffInitBiosOptions(&instance.config.bios);

src/common/jsonconfig.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ const char* ffParseDisplayJsonConfig(void)
325325
config->temperatureUnit = (FFTemperatureUnit) value;
326326
}
327327
else if (ffStrEqualsIgnCase(key, "percentType"))
328-
config->percentType = (uint32_t) yyjson_get_uint(val);
328+
config->percentType = (uint8_t) yyjson_get_uint(val);
329+
else if (ffStrEqualsIgnCase(key, "percentNdigits"))
330+
config->percentNdigits = (uint8_t) yyjson_get_uint(val);
329331
else if (ffStrEqualsIgnCase(key, "bar"))
330332
{
331333
if (yyjson_is_obj(val))

src/data/help.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Informative options:
1919

2020
General options:
2121
--load-config <file>: Load a config file or preset (+)
22+
--config <file>: Alias of --load-config (+)
2223
--multithreading <?value>: Use multiple threads to detect values
2324
--stat <?value>: Show time usage (in ms) for individual modules
2425
--allow-slow-operations <?value>: Allow operations that are usually very slow for more detailed output
@@ -70,6 +71,7 @@ Display options:
7071
--hide-cursor <?value>: Whether to hide the cursor during the run
7172
--binary-prefix <value>: Set the binary prefix to used. Must be IEC, SI or JEDEC. Default is IEC
7273
--percent-type <value>: Set the percentage output type. 1 for percentage number, 2 for bar, 3 for both, 6 for bar only, 9 for colored number. Default is 1
74+
--percent-ndigits <value>: Set the number of digits to keep after the decimal point when formatting percentage numbers. Default is 0
7375
--bar-char-elapsed <str>: Set the character to use in elapsed part. Default is '■'
7476
--bar-char-total <str>: Set the character to use in total part. Default is '-'
7577
--bar-width <?num>: Set the width of the bar, in number of characters. Default is 10

src/detection/opengl/opengl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ typedef struct FFOpenGLResult
1313
FFstrbuf slv;
1414
} FFOpenGLResult;
1515

16-
const char* ffDetectOpenGL(FFOpenGLResult* result);
16+
const char* ffDetectOpenGL(FFOpenGLOptions* options, FFOpenGLResult* result);
1717

1818
#endif

0 commit comments

Comments
 (0)