Skip to content

Commit

Permalink
Merge pull request #765 from fastfetch-cli/dev
Browse files Browse the repository at this point in the history
Release v2.8.10
  • Loading branch information
CarterLi committed Mar 25, 2024
2 parents d5b91a8 + 0a8056d commit e897a98
Show file tree
Hide file tree
Showing 25 changed files with 370 additions and 199 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -377,7 +377,7 @@ jobs:
with:
msystem: CLANG64
update: true
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
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

- name: print msys version
run: uname -a
Expand Down Expand Up @@ -439,7 +439,7 @@ jobs:
with:
msystem: CLANG32
update: true
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
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

- name: print msys version
run: uname -a
Expand Down
12 changes: 6 additions & 6 deletions .gitignore
@@ -1,9 +1,9 @@
**/build/
**/.vscode/
**/.cache/
**/.kdev4/
**/.DS_Store
/.vs
build/
.vs/
.vscode/
.cache/
.kdev4/
.DS_Store
cscope.*
tags
fastfetch.kdev4
Expand Down
23 changes: 23 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,26 @@
# 2.8.10

Changes:
* Use MS-DOS device name as mountFrom result, instead of useless GUID volume name (Windows, Disk)
* Some adjustments to Terminal detection (Terminal, Windows)
* Don't pretty print CMD
* Print conhost as Windows Console
* Don't detect `wininit` as Terminal

Bugfixes:
* Don't display 0.00 GHz (CPU, FreeBSD)
* Don't detect manufactor of Qualcomm as ARM (CPU, Android)
* Ignore `chezmoi` (Terminal, Linux)
* Trim trailing possible whitespaces (PublicIP)
* Fix detection compatibility for KDE 6 (Font, Linux)
* Always use Metal API to detect vmem size (GPU, macOS)

Features:
* Improve stability; print more useful error message; avoid misuse (PublicIP / Weather)

Logo:
* Fix color of Arco Linux

# 2.8.9

Bugfixes:
Expand Down
2 changes: 1 addition & 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.8.9
VERSION 2.8.10
LANGUAGES C
DESCRIPTION "Fast neofetch-like system information tool"
HOMEPAGE_URL "https://github.com/fastfetch-cli/fastfetch"
Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
@@ -1,3 +1,9 @@
fastfetch (2.8.9) jammy; urgency=medium

* Update to 2.8.9

-- Carter Li <zhangsongcui@live.cn> Fri, 15 Mar 2024 10:49:42 +0800

fastfetch (2.8.8) jammy; urgency=medium

* Update to 2.8.8
Expand Down
2 changes: 1 addition & 1 deletion debian/files
@@ -1 +1 @@
fastfetch_2.8.8_source.buildinfo universe/utils optional
fastfetch_2.8.9_source.buildinfo universe/utils optional
104 changes: 104 additions & 0 deletions presets/examples/12.jsonc
@@ -0,0 +1,104 @@
{
"$schema": "https://github.com/fastfetch-cli/fastfetch/raw/dev/doc/json_schema.json",
"logo": {
"type": "none"
},
"display": {
"separator": "-> "
},
"modules": [
{
"type": "title",
"format": " {6}{7}{8}"
},
"break",
{
"type": "custom",
"format": "┌───────────────────────────── \u001b[1mSystem Information\u001b[0m ─────────────────────────────┐" // `\u001b` is `\033`, or `\e`
},
"break",
{
"key": "  OS ",
"keyColor": "red",
"type": "os"
},
{
"key": "  Machine ",
"keyColor": "green",
"type": "host"
},
{
"key": "  Kernel ",
"keyColor": "magenta",
"type": "kernel"
},
{
"key": " 󰅐 Uptime ",
"keyColor": "red",
"type": "uptime"
},
{
"key": " 󰍹 Resolution ",
"keyColor": "yellow",
"type": "display",
"compactType": "original-with-refresh-rate"
},
{
"key": "  WM ",
"keyColor": "blue",
"type": "wm"
},
{
"key": "  DE ",
"keyColor": "green",
"type": "de"
},
{
"key": "  Shell ",
"keyColor": "cyan",
"type": "shell"
},
{
"key": "  Terminal ",
"keyColor": "red",
"type": "terminal"
},
{
"key": "  CPU ",
"keyColor": "yellow",
"type": "cpu"
},
{
"key": " ﬙ GPU ",
"keyColor": "blue",
"type": "gpu"
},
{
"key": " 󰑭 Memory ",
"keyColor": "magenta",
"type": "memory"
},
{
"key": " 󰩟 Local IP ",
"keyColor": "red",
"type": "localip",
"compact": true
},
{
"key": " 󰩠 Public IP ",
"keyColor": "cyan",
"type": "publicip"
},
"break",
{
"type": "custom",
"format": "└──────────────────────────────────────────────────────────────────────────────┘" // `\u001b` is `\033`, or `\e`
},
"break",
{
"type": "colors",
"paddingLeft": 34,
"symbol": "circle"
}
]
}
65 changes: 20 additions & 45 deletions src/common/font.c
Expand Up @@ -2,6 +2,7 @@
#include "common/font.h"

