Skip to content

Commit 6f92524

Browse files
Merge pull request #369 from LinusDierheimer/dev
Release 1.8.1
2 parents e829589 + b2ff150 commit 6f92524

File tree

14 files changed

+77
-38
lines changed

14 files changed

+77
-38
lines changed

.github/workflows/push.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ jobs:
141141
with:
142142
msystem: CLANG64
143143
update: true
144-
install: git mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-cjson mingw-w64-clang-x86_64-vulkan-loader mingw-w64-clang-x86_64-opencl-icd
144+
install: git zip mingw-w64-clang-x86_64-cmake mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-cjson mingw-w64-clang-x86_64-vulkan-loader mingw-w64-clang-x86_64-opencl-icd
145145

146146
- name: print msys version
147147
run: uname -a
@@ -188,14 +188,14 @@ jobs:
188188
- name: run tests
189189
run: ctest
190190

191+
- name: create zip archive
192+
run: zip fastfetch-windows.zip *.dll fastfetch.exe flashfetch.exe
193+
191194
- name: upload artifacts
192195
uses: actions/upload-artifact@v3
193196
with:
194197
name: fastfetch-windows
195-
path: |
196-
./*.dll
197-
./fastfetch.exe
198-
./flashfetch.exe
198+
path: ./fastfetch-windows.zip
199199

200200
windows-old:
201201
name: Windows-old
@@ -215,7 +215,7 @@ jobs:
215215
with:
216216
msystem: MINGW64
217217
update: true
218-
install: git mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-cjson mingw-w64-x86_64-vulkan-loader mingw-w64-x86_64-opencl-icd
218+
install: git zip mingw-w64-x86_64-cmake mingw-w64-x86_64-gcc mingw-w64-x86_64-cjson mingw-w64-x86_64-vulkan-loader mingw-w64-x86_64-opencl-icd
219219

220220
- name: print msys version
221221
run: uname -a
@@ -262,14 +262,14 @@ jobs:
262262
- name: run tests
263263
run: ctest
264264

265+
- name: create zip archive
266+
run: zip fastfetch-windows-old.zip *.dll fastfetch.exe flashfetch.exe
267+
265268
- name: upload artifacts
266269
uses: actions/upload-artifact@v3
267270
with:
268271
name: fastfetch-windows-old
269-
path: |
270-
./*.dll
271-
./fastfetch.exe
272-
./flashfetch.exe
272+
path: ./fastfetch-windows-old.zip
273273

274274
release:
275275
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'LinusDierheimer/fastfetch'

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# 1.8.1
2+
3+
Notable Changes:
4+
5+
* `Song` was used as an alias to `Media` module. It's removed to avoid confusion. All song related flags (`--song-key`, etc) should change to media (`--media-key`, etc). (@CarterLi)
6+
7+
Bugfixes:
8+
9+
* Mountpoint paths on linux get decoded correctly (#364)
10+
* Color parsing once again works (@IanManske, #365)
11+
* Using a custom key with a placeholder for the local ip module now does work correctly if multiple interfaces are present (#368)
12+
113
# 1.8.0
214

315
This release introduces Windows support! Fastfetch now fully support all major desktop OSes (Linux, macOS, Windows and FreeBSD)
@@ -72,7 +84,7 @@ Features:
7284
* MacPorts package manager support (@SladeGetz, #234)
7385
* Battery support for MacOS (@CarterLi, #235)
7486
* Processes, swap & terminal font support for MacOS(@CarterLi, #237)
75-
* Song support for MacOS (@CarterLi, #242)
87+
* Media support for MacOS (@CarterLi, #242)
7688
* Player support for MacOS (@CarterLi, #245)
7789
* WM theme support for MacOS (@CarterLi, #246)
7890
* CPU usage support for MacOS (@CarterLi, #247)

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
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 1.8.0
4+
VERSION 1.8.1
55
LANGUAGES C
66
DESCRIPTION "Fast system information tool"
77
HOMEPAGE_URL "https://github.com/LinusDierheimer/fastfetch"
@@ -284,7 +284,7 @@ set(LIBFASTFETCH_SRC
284284
src/modules/resolution.c
285285
src/modules/separator.c
286286
src/modules/shell.c
287-
src/modules/song.c
287+
src/modules/media.c
288288
src/modules/terminal.c
289289
src/modules/terminalfont.c
290290
src/modules/theme.c

presets/all

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
--structure Title:Separator:OS:Host:Bios:Board:Chassis:Kernel:Uptime:Processes:Packages:Shell:Resolution:DE:WM:WMTheme:Theme:Icons:Font:Cursor:Terminal:TerminalFont:CPU:CPUUsage:GPU:Memory:Swap:Disk:Battery:PowerAdapter:Player:Song:PublicIP:LocalIP:Wifi:DateTime:Locale:Vulkan:OpenGL:OpenCL:Users:Weather:Break:Colors
1+
--structure Title:Separator:OS:Host:Bios:Board:Chassis:Kernel:Uptime:Processes:Packages:Shell:Resolution:DE:WM:WMTheme:Theme:Icons:Font:Cursor:Terminal:TerminalFont:CPU:CPUUsage:GPU:Memory:Swap:Disk:Battery:PowerAdapter:Player:Media:PublicIP:LocalIP:Wifi:DateTime:Locale:Vulkan:OpenGL:OpenCL:Users:Weather:Break:Colors

src/common/init.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ static void defaultConfig(FFinstance* instance)
193193
initModuleArg(&instance->config.weather);
194194
initModuleArg(&instance->config.wifi);
195195
initModuleArg(&instance->config.player);
196-
initModuleArg(&instance->config.song);
196+
initModuleArg(&instance->config.media);
197197
initModuleArg(&instance->config.dateTime);
198198
initModuleArg(&instance->config.date);
199199
initModuleArg(&instance->config.time);
@@ -425,7 +425,7 @@ static void destroyConfig(FFinstance* instance)
425425
destroyModuleArg(&instance->config.weather);
426426
destroyModuleArg(&instance->config.wifi);
427427
destroyModuleArg(&instance->config.player);
428-
destroyModuleArg(&instance->config.song);
428+
destroyModuleArg(&instance->config.media);
429429
destroyModuleArg(&instance->config.dateTime);
430430
destroyModuleArg(&instance->config.date);
431431
destroyModuleArg(&instance->config.time);

src/data/config_user.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@
247247
#--wifi-key Wifi
248248
#--weather-key Weather
249249
#--player-key Media Player
250-
#--song-key Song
250+
#--media-key Media
251251
#--datetime-key Date Time
252252
#--vulkan-key Vulkan
253253
#--opengl-key OpenGL
@@ -290,7 +290,7 @@
290290
#--public-ip-format
291291
#--weather-format
292292
#--player-format
293-
#--song-format
293+
#--media-format
294294
#--datetime-format
295295
#--vulkan-format
296296
#--opengl-format
@@ -333,7 +333,7 @@
333333
#--public-ip-error
334334
#--weather-error
335335
#--player-error
336-
#--song-error
336+
#--media-error
337337
#--datetime-error
338338
#--vulkan-error
339339
#--opengl-error

src/data/modules.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Icons
1818
Kernel
1919
Locale
2020
LocalIP
21+
Media
2122
Memory
2223
OpenGL
2324
OS
@@ -29,7 +30,6 @@ PublicIP
2930
Resolution
3031
Separator
3132
Shell
32-
Song
3333
Swap
3434
Terminal
3535
TerminalFont

src/detection/disk/disk_linux.c

Lines changed: 27 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,33 @@
11
#include "disk.h"
22

3+
#include <limits.h>
34
#include <ctype.h>
45
#include <sys/statvfs.h>
56

7+
static void strbufAppendMountPoint(FFstrbuf* mountpoint, const char* source)
8+
{
9+
while(*source != '\0' && !isspace(*source))
10+
{
11+
//After a backslash the next 3 characters are octal ascii codes
12+
if(*source == '\\' && strnlen(source, 4) == 4)
13+
{
14+
char octal[4] = {0};
15+
strncpy(octal, source + 1, 3);
16+
17+
long value = strtol(octal, NULL, 8); //Returns 0 on error, so no need to check endptr
18+
if(value > 0 && value < CHAR_MAX)
19+
{
20+
ffStrbufAppendC(mountpoint, (char) value);
21+
source += 4;
22+
continue;
23+
}
24+
}
25+
26+
ffStrbufAppendC(mountpoint, *source);
27+
++source;
28+
}
29+
}
30+
631
void ffDetectDisksImpl(FFDiskResult* disks)
732
{
833
FILE* mountsFile = fopen("/proc/mounts", "r");
@@ -25,7 +50,7 @@ void ffDetectDisksImpl(FFDiskResult* disks)
2550
if(strncmp(currentPos, "/dev/", 5) != 0 && strncmp(currentPos, "drvfs", 5) != 0)
2651
continue;
2752

28-
//Skip /dev/
53+
//Skip /dev/ or drvfs
2954
currentPos += 5;
3055

3156
//Don't show loop file systems
@@ -41,7 +66,7 @@ void ffDetectDisksImpl(FFDiskResult* disks)
4166
++currentPos;
4267

4368
ffStrbufInitA(&disk->mountpoint, 16);
44-
ffStrbufAppendSUntilC(&disk->mountpoint, currentPos, ' ');
69+
strbufAppendMountPoint(&disk->mountpoint, currentPos);
4570

4671
//Go to filesystem
4772
currentPos += disk->mountpoint.length;

src/detection/wifi/wifi_apple.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
case kCWPHYMode11ac:
6161
ffStrbufAppendS(&item->conn.phyType, "802.11ac (Wi-Fi 5)");
6262
break;
63-
case kCWPHYMode11ax:
63+
case 6 /*kCWPHYMode11ax*/:
6464
ffStrbufAppendS(&item->conn.phyType, "802.11ax (Wi-Fi 6)");
6565
break;
6666
case 7 /*kCWPHYMode11be?*/:

