Skip to content

Commit e897a98

Browse files
authored
Merge pull request fastfetch-cli#765 from fastfetch-cli/dev
Release v2.8.10
2 parents d5b91a8 + 0a8056d commit e897a98

File tree

25 files changed

+370
-199
lines changed

25 files changed

+370
-199
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ jobs:
377377
with:
378378
msystem: CLANG64
379379
update: true
380-
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
380+
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-vulkan-headers mingw-w64-clang-x86_64-opencl-icd
381381

382382
- name: print msys version
383383
run: uname -a
@@ -439,7 +439,7 @@ jobs:
439439
with:
440440
msystem: CLANG32
441441
update: true
442-
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
442+
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-vulkan-headers mingw-w64-clang-i686-opencl-icd
443443

444444
- name: print msys version
445445
run: uname -a

.gitignore

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
**/build/
2-
**/.vscode/
3-
**/.cache/
4-
**/.kdev4/
5-
**/.DS_Store
6-
/.vs
1+
build/
2+
.vs/
3+
.vscode/
4+
.cache/
5+
.kdev4/
6+
.DS_Store
77
cscope.*
88
tags
99
fastfetch.kdev4

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,26 @@
1+
# 2.8.10
2+
3+
Changes:
4+
* Use MS-DOS device name as mountFrom result, instead of useless GUID volume name (Windows, Disk)
5+
* Some adjustments to Terminal detection (Terminal, Windows)
6+
* Don't pretty print CMD
7+
* Print conhost as Windows Console
8+
* Don't detect `wininit` as Terminal
9+
10+
Bugfixes:
11+
* Don't display 0.00 GHz (CPU, FreeBSD)
12+
* Don't detect manufactor of Qualcomm as ARM (CPU, Android)
13+
* Ignore `chezmoi` (Terminal, Linux)
14+
* Trim trailing possible whitespaces (PublicIP)
15+
* Fix detection compatibility for KDE 6 (Font, Linux)
16+
* Always use Metal API to detect vmem size (GPU, macOS)
17+
18+
Features:
19+
* Improve stability; print more useful error message; avoid misuse (PublicIP / Weather)
20+
21+
Logo:
22+
* Fix color of Arco Linux
23+
124
# 2.8.9
225

326
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.8.9
4+
VERSION 2.8.10
55
LANGUAGES C
66
DESCRIPTION "Fast neofetch-like system information tool"
77
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"

debian/changelog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
fastfetch (2.8.9) jammy; urgency=medium
2+
3+
* Update to 2.8.9
4+
5+
-- Carter Li <[email protected]> Fri, 15 Mar 2024 10:49:42 +0800
6+
17
fastfetch (2.8.8) jammy; urgency=medium
28

39
* Update to 2.8.8

debian/files

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
fastfetch_2.8.8_source.buildinfo universe/utils optional
1+
fastfetch_2.8.9_source.buildinfo universe/utils optional

presets/examples/12.jsonc

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
3+
"logo": {
4+
"type": "none"
5+
},
6+
"display": {
7+
"separator": "-> "
8+
},
9+
"modules": [
10+
{
11+
"type": "title",
12+
"format": " {6}{7}{8}"
13+
},
14+
"break",
15+
{
16+
"type": "custom",
17+
"format": "┌───────────────────────────── \u001b[1mSystem Information\u001b[0m ─────────────────────────────┐" // `\u001b` is `\033`, or `\e`
18+
},
19+
"break",
20+
{
21+
"key": "  OS ",
22+
"keyColor": "red",
23+
"type": "os"
24+
},
25+
{
26+
"key": "  Machine ",
27+
"keyColor": "green",
28+
"type": "host"
29+
},
30+
{
31+
"key": "  Kernel ",
32+
"keyColor": "magenta",
33+
"type": "kernel"
34+
},
35+
{
36+
"key": " 󰅐 Uptime ",
37+
"keyColor": "red",
38+
"type": "uptime"
39+
},
40+
{
41+
"key": " 󰍹 Resolution ",
42+
"keyColor": "yellow",
43+
"type": "display",
44+
"compactType": "original-with-refresh-rate"
45+
},
46+
{
47+
"key": "  WM ",
48+
"keyColor": "blue",
49+
"type": "wm"
50+
},
51+
{
52+
"key": "  DE ",
53+
"keyColor": "green",
54+
"type": "de"
55+
},
56+
{
57+
"key": "  Shell ",
58+
"keyColor": "cyan",
59+
"type": "shell"
60+
},
61+
{
62+
"key": "  Terminal ",
63+
"keyColor": "red",
64+
"type": "terminal"
65+
},
66+
{
67+
"key": "  CPU ",
68+
"keyColor": "yellow",
69+
"type": "cpu"
70+
},
71+
{
72+
"key": " ﬙ GPU ",
73+
"keyColor": "blue",
74+
"type": "gpu"
75+
},
76+
{
77+
"key": " 󰑭 Memory ",
78+
"keyColor": "magenta",
79+
"type": "memory"
80+
},
81+
{
82+
"key": " 󰩟 Local IP ",
83+
"keyColor": "red",
84+
"type": "localip",
85+
"compact": true
86+
},
87+
{
88+
"key": " 󰩠 Public IP ",
89+
"keyColor": "cyan",
90+
"type": "publicip"
91+
},
92+
"break",
93+
{
94+
"type": "custom",
95+
"format": "└──────────────────────────────────────────────────────────────────────────────┘" // `\u001b` is `\033`, or `\e`
96+
},
97+
"break",
98+
{
99+
"type": "colors",
100+
"paddingLeft": 34,
101+
"symbol": "circle"
102+
}
103+
]
104+
}