#include <string.h>
#include <ctype.h>

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

//Family
while(*data != ',' && *data != '\0')
{
ffStrbufAppendC(&font->name, *data);
++data;
}
if(*data != '\0')
++data;
data = ffStrbufAppendSUntilC(&font->name, data, ',');
ffStrbufTrim(&font->name, ' ');
if (!data) goto exit;
data++;

//Size
while(*data != ',' && *data != '\0')
{
ffStrbufAppendC(&font->size, *data);
++data;
}
if(*data != '\0')
++data;
data = ffStrbufAppendSUntilC(&font->size, data, ',');
ffStrbufTrim(&font->size, ' ');

#define FF_FONT_QT_SKIP_VALUE \
while(*data != ',' && *data != '\0') \
++data; \
if(*data != '\0') \
++data;

FF_FONT_QT_SKIP_VALUE //Pixel size
FF_FONT_QT_SKIP_VALUE //Style hint
FF_FONT_QT_SKIP_VALUE //Font weight
FF_FONT_QT_SKIP_VALUE //Font style
FF_FONT_QT_SKIP_VALUE //Underline
FF_FONT_QT_SKIP_VALUE //Strike out
FF_FONT_QT_SKIP_VALUE //Fixed pitch
FF_FONT_QT_SKIP_VALUE //Always 0

#undef FF_FONT_QT_SKIP_VALUE

while(*data != '\0')
if (!data) goto exit;
data++;

//Style
data = strrchr(data, ',');
if (!data) goto exit;
data++;
if (isalpha(*data))
{
while(*data == ' ')
++data;

if(*data == '\0')
break;

FFstrbuf* style = ffListAdd(&font->styles);
ffStrbufInit(style);
while(*data != ' ' && *data != '\0')
do
{
ffStrbufAppendC(style, *data);
++data;
}
FFstrbuf* style = ffListAdd(&font->styles);
ffStrbufInit(style);
data = ffStrbufAppendSUntilC(style, data, ' ');
if (data) data++;
} while (data);
}

exit:
fontInitPretty(font);
}

Expand Down
14 changes: 4 additions & 10 deletions src/common/networking.h
Expand Up @@ -20,15 +20,9 @@ typedef struct FFNetworkingState {
FFThreadType thread;
#endif
#endif
} FFNetworkingState;

bool ffNetworkingSendHttpRequest(FFNetworkingState* state, const char* host, const char* path, const char* headers);
bool ffNetworkingRecvHttpResponse(FFNetworkingState* state, FFstrbuf* buffer, uint32_t timeout);
uint32_t timeout;
} FFNetworkingState;

static inline bool ffNetworkingGetHttp(const char* host, const char* path, uint32_t timeout, const char* headers, FFstrbuf* buffer)
{
FFNetworkingState state;
if(ffNetworkingSendHttpRequest(&state, host, path, headers))
return ffNetworkingRecvHttpResponse(&state, buffer, timeout);
return false;
}
const char* ffNetworkingSendHttpRequest(FFNetworkingState* state, const char* host, const char* path, const char* headers);
const char* ffNetworkingRecvHttpResponse(FFNetworkingState* state, FFstrbuf* buffer);

0 comments on commit e897a98

Please sign in to comment.