src/fastfetch.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -389,9 +389,9 @@ static inline void printCommandHelp(const char* command)
389389
"URL name"
390390
);
391391
}
392-
else if(strcasecmp(command, "song-format") == 0 || strcasecmp(command, "media-format") == 0)
392+
else if(strcasecmp(command, "media-format") == 0)
393393
{
394-
constructAndPrintCommandHelpFormat("song", "{3} - {1}", 4,
394+
constructAndPrintCommandHelpFormat("media", "{3} - {1}", 4,
395395
"Pretty media name",
396396
"Media name",
397397
"Artist name",
@@ -701,6 +701,7 @@ static void optionParseColor(const char* key, const char* value, FFstrbuf* buffe
701701
else FF_APPEND_COLOR_CODE_COND(magenta, "35")
702702
else FF_APPEND_COLOR_CODE_COND(cyan, "36")
703703
else FF_APPEND_COLOR_CODE_COND(white, "37")
704+
else
704705
{
705706
ffStrbufAppendC(buffer, *value);
706707
++value;
@@ -1121,7 +1122,7 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
11211122
else if(optionParseModuleArgs(key, value, "public-ip", &instance->config.publicIP)) {}
11221123
else if(optionParseModuleArgs(key, value, "weather", &instance->config.weather)) {}
11231124
else if(optionParseModuleArgs(key, value, "player", &instance->config.player)) {}
1124-
else if(optionParseModuleArgs(key, value, "song", &instance->config.song)) {}
1125+
else if(optionParseModuleArgs(key, value, "media", &instance->config.media)) {}
11251126
else if(optionParseModuleArgs(key, value, "datetime", &instance->config.dateTime)) {}
11261127
else if(optionParseModuleArgs(key, value, "date", &instance->config.date)) {}
11271128
else if(optionParseModuleArgs(key, value, "time", &instance->config.time)) {}
@@ -1379,8 +1380,8 @@ static void parseStructureCommand(FFinstance* instance, FFdata* data, const char
13791380
ffPrintWeather(instance);
13801381
else if(strcasecmp(line, "player") == 0)
13811382
ffPrintPlayer(instance);
1382-
else if(strcasecmp(line, "media") == 0 || strcasecmp(line, "song") == 0)
1383-
ffPrintSong(instance);
1383+
else if(strcasecmp(line, "media") == 0)
1384+
ffPrintMedia(instance);
13841385
else if(strcasecmp(line, "datetime") == 0)
13851386
ffPrintDateTime(instance);
13861387
else if(strcasecmp(line, "date") == 0)

0 commit comments

Comments
 (0)