src/common/font.c

Lines changed: 20 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "common/font.h"
33

44
#include <string.h>
5+
#include <ctype.h>
56

67
void ffFontInit(FFfont* font)
78
{
@@ -66,59 +67,33 @@ void ffFontInitQt(FFfont* font, const char* data)
6667
//See https://doc.qt.io/qt-5/qfont.html#toString
6768

6869
//Family
69-
while(*data != ',' && *data != '\0')
70-
{
71-
ffStrbufAppendC(&font->name, *data);
72-
++data;
73-
}
74-
if(*data != '\0')
75-
++data;
70+
data = ffStrbufAppendSUntilC(&font->name, data, ',');
7671
ffStrbufTrim(&font->name, ' ');
72+
if (!data) goto exit;
73+
data++;
7774

7875
//Size
79-
while(*data != ',' && *data != '\0')
80-
{
81-
ffStrbufAppendC(&font->size, *data);
82-
++data;
83-
}
84-
if(*data != '\0')
85-
++data;
76+
data = ffStrbufAppendSUntilC(&font->size, data, ',');
8677
ffStrbufTrim(&font->size, ' ');
87-
88-
#define FF_FONT_QT_SKIP_VALUE \
89-
while(*data != ',' && *data != '\0') \
90-
++data; \
91-
if(*data != '\0') \
92-
++data;
93-
94-
FF_FONT_QT_SKIP_VALUE //Pixel size
95-
FF_FONT_QT_SKIP_VALUE //Style hint
96-
FF_FONT_QT_SKIP_VALUE //Font weight
97-
FF_FONT_QT_SKIP_VALUE //Font style
98-
FF_FONT_QT_SKIP_VALUE //Underline
99-
FF_FONT_QT_SKIP_VALUE //Strike out
100-
FF_FONT_QT_SKIP_VALUE //Fixed pitch
101-
FF_FONT_QT_SKIP_VALUE //Always 0
102-
103-
#undef FF_FONT_QT_SKIP_VALUE
104-
105-
while(*data != '\0')
78+
if (!data) goto exit;
79+
data++;
80+
81+
//Style
82+
data = strrchr(data, ',');
83+
if (!data) goto exit;
84+
data++;
85+
if (isalpha(*data))
10686
{
107-
while(*data == ' ')
108-
++data;
109-
110-
if(*data == '\0')
111-
break;
112-
113-
FFstrbuf* style = ffListAdd(&font->styles);
114-
ffStrbufInit(style);
115-
while(*data != ' ' && *data != '\0')
87+
do
11688
{
117-
ffStrbufAppendC(style, *data);
118-
++data;
119-
}
89+
FFstrbuf* style = ffListAdd(&font->styles);
90+
ffStrbufInit(style);
91+
data = ffStrbufAppendSUntilC(style, data, ' ');
92+
if (data) data++;
93+
} while (data);
12094
}
12195

96+
exit:
12297
fontInitPretty(font);
12398
}
12499

src/common/networking.h

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,9 @@ typedef struct FFNetworkingState {
2020
FFThreadType thread;
2121
#endif
2222
#endif
23-
} FFNetworkingState;
2423

25-
bool ffNetworkingSendHttpRequest(FFNetworkingState* state, const char* host, const char* path, const char* headers);
26-
bool ffNetworkingRecvHttpResponse(FFNetworkingState* state, FFstrbuf* buffer, uint32_t timeout);
24+
uint32_t timeout;
25+
} FFNetworkingState;
2726

28-
static inline bool ffNetworkingGetHttp(const char* host, const char* path, uint32_t timeout, const char* headers, FFstrbuf* buffer)
29-
{
30-
FFNetworkingState state;
31-
if(ffNetworkingSendHttpRequest(&state, host, path, headers))
32-
return ffNetworkingRecvHttpResponse(&state, buffer, timeout);
33-
return false;
34-
}
27+
const char* ffNetworkingSendHttpRequest(FFNetworkingState* state, const char* host, const char* path, const char* headers);
28+
const char* ffNetworkingRecvHttpResponse(FFNetworkingState* state, FFstrbuf* buffer);

0 commit comments

Comments
 (0)