mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-29 16:26:39 +01:00
+10
-10
@@ -141,7 +141,7 @@ jobs:
|
||||
with:
|
||||
msystem: CLANG64
|
||||
update: true
|
||||
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
|
||||
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
|
||||
|
||||
- name: print msys version
|
||||
run: uname -a
|
||||
@@ -188,14 +188,14 @@ jobs:
|
||||
- name: run tests
|
||||
run: ctest
|
||||
|
||||
- name: create zip archive
|
||||
run: zip fastfetch-windows.zip *.dll fastfetch.exe flashfetch.exe
|
||||
|
||||
- name: upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: fastfetch-windows
|
||||
path: |
|
||||
./*.dll
|
||||
./fastfetch.exe
|
||||
./flashfetch.exe
|
||||
path: ./fastfetch-windows.zip
|
||||
|
||||
windows-old:
|
||||
name: Windows-old
|
||||
@@ -215,7 +215,7 @@ jobs:
|
||||
with:
|
||||
msystem: MINGW64
|
||||
update: true
|
||||
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
|
||||
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
|
||||
|
||||
- name: print msys version
|
||||
run: uname -a
|
||||
@@ -262,14 +262,14 @@ jobs:
|
||||
- name: run tests
|
||||
run: ctest
|
||||
|
||||
- name: create zip archive
|
||||
run: zip fastfetch-windows-old.zip *.dll fastfetch.exe flashfetch.exe
|
||||
|
||||
- name: upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: fastfetch-windows-old
|
||||
path: |
|
||||
./*.dll
|
||||
./fastfetch.exe
|
||||
./flashfetch.exe
|
||||
path: ./fastfetch-windows-old.zip
|
||||
|
||||
release:
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'LinusDierheimer/fastfetch'
|
||||
|
||||
+13
-1
@@ -1,3 +1,15 @@
|
||||
# 1.8.1
|
||||
|
||||
Notable Changes:
|
||||
|
||||
* `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)
|
||||
|
||||
Bugfixes:
|
||||
|
||||
* Mountpoint paths on linux get decoded correctly (#364)
|
||||
* Color parsing once again works (@IanManske, #365)
|
||||
* Using a custom key with a placeholder for the local ip module now does work correctly if multiple interfaces are present (#368)
|
||||
|
||||
# 1.8.0
|
||||
|
||||
This release introduces Windows support! Fastfetch now fully support all major desktop OSes (Linux, macOS, Windows and FreeBSD)
|
||||
@@ -72,7 +84,7 @@ Features:
|
||||
* MacPorts package manager support (@SladeGetz, #234)
|
||||
* Battery support for MacOS (@CarterLi, #235)
|
||||
* Processes, swap & terminal font support for MacOS(@CarterLi, #237)
|
||||
* Song support for MacOS (@CarterLi, #242)
|
||||
* Media support for MacOS (@CarterLi, #242)
|
||||
* Player support for MacOS (@CarterLi, #245)
|
||||
* WM theme support for MacOS (@CarterLi, #246)
|
||||
* CPU usage support for MacOS (@CarterLi, #247)
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
cmake_minimum_required(VERSION 3.12.0) # target_link_libraries with OBJECT libs & project homepage url
|
||||
|
||||
project(fastfetch
|
||||
VERSION 1.8.0
|
||||
VERSION 1.8.1
|
||||
LANGUAGES C
|
||||
DESCRIPTION "Fast system information tool"
|
||||
HOMEPAGE_URL "https://github.com/LinusDierheimer/fastfetch"
|
||||
@@ -284,7 +284,7 @@ set(LIBFASTFETCH_SRC
|
||||
src/modules/resolution.c
|
||||
src/modules/separator.c
|
||||
src/modules/shell.c
|
||||
src/modules/song.c
|
||||
src/modules/media.c
|
||||
src/modules/terminal.c
|
||||
src/modules/terminalfont.c
|
||||
src/modules/theme.c
|
||||
|
||||
+1
-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
|
||||
--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
|
||||
|
||||
+2
-2
@@ -193,7 +193,7 @@ static void defaultConfig(FFinstance* instance)
|
||||
initModuleArg(&instance->config.weather);
|
||||
initModuleArg(&instance->config.wifi);
|
||||
initModuleArg(&instance->config.player);
|
||||
initModuleArg(&instance->config.song);
|
||||
initModuleArg(&instance->config.media);
|
||||
initModuleArg(&instance->config.dateTime);
|
||||
initModuleArg(&instance->config.date);
|
||||
initModuleArg(&instance->config.time);
|
||||
@@ -425,7 +425,7 @@ static void destroyConfig(FFinstance* instance)
|
||||
destroyModuleArg(&instance->config.weather);
|
||||
destroyModuleArg(&instance->config.wifi);
|
||||
destroyModuleArg(&instance->config.player);
|
||||
destroyModuleArg(&instance->config.song);
|
||||
destroyModuleArg(&instance->config.media);
|
||||
destroyModuleArg(&instance->config.dateTime);
|
||||
destroyModuleArg(&instance->config.date);
|
||||
destroyModuleArg(&instance->config.time);
|
||||
|
||||
@@ -247,7 +247,7 @@
|
||||
#--wifi-key Wifi
|
||||
#--weather-key Weather
|
||||
#--player-key Media Player
|
||||
#--song-key Song
|
||||
#--media-key Media
|
||||
#--datetime-key Date Time
|
||||
#--vulkan-key Vulkan
|
||||
#--opengl-key OpenGL
|
||||
@@ -290,7 +290,7 @@
|
||||
#--public-ip-format
|
||||
#--weather-format
|
||||
#--player-format
|
||||
#--song-format
|
||||
#--media-format
|
||||
#--datetime-format
|
||||
#--vulkan-format
|
||||
#--opengl-format
|
||||
@@ -333,7 +333,7 @@
|
||||
#--public-ip-error
|
||||
#--weather-error
|
||||
#--player-error
|
||||
#--song-error
|
||||
#--media-error
|
||||
#--datetime-error
|
||||
#--vulkan-error
|
||||
#--opengl-error
|
||||
|
||||
@@ -18,6 +18,7 @@ Icons
|
||||
Kernel
|
||||
Locale
|
||||
LocalIP
|
||||
Media
|
||||
Memory
|
||||
OpenGL
|
||||
OS
|
||||
@@ -29,7 +30,6 @@ PublicIP
|
||||
Resolution
|
||||
Separator
|
||||
Shell
|
||||
Song
|
||||
Swap
|
||||
Terminal
|
||||
TerminalFont
|
||||
|
||||
@@ -1,8 +1,33 @@
|
||||
#include "disk.h"
|
||||
|
||||
#include <limits.h>
|
||||
#include <ctype.h>
|
||||
#include <sys/statvfs.h>
|
||||
|
||||
static void strbufAppendMountPoint(FFstrbuf* mountpoint, const char* source)
|
||||
{
|
||||
while(*source != '\0' && !isspace(*source))
|
||||
{
|
||||
//After a backslash the next 3 characters are octal ascii codes
|
||||
if(*source == '\\' && strnlen(source, 4) == 4)
|
||||
{
|
||||
char octal[4] = {0};
|
||||
strncpy(octal, source + 1, 3);
|
||||
|
||||
long value = strtol(octal, NULL, 8); //Returns 0 on error, so no need to check endptr
|
||||
if(value > 0 && value < CHAR_MAX)
|
||||
{
|
||||
ffStrbufAppendC(mountpoint, (char) value);
|
||||
source += 4;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
ffStrbufAppendC(mountpoint, *source);
|
||||
++source;
|
||||
}
|
||||
}
|
||||
|
||||
void ffDetectDisksImpl(FFDiskResult* disks)
|
||||
{
|
||||
FILE* mountsFile = fopen("/proc/mounts", "r");
|
||||
@@ -25,7 +50,7 @@ void ffDetectDisksImpl(FFDiskResult* disks)
|
||||
if(strncmp(currentPos, "/dev/", 5) != 0 && strncmp(currentPos, "drvfs", 5) != 0)
|
||||
continue;
|
||||
|
||||
//Skip /dev/
|
||||
//Skip /dev/ or drvfs
|
||||
currentPos += 5;
|
||||
|
||||
//Don't show loop file systems
|
||||
@@ -41,7 +66,7 @@ void ffDetectDisksImpl(FFDiskResult* disks)
|
||||
++currentPos;
|
||||
|
||||
ffStrbufInitA(&disk->mountpoint, 16);
|
||||
ffStrbufAppendSUntilC(&disk->mountpoint, currentPos, ' ');
|
||||
strbufAppendMountPoint(&disk->mountpoint, currentPos);
|
||||
|
||||
//Go to filesystem
|
||||
currentPos += disk->mountpoint.length;
|
||||
|
||||
@@ -60,7 +60,7 @@ const char* ffDetectWifi(const FFinstance* instance, FFlist* result)
|
||||
case kCWPHYMode11ac:
|
||||
ffStrbufAppendS(&item->conn.phyType, "802.11ac (Wi-Fi 5)");
|
||||
break;
|
||||
case kCWPHYMode11ax:
|
||||
case 6 /*kCWPHYMode11ax*/:
|
||||
ffStrbufAppendS(&item->conn.phyType, "802.11ax (Wi-Fi 6)");
|
||||
break;
|
||||
case 7 /*kCWPHYMode11be?*/:
|
||||
|
||||
+6
-5
@@ -389,9 +389,9 @@ static inline void printCommandHelp(const char* command)
|
||||
"URL name"
|
||||
);
|
||||
}
|
||||
else if(strcasecmp(command, "song-format") == 0 || strcasecmp(command, "media-format") == 0)
|
||||
else if(strcasecmp(command, "media-format") == 0)
|
||||
{
|
||||
constructAndPrintCommandHelpFormat("song", "{3} - {1}", 4,
|
||||
constructAndPrintCommandHelpFormat("media", "{3} - {1}", 4,
|
||||
"Pretty media name",
|
||||
"Media name",
|
||||
"Artist name",
|
||||
@@ -701,6 +701,7 @@ static void optionParseColor(const char* key, const char* value, FFstrbuf* buffe
|
||||
else FF_APPEND_COLOR_CODE_COND(magenta, "35")
|
||||
else FF_APPEND_COLOR_CODE_COND(cyan, "36")
|
||||
else FF_APPEND_COLOR_CODE_COND(white, "37")
|
||||
else
|
||||
{
|
||||
ffStrbufAppendC(buffer, *value);
|
||||
++value;
|
||||
@@ -1121,7 +1122,7 @@ static void parseOption(FFinstance* instance, FFdata* data, const char* key, con
|
||||
else if(optionParseModuleArgs(key, value, "public-ip", &instance->config.publicIP)) {}
|
||||
else if(optionParseModuleArgs(key, value, "weather", &instance->config.weather)) {}
|
||||
else if(optionParseModuleArgs(key, value, "player", &instance->config.player)) {}
|
||||
else if(optionParseModuleArgs(key, value, "song", &instance->config.song)) {}
|
||||
else if(optionParseModuleArgs(key, value, "media", &instance->config.media)) {}
|
||||
else if(optionParseModuleArgs(key, value, "datetime", &instance->config.dateTime)) {}
|
||||
else if(optionParseModuleArgs(key, value, "date", &instance->config.date)) {}
|
||||
else if(optionParseModuleArgs(key, value, "time", &instance->config.time)) {}
|
||||
@@ -1379,8 +1380,8 @@ static void parseStructureCommand(FFinstance* instance, FFdata* data, const char
|
||||
ffPrintWeather(instance);
|
||||
else if(strcasecmp(line, "player") == 0)
|
||||
ffPrintPlayer(instance);
|
||||
else if(strcasecmp(line, "media") == 0 || strcasecmp(line, "song") == 0)
|
||||
ffPrintSong(instance);
|
||||
else if(strcasecmp(line, "media") == 0)
|
||||
ffPrintMedia(instance);
|
||||
else if(strcasecmp(line, "datetime") == 0)
|
||||
ffPrintDateTime(instance);
|
||||
else if(strcasecmp(line, "date") == 0)
|
||||
|
||||
+2
-2
@@ -134,7 +134,7 @@ typedef struct FFconfig
|
||||
FFModuleArgs publicIP;
|
||||
FFModuleArgs weather;
|
||||
FFModuleArgs player;
|
||||
FFModuleArgs song;
|
||||
FFModuleArgs media;
|
||||
FFModuleArgs dateTime;
|
||||
FFModuleArgs date;
|
||||
FFModuleArgs time;
|
||||
@@ -288,7 +288,7 @@ void ffPrintBattery(FFinstance* instance);
|
||||
void ffPrintPowerAdapter(FFinstance* instance);
|
||||
void ffPrintLocale(FFinstance* instance);
|
||||
void ffPrintPlayer(FFinstance* instance);
|
||||
void ffPrintSong(FFinstance* instance);
|
||||
void ffPrintMedia(FFinstance* instance);
|
||||
void ffPrintDateTime(FFinstance* instance);
|
||||
void ffPrintDate(FFinstance* instance);
|
||||
void ffPrintTime(FFinstance* instance);
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@ int main(int argc, char** argv)
|
||||
ffPrintBattery(&instance);
|
||||
ffPrintPowerAdapter(&instance);
|
||||
//ffPrintPlayer(&instance);
|
||||
//ffPrintSong(&instance);
|
||||
//ffPrintMedia(&instance);
|
||||
//ffPrintLocalIp(&instance);
|
||||
//ffPrintPublicIp(&instance);
|
||||
//ffPrintWifi(&instance);
|
||||
|
||||
@@ -40,6 +40,7 @@ void ffPrintLocalIp(FFinstance* instance)
|
||||
}
|
||||
else
|
||||
{
|
||||
ffStrbufClear(&key);
|
||||
ffParseFormatString(&key, &instance->config.localIP.key, 1, (FFformatarg[]){
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &ip->name}
|
||||
});
|
||||
|
||||
@@ -4,8 +4,8 @@
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
#define FF_SONG_MODULE_NAME "Media"
|
||||
#define FF_SONG_NUM_FORMAT_ARGS 5
|
||||
#define FF_MEDIA_MODULE_NAME "Media"
|
||||
#define FF_MEDIA_NUM_FORMAT_ARGS 5
|
||||
|
||||
static bool shouldIgoreChar(char c)
|
||||
{
|
||||
@@ -42,13 +42,13 @@ static bool artistInSongTitle(const FFstrbuf* song, const FFstrbuf* artist)
|
||||
return false;
|
||||
}
|
||||
|
||||
void ffPrintSong(FFinstance* instance)
|
||||
void ffPrintMedia(FFinstance* instance)
|
||||
{
|
||||
const FFMediaResult* media = ffDetectMedia(instance);
|
||||
|
||||
if(media->error.length > 0)
|
||||
{
|
||||
ffPrintError(instance, FF_SONG_MODULE_NAME, 0, &instance->config.song, "%s", media->error.chars);
|
||||
ffPrintError(instance, FF_MEDIA_MODULE_NAME, 0, &instance->config.media, "%s", media->error.chars);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -69,7 +69,7 @@ void ffPrintSong(FFinstance* instance)
|
||||
if(songPretty.length == 0)
|
||||
ffStrbufAppend(&songPretty, &media->song);
|
||||
|
||||
if(instance->config.song.outputFormat.length == 0)
|
||||
if(instance->config.media.outputFormat.length == 0)
|
||||
{
|
||||
//We don't expose artistPretty to the format, as it might be empty (when the think that the artist is already in the song title)
|
||||
FFstrbuf artistPretty;
|
||||
@@ -81,7 +81,7 @@ void ffPrintSong(FFinstance* instance)
|
||||
if(artistInSongTitle(&songPretty, &artistPretty))
|
||||
ffStrbufClear(&artistPretty);
|
||||
|
||||
ffPrintLogoAndKey(instance, FF_SONG_MODULE_NAME, 0, &instance->config.song.key);
|
||||
ffPrintLogoAndKey(instance, FF_MEDIA_MODULE_NAME, 0, &instance->config.media.key);
|
||||
|
||||
if(artistPretty.length > 0)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ void ffPrintSong(FFinstance* instance)
|
||||
}
|
||||
else
|
||||
{
|
||||
ffPrintFormat(instance, FF_SONG_MODULE_NAME, 0, &instance->config.song, FF_SONG_NUM_FORMAT_ARGS, (FFformatarg[]){
|
||||
ffPrintFormat(instance, FF_MEDIA_MODULE_NAME, 0, &instance->config.media, FF_MEDIA_NUM_FORMAT_ARGS, (FFformatarg[]){
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &songPretty},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->song},
|
||||
{FF_FORMAT_ARG_TYPE_STRBUF, &media->artist},
|
||||
Reference in New Issue
Block a user